ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
SelectionHelpers
SysReadSelectionHandle.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
#ifndef SYS_SELECTION_HELPERS_SELECTION_READ_HANDLE_H
9
#define SYS_SELECTION_HELPERS_SELECTION_READ_HANDLE_H
10
11
#include <
AsgDataHandles/VarHandleKey.h
>
12
#include <
AthContainers/AuxElement.h
>
13
#include <
AsgMessaging/AsgMessagingForward.h
>
14
#include <
SystematicsHandles/ISysHandleBase.h
>
15
#include <
SystematicsHandles/SysHandleArray.h
>
16
#include <memory>
17
18
class
StatusCode
;
19
20
namespace
CP
21
{
22
class
ISelectionReadAccessor
;
23
class
SysListHandle
;
24
class
SystematicSet
;
25
26
29
30
class
SysReadSelectionHandle
final
31
:
public
ISysHandleBase
,
public
asg::AsgMessagingForward
32
{
33
//
34
// public interface
35
//
36
49
public
:
50
template
<
typename
T2>
51
SysReadSelectionHandle
(T2 *owner,
const
std::string& propertyName,
52
const
std::string& propertyValue,
53
const
std::string& propertyDescription);
54
56
template
<
typename
T2>
57
SysReadSelectionHandle
(
const
std::string&
selection
, T2 *owner);
58
59
61
public
:
62
explicit
operator
bool
()
const
noexcept;
63
64
66
public:
67
StatusCode
initialize
(
SysListHandle
& sysListHandle,
ISysObjectHandleBase
& objectHandle);
68
StatusCode
initialize
(
SysListHandle
& sysListHandle,
ISysObjectHandleBase
& objectHandle,
SG
::AllowEmptyEnum);
69
70
72
public:
73
bool
getBool
(
const
SG
::AuxElement& element,
74
const
CP
::
SystematicSet
& sys)
const
;
75
77
public:
78
const
std
::
string
&
getSelectionName
()
const
;
79
82
83
public:
84
virtual
bool
empty
()
const
noexcept override;
85
virtual
CP
::
SystematicSet
86
getInputAffecting
(
const
ISystematicsSvc
& svc)
const
override;
87
virtual StatusCode
88
fillSystematics
(
const
ISystematicsSvc
& svc,
89
const
CP
::
SystematicSet
& fullAffecting,
90
const
std
::
vector
<
CP
::
SystematicSet
>& sysList) override;
91
92
93
94
//
95
// private interface
96
//
97
99
private
:
100
std
::
string
m_selection
;
101
103
private
:
104
ISysObjectHandleBase
*
m_objectHandle
{
nullptr
};
105
107
private
:
108
std::unique_ptr<ISelectionReadAccessor>
m_accessor
;
109
};
110
111
using
SysReadSelectionHandleArray
=
SysHandleArray<SysReadSelectionHandle>
;
112
}
113
114
#include "
SysReadSelectionHandle.icc
"
115
116
#endif
AsgMessagingForward.h
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
AuxElement.h
Base class for elements of a container that can have aux data.
ISysHandleBase.h
SysHandleArray.h
SysReadSelectionHandle.icc
CP::ISelectionReadAccessor
a specialized accessor to read a selection decoration from/to an xAOD object
Definition
ISelectionReadAccessor.h:40
CP::ISysHandleBase
a basic interface for all systematics handles
Definition
ISysHandleBase.h:28
CP::ISysObjectHandleBase
a ISysHandleBase for a handle to a specific object/container
Definition
ISysHandleBase.h:58
CP::ISystematicsSvc
the interface for the central systematics service
Definition
ISystematicsSvc.h:26
CP::SysHandleArray
Vector-like class for systematic handles which interact with decorations.
Definition
SysHandleArray.h:26
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition
SysListHandle.h:33
CP::SysReadSelectionHandle::getInputAffecting
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc) const override
get the affecting systematics if this is an input handle
Definition
SysReadSelectionHandle.cxx:81
CP::SysReadSelectionHandle::m_accessor
std::unique_ptr< ISelectionReadAccessor > m_accessor
the accessor we use
Definition
SysReadSelectionHandle.h:108
CP::SysReadSelectionHandle::m_selection
std::string m_selection
the selection we use
Definition
SysReadSelectionHandle.h:100
CP::SysReadSelectionHandle::getBool
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
CP::SysReadSelectionHandle::SysReadSelectionHandle
SysReadSelectionHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
Standard constructor.
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, ISysObjectHandleBase &objectHandle)
initialize the accessor
Definition
SysReadSelectionHandle.cxx:34
CP::SysReadSelectionHandle::getSelectionName
const std::string & getSelectionName() const
get the name of the selection
Definition
SysReadSelectionHandle.cxx:74
CP::SysReadSelectionHandle::SysReadSelectionHandle
SysReadSelectionHandle(const std::string &selection, T2 *owner)
Construct the handle directly without declaring a property.
CP::SysReadSelectionHandle::m_objectHandle
ISysObjectHandleBase * m_objectHandle
the object handle we use
Definition
SysReadSelectionHandle.h:104
CP::SysReadSelectionHandle::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList) override
register and cache the systematics
Definition
SysReadSelectionHandle.cxx:89
CP::SysReadSelectionHandle::empty
virtual bool empty() const noexcept override
Definition
SysReadSelectionHandle.cxx:68
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition
SystematicSet.h:31
asg::AsgMessagingForward
base class to forward messages to another class
Definition
AsgMessagingForward.h:29
vector
Definition
MultiHisto.h:13
selection
const std::string selection
Definition
fbtTestBasics.cxx:75
const
CP
Select isolated Photons, Electrons and Muons.
Definition
Control/xAODRootAccess/xAODRootAccess/TEvent.h:27
CP::SysReadSelectionHandleArray
SysHandleArray< SysReadSelectionHandle > SysReadSelectionHandleArray
Definition
SysReadSelectionHandle.h:111
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
std
STL namespace.
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition
TrigDecision_v1.cxx:60
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0