ATLAS Offline Software
TypelessConstAccessor.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
4  */
17 #ifndef ATHCONTAINERS_TYPELESSCONSTACCESSOR_H
18 #define ATHCONTAINERS_TYPELESSCONSTACCESSOR_H
19 
20 
25 #include <string>
26 #include <typeinfo>
27 
28 
29 namespace SG {
30 
31 
44 {
45 public:
52  TypelessConstAccessor (const std::string& name);
53 
54 
62  TypelessConstAccessor (const std::type_info& ti,
63  const std::string& name);
64 
65 
73  TypelessConstAccessor (const std::string& name,
74  const std::string& clsname);
75 
76 
85  TypelessConstAccessor (const std::type_info& ti,
86  const std::string& name,
87  const std::string& clsname);
88 
89 
94  template <class ELT>
95  ATH_REQUIRES( IsConstAuxElement<ELT> )
96  const void* operator() (const ELT& e) const;
97 
98 
108  const void* operator() (const AuxVectorData& container, size_t index) const;
109 
110 
116 
117 
122  template <class ELT>
123  ATH_REQUIRES( IsConstAuxElement<ELT> )
124  bool isAvailable (const ELT& e) const;
125 
126 
131 
132 
133 protected:
136 
138  size_t m_eltSize;
139 };
140 
141 
142 } // namespace SG
143 
144 
145 #include "AthContainers/TypelessConstAccessor.icc"
146 
147 
148 #endif // not ATHCONTAINERS_TYPELESSCONSTACCESSOR_H
SG::TypelessConstAccessor::m_eltSize
size_t m_eltSize
Cached element size.
Definition: TypelessConstAccessor.h:138
AuxElementConcepts.h
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
IAuxElement.h
Flag that a class may have auxiliary data associated with it.
index
Definition: index.py:1
taskman.template
dictionary template
Definition: taskman.py:317
SG::TypelessConstAccessor::auxid
SG::auxid_t auxid() const
Return the aux id for this variable.
SG::TypelessConstAccessor
Helper class to provide const generic access to aux data.
Definition: TypelessConstAccessor.h:44
SG::TypelessConstAccessor::TypelessConstAccessor
TypelessConstAccessor(const std::string &name)
Constructor.
ATH_REQUIRES
#define ATH_REQUIRES(...)
Definition: concepts.h:104
SG::TypelessConstAccessor::TypelessConstAccessor
TypelessConstAccessor(const std::string &name, const std::string &clsname)
Constructor.
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
protected
#define protected
Definition: DetDescrConditionsDict_dict_fixes.cxx:14
SG::auxid_t
size_t auxid_t
Identifier for a particular aux data item.
Definition: AuxTypes.h:27
SG::TypelessConstAccessor::TypelessConstAccessor
TypelessConstAccessor(const std::type_info &ti, const std::string &name)
Constructor.
AuxVectorData.h
Manage lookup of vectors of auxiliary data.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
SG::TypelessConstAccessor::TypelessConstAccessor
TypelessConstAccessor(const std::type_info &ti, const std::string &name, const std::string &clsname)
Constructor.
AuxTypes.h
Basic definitions for auxiliary types.
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
SG::TypelessConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
SG::TypelessConstAccessor::getDataArray
const void * getDataArray(const AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
SG::AuxVectorData
Manage lookup of vectors of auxiliary data.
Definition: AuxVectorData.h:167
SG::TypelessConstAccessor::m_auxid
SG::auxid_t m_auxid
The cached auxid.
Definition: TypelessConstAccessor.h:135