ATLAS Offline Software
Loading...
Searching...
No Matches
SysHandleArray.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
18namespace CP
19{
24 template <typename HANDLE> class SysHandleArray
26 {
27 public:
28 using iterator = typename std::vector<HANDLE>::iterator;
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(const std::vector<std::string> &values, OWNER *owner);
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>
64 StatusCode initialize(Args &&...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:
115 std::function<HANDLE(const std::string &)> m_makeHandle;
116
117 }; //> end class SysHandleArray<HANDLE>
118} //> end namespace CP
119
120#include "SystematicsHandles/SysHandleArray.icc"
121
122#endif //> !SYSTEMATICS_HANDLES__SYS_HANDLE_ARRAY_H
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.
typename std::vector< SysReadSelectionHandle >::reverse_iterator reverse_iterator
const_reverse_iterator crbegin() const
typename std::vector< SysReadSelectionHandle >::const_reverse_iterator const_reverse_iterator
SysReadSelectionHandle & at(std::size_t idx)
typename std::vector< SysReadSelectionHandle >::iterator iterator
std::function< SysReadSelectionHandle(const std::string &)> m_makeHandle
std::vector< SysReadSelectionHandle > m_handles
const_reverse_iterator crend() const
StatusCode initialize(Args &&...args)
Create and initialize all the sub-handles.
std::size_t size() const noexcept
The number of defined handles.
typename std::vector< SysReadSelectionHandle >::const_iterator const_iterator
SysHandleArray(const std::vector< std::string > &values, OWNER *owner)
Construct the handle directly without declaring a property.
base class to forward messages to another class
Select isolated Photons, Electrons and Muons.
STL namespace.
static AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(EmTauRoI_v1, uint32_t, roiWord, setRoIWord) uint32_t EmTauRoI_v1 const SG::AuxElement::Accessor< std::vector< float > > values("thrValues")
This is a convenience function for accessing the threshold pattern part of the RoI.
#define private