ATLAS Offline Software
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 
16 #include <memory>
17 
18 class StatusCode;
19 
20 namespace CP
21 {
22  class ISelectionReadAccessor;
23  class SysListHandle;
24  class SystematicSet;
25 
26 
29 
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, const ISysHandleBase& objectHandle);
68  StatusCode initialize (SysListHandle& sysListHandle, const ISysHandleBase& objectHandle, SG::AllowEmptyEnum);
69 
70 
72  public:
73  bool getBool (const SG::AuxElement& element,
75 
77  public:
78  const std::string& getSelectionName() const;
79 
82 
83  public:
84  virtual bool empty () const noexcept override;
85  virtual std::string getNamePattern () const override;
86  virtual CP::SystematicSet
88  virtual StatusCode
90  const CP::SystematicSet& fullAffecting,
91  const std::vector<CP::SystematicSet>& sysList) override;
92 
93 
94 
95  //
96  // private interface
97  //
98 
100  private:
101  std::string m_selection;
102 
104  private:
106 
108  private:
109  std::unique_ptr<ISelectionReadAccessor> m_accessor;
110  };
111 
113 }
114 
116 
117 #endif
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition: SysListHandle.h:33
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
CP::ISystematicsSvc
the interface for the central systematics service
Definition: ISystematicsSvc.h:25
asg::AsgMessagingForward
base class to forward messages to another class
Definition: AsgMessagingForward.h:29
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
AsgMessagingForward.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
CP::SysReadSelectionHandle::getNamePattern
virtual std::string getNamePattern() const override
get the name pattern before substitution
Definition: SysReadSelectionHandle.cxx:76
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::SysReadSelectionHandle::SysReadSelectionHandle
SysReadSelectionHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
Standard constructor.
SysHandleArray.h
SG::AllowEmptyEnum
AllowEmptyEnum
Definition: StoreGate/StoreGate/VarHandleKey.h:29
CP::ISysHandleBase
a basic interface for all systematics handles
Definition: ISysHandleBase.h:28
CP::SysReadSelectionHandle::getBool
bool getBool(const SG::AuxElement &element, const CP::SystematicSet &sys) const
get the selection as a bool
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
SysReadSelectionHandle.icc
CP::SysReadSelectionHandle::m_objectHandle
const ISysHandleBase * m_objectHandle
the object handle we use
Definition: SysReadSelectionHandle.h:105
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
selection
std::string selection
Definition: fbtTestBasics.cxx:73
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ISysHandleBase.h
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:91
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:99
CP::SysReadSelectionHandle::getSelectionName
const std::string & getSelectionName() const
get the name of the selection
Definition: SysReadSelectionHandle.cxx:84
CP::SysReadSelectionHandle::empty
virtual bool empty() const noexcept override
Definition: SysReadSelectionHandle.cxx:68
CP::SysReadSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysReadSelectionHandle.cxx:34
CP::SysReadSelectionHandle
a data handle for reading systematically varied selection properties from objects
Definition: SysReadSelectionHandle.h:32
CP::SysHandleArray< SysReadSelectionHandle >
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
CP::SysReadSelectionHandle::m_accessor
std::unique_ptr< ISelectionReadAccessor > m_accessor
the accessor we use
Definition: SysReadSelectionHandle.h:109
CP::SysReadSelectionHandle::SysReadSelectionHandle
SysReadSelectionHandle(const std::string &selection, T2 *owner)
Construct the handle directly without declaring a property.
AuxElement.h
Base class for elements of a container that can have aux data.
CP::SysReadSelectionHandle::m_selection
std::string m_selection
the selection we use
Definition: SysReadSelectionHandle.h:101
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.