ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
SelectionHelpers
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
11
#include <
AsgMessaging/AsgMessagingForward.h
>
12
#include <
AthContainers/AuxElement.h
>
13
#include <
SelectionHelpers/ISelectionWriteAccessor.h
>
14
#include <
SelectionHelpers/OutOfValidityHelper.h
>
15
#include <
xAODBase/IParticle.h
>
16
17
class
StatusCode
;
18
19
namespace
CP
20
{
21
class
CorrectionCode
;
22
23
24
32
33
class
OutOfValidityEventHelper
final :
public
asg::AsgMessagingForward
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
:
54
unsigned
m_action
{
unsigned
(
OutOfValidityAction::ABORT
)};
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
AsgMessagingForward.h
AuxElement.h
Base class for elements of a container that can have aux data.
IParticle.h
ISelectionWriteAccessor.h
OutOfValidityHelper.h
CP::CorrectionCode
Return value from object correction CP tools.
Definition
CorrectionCode.h:31
CP::OutOfValidityEventHelper::OutOfValidityEventHelper
OutOfValidityEventHelper(T *owner, const std::string &propertyName="outOfValidity", const std::string &propertyDescription="how to handle out of validity results")
standard constructor
Definition
OutOfValidityEventHelper.h:68
CP::OutOfValidityEventHelper::initialize
::StatusCode initialize()
standard initialize
Definition
OutOfValidityEventHelper.cxx:25
CP::OutOfValidityEventHelper::m_action
unsigned m_action
the action to take
Definition
OutOfValidityEventHelper.h:54
CP::OutOfValidityEventHelper::check
::StatusCode check(const CP::CorrectionCode &code, const char *context) const
check the correction code and do the proper thing
Definition
OutOfValidityEventHelper.cxx:33
CP::OutOfValidityEventHelper::m_isInitialized
bool m_isInitialized
whether we have been initialized
Definition
OutOfValidityEventHelper.h:62
asg::AsgMessagingForward
base class to forward messages to another class
Definition
AsgMessagingForward.h:29
asg::AsgMessagingForward::AsgMessagingForward
AsgMessagingForward(T *owner)
forwarding constructor
Definition
AsgMessagingForward.h:83
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::OutOfValidityAction::ABORT
@ ABORT
print an error message and return a failure status code (triggering an abort)
Definition
OutOfValidityHelper.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
asg
Definition
DataHandleTestTool.h:28
xAOD::unsigned
unsigned
Definition
RingSetConf_v1.cxx:656
Generated on
for ATLAS Offline Software by
1.17.0