ATLAS Offline Software
SysListHandle.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 SYSTEMATICS_HANDLES__SYS_LIST_HANDLE_H
9 #define SYSTEMATICS_HANDLES__SYS_LIST_HANDLE_H
10 
17 #include <functional>
18 #include <string>
19 #include <vector>
20 
21 class StatusCode;
22 
23 namespace CP
24 {
25  class IReentrantSystematicsTool;
26  class ISysHandleBase;
27  class SystematicSet;
28 
31 
33  {
34  //
35  // public interface
36  //
37 
39  public:
40  template<typename T>
41  SysListHandle (T *owner, const std::string& propertyName = "systematicsService",
42  const std::string& propertyDescription = "systematics to evaluate");
43 
44 
52  public:
54 
55 
65  public:
66  StatusCode addSystematics (const CP::SystematicSet& recommended,
67  const CP::SystematicSet& affecting);
70 
71 
76  public:
78 
79 
81  public:
82  bool isInitialized () const noexcept;
83 
84 
86  public:
88 
89 
104  public:
106 
107 
130  public:
131  [[deprecated("please use systematicsVector() instead")]]
133  (const std::function<StatusCode(const CP::SystematicSet&)>& func) const;
134 
135 
136 
137  //
138  // private interface
139  //
140 
142  private:
144 
146  private:
147  std::string m_affectingFilter;
148 
150  private:
151  std::vector<ISysHandleBase*> m_sysHandles;
152 
154  private:
156 
158  private:
159  std::vector<CP::SystematicSet> m_systematicsVector;
160 
162  private:
163  bool m_isInitialized = false;
164 
165  private:
167  };
168 }
169 
170 #include "SysListHandle.icc"
171 
172 #endif
PropertyWrapper.h
CP::SysListHandle::addHandle
StatusCode addHandle(ISysHandleBase &handle)
register an input handle we are using
Definition: SysListHandle.cxx:29
CP::SysListHandle
a class managing the property to configure the list of systematics to process
Definition: SysListHandle.h:33
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::SysListHandle::m_isInitialized
bool m_isInitialized
the value of isInitialized
Definition: SysListHandle.h:163
SystematicSet.h
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
CP::SysListHandle::addSystematics
StatusCode addSystematics(const CP::SystematicSet &recommended, const CP::SystematicSet &affecting)
register a set of affecting variables for the current algorithm (usually obtained from an CP::ISystem...
Definition: SysListHandle.cxx:48
AsgMessagingForward.h
CP::SysListHandle::systematicsVector
const std::vector< CP::SystematicSet > & systematicsVector() const
the list of systematics to loop over
Definition: SysListHandle.cxx:96
CP::SysListHandle::isInitialized
bool isInitialized() const noexcept
whether initialize has been called successfully
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
ISystematicsSvc.h
CP::SysListHandle::m_systematicsVector
std::vector< CP::SystematicSet > m_systematicsVector
the value of systematicsVector
Definition: SysListHandle.h:159
CP::ISysHandleBase
a basic interface for all systematics handles
Definition: ISysHandleBase.h:28
CP::SysListHandle::initialize
::StatusCode initialize()
intialize this property
Definition: SysListHandle.cxx:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
SysListType.h
CP::SysListHandle::m_systematicsService
ServiceHandle< ISystematicsSvc > m_systematicsService
the handle for the systematics service
Definition: SysListHandle.h:143
CP::SysListHandle::m_affecting
CP::SystematicSet m_affecting
this set of affecting systematics
Definition: SysListHandle.h:155
CP::SysListHandle::m_affectingFilter
std::string m_affectingFilter
an (optional) filter to remove affecting systematics
Definition: SysListHandle.h:147
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ServiceHandle.h
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
runJobs.deprecated
deprecated
Definition: runJobs.py:191
CP::IReentrantSystematicsTool
interface for all CP tools supporting systematic variations within a reentrant algorithm
Definition: IReentrantSystematicsTool.h:58
CP::SysListHandle::SysListHandle
SysListHandle(T *owner, const std::string &propertyName="systematicsService", const std::string &propertyDescription="systematics to evaluate")
standard constructor
SysListHandle.icc
CP::SysListHandle::fillSystematicsVector
StatusCode fillSystematicsVector()
Definition: SysListHandle.cxx:105
CP::SysListHandle::m_sysHandles
std::vector< ISysHandleBase * > m_sysHandles
the list of systematics handles we have
Definition: SysListHandle.h:151
CP::SysListHandle::service
const ISystematicsSvc & service() const
the service we use
ServiceHandle
Definition: ClusterMakerTool.h:37
CP::SysListHandle::foreach
StatusCode foreach(const std::function< StatusCode(const CP::SystematicSet &)> &func) const
run the function for each systematic
Definition: SysListHandle.cxx:127