ATLAS Offline Software
Loading...
Searching...
No Matches
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.
static bool isVector (const std::any &anything)
 Check whether the given any is the "vector" object.
static bool isElement (const std::any &anything)
 Check whether the given any is the "element" object.
static T_Element_Key & elementKey (std::any &anything)
 Get a reference to the element object referred to by any or throw an exception.
static T_Vector_Key & vectorKey (std::any &anything)
 Get a reference to the vector object referred to by any or throw an exception.
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).
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).

Public Attributes

keys
 STL member.
elements
 STL member.

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>
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 }
Particular map which is used to associate names to read handles of AuxElements or AuxVectorBase.

◆ elementKey() [1/2]

template<class T_Element_Key, class T_Vector_Key>
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.

static T & checkedRef(T *a)
Return a reference for the given pointer.

◆ elementKey() [2/2]

template<class T_Element_Key, class T_Vector_Key>
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.

◆ isElement()

template<class T_Element_Key, class T_Vector_Key>
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>
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>
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.

◆ vectorKey() [2/2]

template<class T_Element_Key, class T_Vector_Key>
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.

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: