ATLAS Offline Software
Static Public Member Functions | Public Attributes | List of all members
ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key > Class Template Reference

Particular map which is used to associate names to read handles of AuxElements or AuxVectorBase. More...

Inheritance diagram for ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >:
Collaboration diagram for ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >:

Static Public Member Functions

template<class T >
static T & checkedRef (T *a)
 Return a reference for the given pointer. More...
 
static bool isVector (const std::any &anything)
 Check whether the given any is the "vector" object. More...
 
static bool isElement (const std::any &anything)
 Check whether the given any is the "element" object. More...
 
static T_Element_Key & elementKey (std::any &anything)
 Get a reference to the element object referred to by any or throw an exception. More...
 
static T_Vector_Key & vectorKey (std::any &anything)
 Get a reference to the vector object referred to by any or throw an exception. More...
 
static const T_Element_Key & elementKey (const std::any &anything)
 Get a reference to the element object referred to by any or throw an exception (read only). More...
 
static const T_Vector_Key & vectorKey (const std::any &anything)
 Get a reference to the vector object referred to by any or throw an exception (read only). More...
 

Public Attributes

keys
 STL member. More...
 
elements
 STL member. More...
 

Detailed Description

template<class T_Element_Key, class T_Vector_Key>
class ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >

Particular map which is used to associate names to read handles of AuxElements or AuxVectorBase.

Definition at line 170 of file SGxAODProxyLoader.h.

Member Function Documentation

◆ checkedRef()

template<class T_Element_Key , class T_Vector_Key >
template<class T >
static T& ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::checkedRef ( T *  a)
inlinestatic

Return a reference for the given pointer.

Will throw an exception if the pointer is nullptr.

Definition at line 176 of file SGxAODProxyLoader.h.

176  {
177  if (!a) {
178  std::stringstream msg; msg << "Conversion to " << typeid(T).name() << " failed.";
179  throw std::runtime_error(msg.str());
180  }
181  return *a;
182  }

◆ elementKey() [1/2]

template<class T_Element_Key , class T_Vector_Key >
static const T_Element_Key& ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::elementKey ( const std::any &  anything)
inlinestatic

Get a reference to the element object referred to by any or throw an exception (read only).

Definition at line 193 of file SGxAODProxyLoader.h.

193 { return checkedRef(std::any_cast<T_Element_Key>(&anything)); }

◆ elementKey() [2/2]

template<class T_Element_Key , class T_Vector_Key >
static T_Element_Key& ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::elementKey ( std::any &  anything)
inlinestatic

Get a reference to the element object referred to by any or throw an exception.

Definition at line 189 of file SGxAODProxyLoader.h.

189 { return checkedRef(std::any_cast<T_Element_Key>(&anything)); }

◆ isElement()

template<class T_Element_Key , class T_Vector_Key >
static bool ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::isElement ( const std::any &  anything)
inlinestatic

Check whether the given any is the "element" object.

Definition at line 187 of file SGxAODProxyLoader.h.

187 { return anything.type() == typeid(T_Element_Key); }

◆ isVector()

template<class T_Element_Key , class T_Vector_Key >
static bool ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::isVector ( const std::any &  anything)
inlinestatic

Check whether the given any is the "vector" object.

Definition at line 185 of file SGxAODProxyLoader.h.

185 { return anything.type() == typeid(T_Vector_Key); }

◆ vectorKey() [1/2]

template<class T_Element_Key , class T_Vector_Key >
static const T_Vector_Key& ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::vectorKey ( const std::any &  anything)
inlinestatic

Get a reference to the vector object referred to by any or throw an exception (read only).

Definition at line 195 of file SGxAODProxyLoader.h.

195 { return checkedRef(std::any_cast<T_Vector_Key>(&anything)); }

◆ vectorKey() [2/2]

template<class T_Element_Key , class T_Vector_Key >
static T_Vector_Key& ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl< T_Element_Key, T_Vector_Key >::vectorKey ( std::any &  anything)
inlinestatic

Get a reference to the vector object referred to by any or throw an exception.

Definition at line 191 of file SGxAODProxyLoader.h.

191 { return checkedRef(std::any_cast<T_Vector_Key>(&anything)); }

Member Data Documentation

◆ elements

T std::unordered_map< K, T >::elements
inherited

STL member.

◆ keys

K std::unordered_map< K, T >::keys
inherited

STL member.


The documentation for this class was generated from the following file:
ExpressionParsing::SGxAODProxyLoader::ReadHandleMapTmpl::checkedRef
static T & checkedRef(T *a)
Return a reference for the given pointer.
Definition: SGxAODProxyLoader.h:176
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
a
TList * a
Definition: liststreamerinfos.cxx:10
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35