|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef XAOD_VARIABLE_PROXY_LOADERS_H
13 #define XAOD_VARIABLE_PROXY_LOADERS_H
19 #include "TMethodCall.h"
20 #include "TVirtualCollectionProxy.h"
25 #include <unordered_map>
54 return m_acc.isAvailable(*auxElement);
61 if (!auxVectorData || !auxVectorData->
getConstStore())
return false;
64 if (auxVectorData->
size_v() == 0)
return true;
67 if(
ids.find (auxid) !=
ids.end() )
return true;
72 return (
int)
m_acc(*auxElement);
76 return (
double)
m_acc(*auxElement);
80 size_t N = auxVectorData->
size_v();
82 for (
size_t i = 0;
i <
N; ++
i) {
89 size_t N = auxVectorData->
size_v();
91 for (
size_t i = 0;
i <
N; ++
i) {
105 TMethodWrapper(
const std::type_info &elementTypeinfo,
const std::string &methodName);
155 virtual void reset();
158 template<
class TYPE,
class AUX>
159 bool try_type(
const std::string&
varname,
const std::type_info* ti,
const AUX*
data)
const;
164 using accessorCache_t = CxxUtils::ConcurrentStrMap<BaseAccessorWrapper*, CxxUtils::SimpleUpdater>;
206 #endif // XAOD_VARIABLE_PROXY_LOADERS_H
virtual ~TMethodCollectionWrapper()
Helper for thread-safe TMethodCall. Extracted from Type.
virtual bool isValid(const SG::AuxElement *auxElement) const
const SG::IConstAuxStore * getConstStore() const
Return the current store, as a const interface.
char data[hepevt_bytes_allocation_ATLAS]
virtual double getDoubleValue(const SG::AuxElement *auxElement) const
virtual const void * getData(SG::auxid_t auxid) const =0
Return the data vector for one aux data item.
virtual std::vector< int > loadVecIntVariableFromString(const std::string &varname) const
static AuxTypeRegistry & instance()
Return the singleton registry instance.
RootUtils::TSMethodCall m_methodCall ATLAS_THREAD_SAFE
Base class for elements of a container that can have aux data.
virtual ~BaseAccessorWrapper()
virtual double getDoubleValue(const SG::AuxElement *auxElement) const
TMethodCollectionWrapper(const std::type_info &containerTypeinfo, const std::string &methodName)
bool try_type(const std::string &varname, const std::type_info *ti, const AUX *data) const
IProxyLoader::VariableType variableType()
virtual bool isValid(const SG::AuxVectorData *auxVectorData) const =0
Hash map from strings allowing concurrent, lockless reads.
virtual std::vector< int > getVecIntValue(const SG::AuxVectorData *auxVectorData)
virtual double getDoubleValue(const SG::AuxElement *auxElement) const =0
virtual std::vector< double > getVecDoubleValue(const SG::AuxVectorData *auxVectorData)
virtual IProxyLoader::VariableType variableTypeFromString(const std::string &varname) const
void setData(const SG::AuxElement *auxElement)
Helper class to provide constant type-safe access to aux data.
accessorCache_t m_accessorCache ATLAS_THREAD_SAFE
const SG::AuxVectorData * m_auxVectorData
IProxyLoader::VariableType variableType()
virtual bool isValid(const SG::AuxElement *auxElement) const
xAODVectorProxyLoader()=default
virtual std::vector< double > getVecDoubleValue(const SG::AuxVectorData *auxVectorData)
TMethodCollectionWrapper & operator=(const TMethodCollectionWrapper &)=delete
RootUtils::TSMethodCall m_methodCall ATLAS_THREAD_SAFE
Handle mappings between names and auxid_t.
Helper for making a thread-safe function call.
virtual bool isValid(const SG::AuxVectorData *auxVectorData) const
virtual int getIntValue(const SG::AuxElement *auxElement) const
size_t auxid_t
Identifier for a particular aux data item.
virtual bool isValid(const SG::AuxElement *auxElement) const
TMethodCollectionWrapper(const TMethodCollectionWrapper &)=delete
AccessorWrapper(const std::string &elementName)
const SG::AuxElement * m_auxElement
virtual ~TMethodWrapper()
IProxyLoader::VariableType try_all_known_types(const std::string &varname, const AUX *data, bool isVector) const
virtual std::vector< int > loadVecIntVariableFromString(const std::string &varname) const
virtual std::vector< int > getVecIntValue(const SG::AuxVectorData *auxVectorData)
Namespace holding all the expression evaluation code.
virtual double loadDoubleVariableFromString(const std::string &varname) const
TMethodWrapper(const TMethodWrapper &)=delete
virtual int loadIntVariableFromString(const std::string &varname) const
virtual int loadIntVariableFromString(const std::string &varname) const
virtual std::vector< int > getVecIntValue(const SG::AuxVectorData *auxVectorData)=0
TMethodWrapper & operator=(const TMethodWrapper &)=delete
virtual std::vector< double > getVecDoubleValue(const SG::AuxVectorData *auxVectorData)
CxxUtils::ConcurrentStrMap< BaseAccessorWrapper *, CxxUtils::SimpleUpdater > accessorCache_t
TVirtualCollectionProxy * m_collectionProxy
xAODElementProxyLoader()=default
SG::AuxElement::ConstAccessor< T > m_acc
virtual ~AccessorWrapper()
virtual std::vector< int > getVecIntValue(const SG::AuxVectorData *auxVectorData)
virtual double loadDoubleVariableFromString(const std::string &varname) const
Simple (non-deleting) Updater implementation.
xAODProxyLoader & operator=(const xAODProxyLoader &)=delete
virtual std::vector< double > loadVecDoubleVariableFromString(const std::string &varname) const
virtual int getIntValue(const SG::AuxElement *auxElement) const
void setData(const SG::AuxVectorData *auxElement)
virtual IProxyLoader::VariableType variableTypeFromString(const std::string &varname) const
virtual int getIntValue(const SG::AuxElement *auxElement) const =0
virtual double getDoubleValue(const SG::AuxElement *auxElement) const
A set of aux data identifiers.
Manage lookup of vectors of auxiliary data.
virtual std::vector< double > getVecDoubleValue(const SG::AuxVectorData *auxVectorData)=0
Define macros for attributes used to control the static checker.
virtual std::vector< double > loadVecDoubleVariableFromString(const std::string &varname) const
TMethodWrapper(const std::type_info &elementTypeinfo, const std::string &methodName)
virtual bool isValid(const SG::AuxElement *auxElement) const =0
virtual ~xAODProxyLoader()
virtual int getIntValue(const SG::AuxElement *auxElement) const
virtual const SG::auxid_set_t & getAuxIDs() const =0
Return a set of identifiers for existing data items in this store.
virtual size_t size_v() const =0
Return the size of the container.
Base class for elements of a container that can have aux data.
xAODProxyLoader(const xAODProxyLoader &)=delete
Disallow copy construction and assignment.
std::string m_elementName