The ZOOM ErrorLogger Package:

Brief "How to issue a message to the log"

Your framework will provide for one or both of these two ways of logging messages:
  1. Log a message using an ErrorLog object (which is probably made available with the name errlog).

  2. ZMthrow an exception of type ZMxel, or something your experiment has derived from ZMxel.

1. Logging using errlog

  #include "ErrorLogger/ErrorLog.h".
  #include "myExperiment.h"
  ZM_USING_NAMESPACE( zmel )  /* using namespace zmel; */
  // ...
  errlog (ELerror, "Too much energy") << "E = " << totalEnergy << endmsg;

An arbtrary number of items can be streamed in before the endmsg, and they need not all be added in one statement.

If you wish to put file and line number information into the message, use the ERRLOG macro instead.

  ERRLOG (ELerror, "Too much energy") << "E = " << totalEnergy << endmsg;

2. Logging using ZMxel

An ErrorObj is constructed and added to in one or more statements. It is then used to form a ZMxel which you ZMthrow:
  #include "Exceptions/ZMxel.h"
  ErrorObj myMsg ( ELwarning, "Suspicious Pt" ) << "momentum is";
  myMsg << pt;
  ZMthrow ( ZMxel(myMsg) );

Severity Levels

The following severity levels are available:
  Severity          Symbol   Full name  Intention	
  ---------------   ------   ---------  ---------

  ELincidental        ..	..      flash this on a screen
  ELsuccess           -!      SUCCESS   report reaching a milestone	
  ELinfo              -i      INFO      information
  ELwarning           -w      WARNING   warning
  ELwarning2          -W      WARNING!  more serious warning
  ELerror             -e      ERROR     error detected
  ELerror2            -E      ERROR!    more serious error
  ELnextEvent         -n      NEXT      advise to skip to next event
  ELunspecified       ??        ??      severity was not specified
  ELsevere            -s      SEVERE    future results are suspect
  ELsevere2           -S      SEVERE!   more severe
  ELabort             -A      ABORT!    suggest aborting		
  ELfatal             -F      FATAL!    strongly suggest aborting!
The framework can control whether declaring severe, abort, or fatal errors actually will abort the job. The intentions listed for all the error types are only advisory; it is up to the framework to do what the experiment intends.

What the error message output will look like

%ERLOG-w  Too much energy: E = 834.750032 d0L2proc5 CTCDRVmodule
          CTCTRKsubr 10-Jul-1999 14:49:03 run=234 event=543
There will also be a summary with counts of incidences and some sample contexts for each type of error encountered.
For more details, go to the
How the Physicist Logs Errors page.

For information about the entire ErrorLogger package, including what the framework does to set things up, go to the

ErrorLogger Package page.