ATLAS Offline Software
|
a helper to translate a CP::CorrectionCode into a ::StatusCode More...
#include <OutOfValidityHelper.h>
Public Member Functions | |
template<typename T > | |
OutOfValidityHelper (T *owner, const std::string &propertyName="outOfValidity", const std::string &propertyDescription="how to handle out of validity results") | |
standard constructor More... | |
::StatusCode | initialize () |
standard initialize More... | |
::StatusCode | check (const xAOD::IParticle &particle, const CP::CorrectionCode &code, const char *context) const |
check the correction code and do the proper thing More... | |
bool | get (const xAOD::IParticle &particle) const |
retrieve the OutOfValidity decision, where true = particle passes validity check More... | |
bool | msgLvl (const MSG::Level lvl) const |
Test the output level of the object. More... | |
MsgStream & | msg () const |
The standard message stream. More... | |
MsgStream & | msg (const MSG::Level lvl) const |
The standard message stream. More... | |
Private Attributes | |
unsigned | m_action {unsigned (OutOfValidityAction::ABORT)} |
the action to take More... | |
std::unique_ptr< ISelectionWriteAccessor > | m_write_accessor |
the accessor if we apply one More... | |
std::unique_ptr< ISelectionReadAccessor > | m_read_accessor |
std::string | m_decorationName |
the decoration name we use (if we have one) More... | |
bool | m_isInitialized = false |
whether we have been initialized More... | |
std::function< MsgStream &()> | m_msg |
the message stream we use More... | |
a helper to translate a CP::CorrectionCode into a ::StatusCode
The prolem is OutOfValidityRange which does not have an equivalent in StatusCode and which does not have a unique, correct handling in all situations. This helper allows to configure a variety of behaviors via properties.
Definition at line 72 of file OutOfValidityHelper.h.
CP::OutOfValidityHelper::OutOfValidityHelper | ( | T * | owner, |
const std::string & | propertyName = "outOfValidity" , |
||
const std::string & | propertyDescription = "how to handle out of validity results" |
||
) |
StatusCode CP::OutOfValidityHelper::check | ( | const xAOD::IParticle & | particle, |
const CP::CorrectionCode & | code, | ||
const char * | context | ||
) | const |
check the correction code and do the proper thing
Definition at line 38 of file OutOfValidityHelper.cxx.
bool CP::OutOfValidityHelper::get | ( | const xAOD::IParticle & | particle | ) | const |
retrieve the OutOfValidity decision, where true = particle passes validity check
Definition at line 70 of file OutOfValidityHelper.cxx.
StatusCode CP::OutOfValidityHelper::initialize | ( | ) |
|
inherited |
The standard message stream.
Definition at line 24 of file AsgMessagingForward.cxx.
|
inherited |
|
inherited |
Test the output level of the object.
lvl | The message level to test against |
true
If messages at level "lvl" will be printed Definition at line 11 of file AsgMessagingForward.cxx.
|
private |
the action to take
Definition at line 97 of file OutOfValidityHelper.h.
|
private |
the decoration name we use (if we have one)
Definition at line 106 of file OutOfValidityHelper.h.
|
private |
whether we have been initialized
This is only used in debug mode to indicate a programming fault. Otherwise it is too easy for users to forget to initialize this object.
Definition at line 114 of file OutOfValidityHelper.h.
|
privateinherited |
the message stream we use
This used to be a simple pointer to the MsgStream
itself, but in AthenaMT the actual object used is local to the thread. So instead of pointing to it directly we are now using a function to look it up, which will get the thread-local object.
Definition at line 77 of file AsgMessagingForward.h.
|
private |
Definition at line 102 of file OutOfValidityHelper.h.
|
private |
the accessor if we apply one
Definition at line 101 of file OutOfValidityHelper.h.