CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
zmex Namespace Reference

Classes

class  ZMerrnoList
 
class  ZMexception
 
class  ZMexClassInfo
 
class  ZMexHandler
 
class  ZMexHandlerBehavior
 
class  ZMexHandleViaParent
 
class  ZMexIgnoreAlways
 
class  ZMexIgnoreNextN
 
class  ZMexLogAlways
 
class  ZMexLogBehavior
 
class  ZMexLogger
 
class  ZMexLogNever
 
class  ZMexLogTwice
 
class  ZMexLogViaParent
 
class  ZMexThrowAlways
 
class  ZMexThrowErrors
 
class  ZMexValidationStyle
 

Enumerations

enum  ZMexAction { ZMexThrowIt , ZMexIgnoreIt , ZMexHANDLEVIAPARENT }
 
enum  ZMexLogResult { ZMexLOGGED , ZMexNOTLOGGED , ZMexLOGVIAPARENT }
 
enum  ZMexSeverity {
  ZMexNORMAL , ZMexINFO , ZMexWARNING , ZMexERROR ,
  ZMexSEVERE , ZMexFATAL , ZMexPROBLEM , ZMexSEVERITYenumLAST
}
 

Functions

ZMexHandlerZMhandler ()
 
ZMexLoggerZMlogger ()
 
ZMexAction ZMthrow_ (const ZMexception &userException, int lineNum, const char fileName[])
 

Variables

ZMerrnoList ZMerrno
 
std::string ZMexUserActivity = ""
 
int ZMexUserNumericalTag = 0
 
const std::string ZMexSeverityName [ZMexSEVERITYenumLAST]
 
const char ZMexSeverityLetter [ZMexSEVERITYenumLAST]
 
int ZMexSeverityLimit [ZMexSEVERITYenumLAST]
 

Enumeration Type Documentation

◆ ZMexAction

Enumerator
ZMexThrowIt 
ZMexIgnoreIt 
ZMexHANDLEVIAPARENT 

Definition at line 20 of file ZMexAction.h.

@ ZMexIgnoreIt
Definition: ZMexAction.h:20
@ ZMexThrowIt
Definition: ZMexAction.h:20
@ ZMexHANDLEVIAPARENT
Definition: ZMexAction.h:20

◆ ZMexLogResult

Enumerator
ZMexLOGGED 
ZMexNOTLOGGED 
ZMexLOGVIAPARENT 

Definition at line 19 of file ZMexLogResult.h.

◆ ZMexSeverity

Enumerator
ZMexNORMAL 
ZMexINFO 
ZMexWARNING 
ZMexERROR 
ZMexSEVERE 
ZMexFATAL 
ZMexPROBLEM 
ZMexSEVERITYenumLAST 

Definition at line 32 of file ZMexSeverity.h.

32 {
33
35 // All is well; always safe to ignore; typically not worth logging
36 // since it's probably just a temporary placeholder.
38 // In the normal course of events, here is news worth logging;
39 // always safe to ignore; often useful for progress reporting and
40 // for debugging purposes.
42 // Something unusual has happened, but we have a quite reasonable
43 // action to take; it's generally safe to ignore the warning because
44 // you'll probably get just about the result you intended; logging
45 // can probably cease after (say) 50 of the same warnings.
47 // We encountered something such that, although we can make it safe
48 // to continue running (e.g., by supplying a default value instead of
49 // a value we can't for some reason calculate), you probably won't
50 // get the result you expected unless you handle this yourself; ought
51 // always be logged (but may be sensible, if hundreds of the same
52 // error are intentionally ignored, to stop logging each one).
54 // The action you intended will almost certainly have a seriously
55 // flawed outcome and we doubt that either we or you can make it safe
56 // to continue if you ignore this; ought always be logged.
58 // We can make no representations as to the state of any part of the
59 // software, even of software parts not obviously associated with the
60 // failed intended action and even if you try to handle the problem;
61 // ought always be logged and essentially never be ignored.
63 // The software has reached a logically impossible internal state;
64 // must always be logged and never be ignored; if encountered, should
65 // always be reported to the software's developers and/or maintainers.
67 // Not a true severity level; useful to count the number of distinct
68 // severity levels and, as such, must always be physically last
69 // within this enum's definition.
70
71}; // ZMexSeverity
@ ZMexWARNING
Definition: ZMexSeverity.h:41
@ ZMexSEVERITYenumLAST
Definition: ZMexSeverity.h:66
@ ZMexPROBLEM
Definition: ZMexSeverity.h:62
@ ZMexSEVERE
Definition: ZMexSeverity.h:53
@ ZMexERROR
Definition: ZMexSeverity.h:46
@ ZMexNORMAL
Definition: ZMexSeverity.h:34
@ ZMexFATAL
Definition: ZMexSeverity.h:57
@ ZMexINFO
Definition: ZMexSeverity.h:37

Function Documentation

◆ ZMhandler()

ZMexHandler & zmex::ZMhandler ( )

Definition at line 65 of file ZMexception.cc.

65 {
67 return ZMhandler;
68} // ZMhandler()
ZMexHandler & ZMhandler()
Definition: ZMexception.cc:65

Referenced by ZMhandler().

◆ ZMlogger()

ZMexLogger & zmex::ZMlogger ( )

Definition at line 70 of file ZMexception.cc.

70 {
72 return ZMlogger;
73}
ZMexLogger & ZMlogger()
Definition: ZMexception.cc:70

Referenced by display(), main(), and ZMlogger().

◆ ZMthrow_()

ZMexAction zmex::ZMthrow_ ( const ZMexception userException,
int  lineNum,
const char  fileName[] 
)

Definition at line 35 of file ZMthrow.cc.

39 {
40
41 // a) Place the lineNum and fileName information into the exception object.
42
43 // b) Cause the handler to be invoked via x.X::handleMe().
44 // That finds the handler, puts the handler name into the exception,
45 // and invokes the handler's takeCareOf() method, passing it the
46 // exception object so that, if any parent handlers are involved,
47 // you later have x.Y::handleMe() invoked, where Y is an ancestor of X.
48
49 // c) If the exception is of severity ZMexERROR or higher, copy the
50 // exception object onto ZMerrno.
51
52 // d) Return the result of the handler's decision.
53
54 // The following are done elsewhere, so ZMthrow_ does not have to:
55 // The constructor for ZMexception takes care of incrementing
56 // the static count, and saving its value.
57 // The handler notifies the exception object of the handler's
58 // decision whether to have the object be thrown or ignored.
59 // Identifying the logger to call, and saving that information,
60 // in this exception instance, is done by x.logMe()
61 // called by handler, assuming the handler decides to log.
62
63 userException.location( lineNum, fileName ); // (a)
64
65 ZMexAction whatToDo = userException.handleMe(); // (b)
66
67 if ( userException.severity() >= ZMexERROR ) // (c)
68 ZMerrno.write( userException );
69
70 return whatToDo; // (d)
71
72} // ZMthrow_()
void write(const ZMexception &x)
Definition: ZMerrno.cc:67
virtual ZMexAction handleMe() const
Definition: ZMexception.h:447
ZMexSeverity severity() const
void location(int line, const std::string file) const
ZMexAction
Definition: ZMexAction.h:20
ZMerrnoList ZMerrno
Definition: ZMerrno.cc:40

Variable Documentation

◆ ZMerrno

ZMerrnoList zmex::ZMerrno

Definition at line 40 of file ZMerrno.cc.

Referenced by main(), and ZMthrow_().

◆ ZMexSeverityLetter

const char zmex::ZMexSeverityLetter
Initial value:
= {
' ',
'I',
'W',
'E',
'S',
'F',
'?',
}

Definition at line 34 of file ZMexSeverity.cc.

Referenced by zmex::ZMexception::logMessage().

◆ ZMexSeverityLimit

int zmex::ZMexSeverityLimit
Initial value:
= {
-1,
-1,
-1,
-1,
-1,
-1,
-1,
}

Definition at line 45 of file ZMexSeverity.cc.

Referenced by zmex::ZMexception::logMessage(), zmex::ZMexHandler::setLogLimit(), and zmex::ZMexHandlerBehavior::standardHandling().

◆ ZMexSeverityName

const std::string zmex::ZMexSeverityName
Initial value:
= {
"NORMAL",
"INFORMATIONAL",
"WARNING",
"ERROR",
"SEVERE",
"FATAL",
"UNANTICIPATED PROBLEM",
}

Definition at line 23 of file ZMexSeverity.cc.

◆ ZMexUserActivity

std::string zmex::ZMexUserActivity = ""

Definition at line 55 of file ZMexception.cc.

Referenced by zmex::ZMexception::logMessage().

◆ ZMexUserNumericalTag

int zmex::ZMexUserNumericalTag = 0

Definition at line 56 of file ZMexception.cc.

Referenced by zmex::ZMexception::logMessage().