ATLAS Offline Software
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 
16 #include <memory>
17 
18 class StatusCode;
19 
20 namespace CP
21 {
22  class ISelectionWriteAccessor;
23  class SysListHandle;
24  class SystematicSet;
25 
26 
29 
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, const ISysHandleBase& objectHandle);
53  StatusCode initialize (SysListHandle& sysListHandle, const ISysHandleBase& objectHandle, SG::AllowEmptyEnum);
54 
55 
57  public:
58  void setBits (const SG::AuxElement& element,
61 
63  public:
64  void setBool (const SG::AuxElement& element,
65  bool selection,
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 std::string getNamePattern () const override;
84  virtual CP::SystematicSet
86  virtual StatusCode
88  const CP::SystematicSet& fullAffecting,
89  const std::vector<CP::SystematicSet>& sysList) override;
90 
91 
92 
93  //
94  // private interface
95  //
96 
98  private:
99  std::string m_selection;
100 
102  private:
104 
106  private:
107  std::unique_ptr<ISelectionWriteAccessor> m_accessor;
108  };
109 }
110 
112 
113 #endif
CP::SysWriteSelectionHandle::setBits
void setBits(const SG::AuxElement &element, SelectionType selection, const CP::SystematicSet &sys) const
set the selection decoration
CP::SysWriteSelectionHandle::getNamePattern
virtual std::string getNamePattern() const override
get the name pattern before substitution
Definition: SysWriteSelectionHandle.cxx:92
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::SysWriteSelectionHandle::getSelection
const std::string & getSelection() const
get the actual selection string
Definition: SysWriteSelectionHandle.cxx:84
CP::SelectionType
uint32_t SelectionType
the type for selection decorations that are meant to hold a asg::AcceptData
Definition: SelectionHelpers.h:26
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
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
CP::SysWriteSelectionHandle::setBool
void setBool(const SG::AuxElement &element, bool selection, const CP::SystematicSet &sys) const
set the selection decoration
CP::SysWriteSelectionHandle::getLabel
std::string getLabel() const
get the name/label of the decoration
Definition: SysWriteSelectionHandle.cxx:76
SG::AllowEmptyEnum
AllowEmptyEnum
Definition: StoreGate/StoreGate/VarHandleKey.h:29
CP::SysWriteSelectionHandle::empty
virtual bool empty() const noexcept override
Definition: SysWriteSelectionHandle.cxx:68
CP::ISysHandleBase
a basic interface for all systematics handles
Definition: ISysHandleBase.h:28
CP::SysWriteSelectionHandle::m_objectHandle
const ISysHandleBase * m_objectHandle
the object handle we use
Definition: SysWriteSelectionHandle.h:103
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
CP::SysWriteSelectionHandle::m_selection
std::string m_selection
the selection we use
Definition: SysWriteSelectionHandle.h:99
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
selection
std::string selection
Definition: fbtTestBasics.cxx:73
SysWriteSelectionHandle.icc
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
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:110
ISysHandleBase.h
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:102
CP::SysWriteSelectionHandle::m_accessor
std::unique_ptr< ISelectionWriteAccessor > m_accessor
the accessor we use
Definition: SysWriteSelectionHandle.h:107
ISelectionWriteAccessor.h
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
CP::SysWriteSelectionHandle
a data handle for writing systematically varied selection properties from objects
Definition: SysWriteSelectionHandle.h:32
AuxElement.h
Base class for elements of a container that can have aux data.
CP::SysWriteSelectionHandle::SysWriteSelectionHandle
SysWriteSelectionHandle(T2 *owner, const std::string &propertyName, const std::string &propertyValue, const std::string &propertyDescription)
standard constructor
CP::SysWriteSelectionHandle::initialize
StatusCode initialize(SysListHandle &sysListHandle, const ISysHandleBase &objectHandle)
initialize the accessor
Definition: SysWriteSelectionHandle.cxx:34
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.