ATLAS Offline Software
Loading...
Searching...
No Matches
OutOfValidityEventHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef SELECTION_HELPERS__OUT_OF_VALIDITY_EVENT_HELPER_H
9#define SELECTION_HELPERS__OUT_OF_VALIDITY_EVENT_HELPER_H
10
15#include <xAODBase/IParticle.h>
16
17class StatusCode;
18
19namespace CP
20{
21 class CorrectionCode;
22
23
24
32
34 {
36 public:
37 template<typename T>
38 OutOfValidityEventHelper (T *owner, const std::string& propertyName = "outOfValidity",
39 const std::string& propertyDescription = "how to handle out of validity results");
40
41
43 public:
44 ::StatusCode initialize ();
45
47 public:
48 ::StatusCode check (const CP::CorrectionCode& code,
49 const char *context) const;
50
51
53 private:
55
61 private:
62 bool m_isInitialized = false;
63 };
64
65
66
67 template<typename T> OutOfValidityEventHelper ::
68 OutOfValidityEventHelper (T *owner, const std::string& propertyName,
69 const std::string& propertyDescription)
70 : asg::AsgMessagingForward (owner)
71 {
72 owner->declareProperty (propertyName, m_action,
73 propertyDescription);
74 }
75}
76
78#define ANA_CHECK_CORRECTION_EVENT(helper,expr) \
79 { if ((helper).check ((expr), #expr).isFailure()) [[unlikely]] \
80 return StatusCode::FAILURE; }
81
82#endif
Base class for elements of a container that can have aux data.
Return value from object correction CP tools.
OutOfValidityEventHelper(T *owner, const std::string &propertyName="outOfValidity", const std::string &propertyDescription="how to handle out of validity results")
standard constructor
::StatusCode initialize()
standard initialize
unsigned m_action
the action to take
::StatusCode check(const CP::CorrectionCode &code, const char *context) const
check the correction code and do the proper thing
bool m_isInitialized
whether we have been initialized
base class to forward messages to another class
AsgMessagingForward(T *owner)
forwarding constructor
Select isolated Photons, Electrons and Muons.
@ ABORT
print an error message and return a failure status code (triggering an abort)
::StatusCode StatusCode
StatusCode definition for legacy code.