ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
Algorithms
SelectionHelpers
SelectionHelpers
SysWriteSelectionHandle.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
8
#ifndef SYS_SELECTION_HELPERS_SELECTION_WRITE_HANDLE_H
9
#define SYS_SELECTION_HELPERS_SELECTION_WRITE_HANDLE_H
10
11
#include <
AsgDataHandles/VarHandleKey.h
>
12
#include <
AthContainers/AuxElement.h
>
13
#include <
AsgMessaging/AsgMessagingForward.h
>
14
#include <
SelectionHelpers/ISelectionWriteAccessor.h
>
15
#include <
SystematicsHandles/ISysHandleBase.h
>
16
#include <memory>
17
18
class
StatusCode
;
19
20
namespace
CP
21
{
22
class
ISelectionWriteAccessor
;
23
class
SysListHandle
;
24
class
SystematicSet
;
25
26
29
30
class
SysWriteSelectionHandle
final
31
:
public
ISysHandleBase
,
public
asg::AsgMessagingForward
32
{
33
//
34
// public interface
35
//
36
38
public
:
39
template
<
typename
T2>
40
SysWriteSelectionHandle
(T2 *owner,
const
std::string& propertyName,
41
const
std::string& propertyValue,
42
const
std::string& propertyDescription);
43
44
46
public
:
47
explicit
operator
bool
()
const
noexcept;
48
49
51
public:
52
StatusCode
initialize
(
SysListHandle
& sysListHandle,
ISysObjectHandleBase
& objectHandle);
53
StatusCode
initialize
(
SysListHandle
& sysListHandle,
ISysObjectHandleBase
& objectHandle,
SG
::AllowEmptyEnum);
54
55
57
public:
58
void
setBits
(
const
SG
::AuxElement& element,
59
SelectionType
selection
,
60
const
CP
::
SystematicSet
& sys)
const
;
61
63
public:
64
void
setBool
(
const
SG
::AuxElement& element,
65
bool
selection
,
66
const
CP
::
SystematicSet
& sys)
const
;
67
69
public:
70
std
::
string
getLabel
()
const
;
71
73
public:
74
const
std
::
string
&
getSelection
()
const
;
75
76
77
80
81
public:
82
virtual
bool
empty
()
const
noexcept override;
83
virtual
CP
::
SystematicSet
84
getInputAffecting
(
const
ISystematicsSvc
& svc)
const
override;
85
virtual StatusCode
86
fillSystematics
(
const
ISystematicsSvc
& svc,
87
const
CP
::
SystematicSet
& fullAffecting,
88
const
std
::
vector
<
CP
::
SystematicSet
>& sysList) override;
89
90
91
92
//
93
// private interface
94
//
95
97
private
:
98
std
::
string
m_selection
;
99
101
private
:
102
ISysObjectHandleBase
*
m_objectHandle
{
nullptr
};
103
105
private
:
106
std::unique_ptr<ISelectionWriteAccessor>
m_accessor
;
107
};
108
}
109
110
#include "
SysWriteSelectionHandle.icc
"
111
112
#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.
ISelectionWriteAccessor.h
ISysHandleBase.h
SysWriteSelectionHandle.icc
CP::ISelectionWriteAccessor
a specialized accessor to write a selection decoration to an xAOD object
Definition
ISelectionWriteAccessor.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::SysListHandle
a class managing the property to configure the list of systematics to process
Definition
SysListHandle.h:33
CP::SysWriteSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, ISysObjectHandleBase &objectHandle)
initialize the accessor
Definition
SysWriteSelectionHandle.cxx:34
CP::SysWriteSelectionHandle::getLabel
std::string getLabel() const
get the name/label of the decoration
Definition
SysWriteSelectionHandle.cxx:76
CP::SysWriteSelectionHandle::getSelection
const std::string & getSelection() const
get the actual selection string
Definition
SysWriteSelectionHandle.cxx:84
CP::SysWriteSelectionHandle::getInputAffecting
virtual CP::SystematicSet getInputAffecting(const ISystematicsSvc &svc) const override
get the affecting systematics if this is an input handle
Definition
SysWriteSelectionHandle.cxx:92
CP::SysWriteSelectionHandle::m_objectHandle
ISysObjectHandleBase * m_objectHandle
the object handle we use
Definition
SysWriteSelectionHandle.h:102
CP::SysWriteSelectionHandle::m_selection
std::string m_selection
the selection we use
Definition
SysWriteSelectionHandle.h:98
CP::SysWriteSelectionHandle::m_accessor
std::unique_ptr< ISelectionWriteAccessor > m_accessor
the accessor we use
Definition
SysWriteSelectionHandle.h:106
CP::SysWriteSelectionHandle::setBool
void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet &sys) const
set the selection decoration
CP::SysWriteSelectionHandle::empty
virtual bool empty() const noexcept override
Definition
SysWriteSelectionHandle.cxx:68
CP::SysWriteSelectionHandle::SysWriteSelectionHandle
SysWriteSelectionHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
standard constructor
CP::SysWriteSelectionHandle::fillSystematics
virtual StatusCode fillSystematics(const ISystematicsSvc &svc, const CP::SystematicSet &fullAffecting, const std::vector< CP::SystematicSet > &sysList) override
register and cache the systematics
Definition
SysWriteSelectionHandle.cxx:100
CP::SysWriteSelectionHandle::setBits
void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet &sys) const
set the selection decoration
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::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition
SelectionHelpers.h:26
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