ATLAS Offline Software
SysHandleArray.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #ifndef SYSTEMATICS_HANDLES__SYS_HANDLE_ARRAY_H
8 #define SYSTEMATICS_HANDLES__SYS_HANDLE_ARRAY_H
9 
15 #include <string>
16 #include <vector>
17 
18 namespace CP
19 {
24  template <typename HANDLE> class SysHandleArray
26  {
27  public:
29  using const_iterator = typename std::vector<HANDLE>::const_iterator;
30  using reverse_iterator = typename std::vector<HANDLE>::reverse_iterator;
31  using const_reverse_iterator = typename std::vector<HANDLE>::const_reverse_iterator;
32 
39  template <typename OWNER>
40  SysHandleArray(OWNER *owner, const std::vector<std::string> &values);
41 
50  template <typename OWNER>
52  OWNER *owner,
53  const std::string &propertyName,
54  const std::vector<std::string> &propertyValue,
55  const std::string &propertyDescription);
56 
63  template <typename... Args>
65 
67  std::size_t size() const noexcept;
74  bool empty() const noexcept;
75 
82  HANDLE &at(std::size_t idx);
89  const HANDLE &at(std::size_t idx) const;
90 
92 
109 
110  private:
113  std::vector<std::string> m_decorNames;
114  std::vector<HANDLE> m_handles;
115 
116  }; //> end class SysHandleArray<HANDLE>
117 } //> end namespace CP
118 
119 #include "SystematicsHandles/SysHandleArray.icc"
120 
121 #endif //> !SYSTEMATICS_HANDLES__SYS_HANDLE_ARRAY_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
asg::AsgMessagingForward
base class to forward messages to another class
Definition: AsgMessagingForward.h:29
CP::SysHandleArray::SysHandleArray
SysHandleArray(OWNER *owner, const std::vector< std::string > &values)
Construct the handle directly without declaring a property.
CP::SysHandleArray::end
iterator end()
SysListHandle.h
CP::SysHandleArray::crend
const_reverse_iterator crend() const
CP::SysHandleArray::initialize
StatusCode initialize(Args &&...args)
Create and initialize all the sub-handles.
CP::SysHandleArray::rbegin
reverse_iterator rbegin()
CP::SysHandleArray::requireInitialized
void requireInitialized() const
Throw a std::logic_error if the handle has not been initialized.
SystematicSet.h
CP::SysHandleArray::rend
reverse_iterator rend()
AsgMessagingForward.h
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Args
Definition: test_lwtnn_fastgraph.cxx:12
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
python.Bindings.values
values
Definition: Control/AthenaPython/python/Bindings.py:805
CP::SysHandleArray< SysReadSelectionHandle >::reverse_iterator
typename std::vector< SysReadSelectionHandle >::reverse_iterator reverse_iterator
Definition: SysHandleArray.h:30
CP::SysHandleArray< SysReadSelectionHandle >::const_reverse_iterator
typename std::vector< SysReadSelectionHandle >::const_reverse_iterator const_reverse_iterator
Definition: SysHandleArray.h:31
CP::SysHandleArray::cbegin
const_iterator cbegin() const
CP::SysHandleArray::m_handles
std::vector< HANDLE > m_handles
Definition: SysHandleArray.h:114
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
CP::SysHandleArray::empty
bool empty() const noexcept
Whether any sub-handles are defined.
CP::SysHandleArray::size
std::size_t size() const noexcept
The number of defined handles.
CP::SysHandleArray::cend
const_iterator cend() const
CP::SysHandleArray< SysReadSelectionHandle >::iterator
typename std::vector< SysReadSelectionHandle >::iterator iterator
Definition: SysHandleArray.h:28
StatusCode.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ISysHandleBase.h
CP::SysHandleArray::begin
iterator begin()
Standard vector iterator interface.
CP::SysHandleArray< SysReadSelectionHandle >::const_iterator
typename std::vector< SysReadSelectionHandle >::const_iterator const_iterator
Definition: SysHandleArray.h:29
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
CP::SysHandleArray::crbegin
const_reverse_iterator crbegin() const
CP::SysHandleArray
Vector-like class for systematic handles which interact with decorations.
Definition: SysHandleArray.h:26
CP::SysHandleArray::at
HANDLE & at(std::size_t idx)
Retrieve the handle at the specified index.
CP::SysHandleArray::SysHandleArray
SysHandleArray(OWNER *owner, const std::string &propertyName, const std::vector< std::string > &propertyValue, const std::string &propertyDescription)
Declare the handle as a property on its parent.
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
CP::SysHandleArray::m_decorNames
std::vector< std::string > m_decorNames
Definition: SysHandleArray.h:113