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

#include <ZMexHandler.h>

+ Inheritance diagram for zmex::ZMexHandlerBehavior:

Public Member Functions

 ZMexHandlerBehavior (const std::string aname="ZMexHandlerBehavior")
 
virtual ~ZMexHandlerBehavior ()
 
virtual ZMexHandlerBehaviorclone () const
 
virtual std::string name () const
 
virtual ZMexAction takeCareOf (const ZMexception &)
 

Protected Member Functions

ZMexAction standardHandling (const ZMexception &x, bool willThrow)
 

Detailed Description

Definition at line 62 of file ZMexHandler.h.

Constructor & Destructor Documentation

◆ ZMexHandlerBehavior()

zmex::ZMexHandlerBehavior::ZMexHandlerBehavior ( const std::string  aname = "ZMexHandlerBehavior")
inline

Definition at line 66 of file ZMexHandler.h.

68 : name_( aname ) { }

◆ ~ZMexHandlerBehavior()

virtual zmex::ZMexHandlerBehavior::~ZMexHandlerBehavior ( )
inlinevirtual

Definition at line 70 of file ZMexHandler.h.

70{ }

Member Function Documentation

◆ clone()

virtual ZMexHandlerBehavior * zmex::ZMexHandlerBehavior::clone ( ) const
inlinevirtual

Reimplemented in zmex::ZMexThrowAlways, zmex::ZMexThrowErrors, zmex::ZMexIgnoreAlways, zmex::ZMexIgnoreNextN, and zmex::ZMexHandleViaParent.

Definition at line 72 of file ZMexHandler.h.

72 {
73 return new ZMexHandlerBehavior( *this );
74 }
ZMexHandlerBehavior(const std::string aname="ZMexHandlerBehavior")
Definition: ZMexHandler.h:66

◆ name()

virtual std::string zmex::ZMexHandlerBehavior::name ( ) const
inlinevirtual

Definition at line 76 of file ZMexHandler.h.

76{ return name_; }

Referenced by standardHandling().

◆ standardHandling()

ZMexAction zmex::ZMexHandlerBehavior::standardHandling ( const ZMexception x,
bool  willThrow 
)
protected

Definition at line 45 of file ZMexHandler.cc.

46 {
47
48 x.handlerUsed( name() ); // record handler's name
49 x.wasThrown( willThrow ); // record go/nogo decision
50
51 int & val = ZMexSeverityLimit[ x.severity() ];
52
53 if ( x.OKtoLog() && val != 0 ) // handle logging, if desired
54 if ( x.logMe() == ZMexLOGGED && val > 0 )
55 --val;
56
57 return willThrow ? ZMexThrowIt
59}
virtual std::string name() const
Definition: ZMexHandler.h:76
int ZMexSeverityLimit[ZMexSEVERITYenumLAST]
Definition: ZMexSeverity.cc:45
@ ZMexIgnoreIt
Definition: ZMexAction.h:20
@ ZMexThrowIt
Definition: ZMexAction.h:20
@ ZMexLOGGED
Definition: ZMexLogResult.h:19

Referenced by zmex::ZMexThrowErrors::takeCareOf().

◆ takeCareOf()

virtual ZMexAction zmex::ZMexHandlerBehavior::takeCareOf ( const ZMexception )
inlinevirtual

The documentation for this class was generated from the following files: