8#ifndef SELECTION_HELPERS__OUT_OF_VALIDITY_HELPER_H
9#define SELECTION_HELPERS__OUT_OF_VALIDITY_HELPER_H
78 const std::string& propertyDescription =
"how to handle out of validity results");
89 const char *context)
const;
119 template<
typename T> OutOfValidityHelper ::
120 OutOfValidityHelper (T *owner,
const std::string& propertyName,
121 const std::string& propertyDescription)
124 owner->declareProperty (propertyName,
m_action,
125 propertyDescription);
127 "decoration to set alongside action described by " + propertyName);
132#define ANA_CHECK_CORRECTION(helper,object,expr) \
133 { if (ATH_UNLIKELY((helper).check ((object), (expr), #expr).isFailure())) \
134 return StatusCode::FAILURE; }
Base class for elements of a container that can have aux data.
Return value from object correction CP tools.
bool get(const xAOD::IParticle &particle) const
retrieve the OutOfValidity decision, where true = particle passes validity check
OutOfValidityHelper(T *owner, const std::string &propertyName="outOfValidity", const std::string &propertyDescription="how to handle out of validity results")
standard constructor
::StatusCode initialize()
standard initialize
std::string m_decorationName
the decoration name we use (if we have one)
::StatusCode check(const xAOD::IParticle &particle, const CP::CorrectionCode &code, const char *context) const
check the correction code and do the proper thing
std::unique_ptr< ISelectionWriteAccessor > m_write_accessor
the accessor if we apply one
unsigned m_action
the action to take
bool m_isInitialized
whether we have been initialized
std::unique_ptr< ISelectionReadAccessor > m_read_accessor
base class to forward messages to another class
AsgMessagingForward(T *owner)
forwarding constructor
Class providing the definition of the 4-vector interface.
Select isolated Photons, Electrons and Muons.
OutOfValidityAction
the action to perform on encountering an OutOfValidityRange in OutOfValidityHelper
@ WARNING
print a warning message and return a success status code.
@ SILENT
don't print anything and return success
@ ABORT
print an error message and return a failure status code (triggering an abort)