Brief "How to issue a message to the log"
ErrorLogobject (which is probably made available with the name
ZMthrowan exception of type
ZMxel, or something your experiment has derived from
#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;
ErrorObjis constructed and added to in one or more statements. It is then used to form a
#include "Exceptions/ZMxel.h" ErrorObj myMsg ( ELwarning, "Suspicious Pt" ) << "momentum is"; myMsg << pt; ZMthrow ( ZMxel(myMsg) );
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.
%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 information about the entire ErrorLogger package, including what the framework does to set things up, go to the