ATLAS Offline Software
Public Member Functions | Protected Member Functions | List of all members
pool::ITechnologySpecificAttributes Class Referenceabstract

#include <PersistencySvc/ITechnologySpecificAttributes.h>

Inheritance diagram for pool::ITechnologySpecificAttributes:
Collaboration diagram for pool::ITechnologySpecificAttributes:

Public Member Functions

template<class T >
attribute (const std::string &attributeName, const std::string &option="")
 Templated method to retrieve an attribute. More...
 
template<class T >
bool setAttribute (const std::string &attributeName, const T &atttibuteValue, const std::string &option="")
 Templated method to set an attribute. More...
 

Protected Member Functions

virtual ~ITechnologySpecificAttributes ()
 Default destructor. More...
 
virtual bool attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)=0
 The actual method returning the attribute data given a name. More...
 
virtual bool setAttributeOfType (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)=0
 The actual method setting the attribute data given a name. More...
 

Detailed Description

ITechnologySpecificAttributes is the interface for an object holding technology-specific attributes

Definition at line 22 of file ITechnologySpecificAttributes.h.

Constructor & Destructor Documentation

◆ ~ITechnologySpecificAttributes()

virtual pool::ITechnologySpecificAttributes::~ITechnologySpecificAttributes ( )
inlineprotectedvirtual

Default destructor.

Definition at line 52 of file ITechnologySpecificAttributes.h.

52 {}

Member Function Documentation

◆ attribute()

template<class T >
T pool::ITechnologySpecificAttributes::attribute ( const std::string &  attributeName,
const std::string &  option = "" 
)
inline

Templated method to retrieve an attribute.

Definition at line 25 of file ITechnologySpecificAttributes.h.

26  {
27  T data;
28  const std::type_info& typeInfo = typeid(T);
29  if ( ! this->attributeOfType( attributeName,
30  static_cast< void* >( &data ),
31  typeInfo,
32  option ) ) {
33  std::ostringstream error;
34  error << "Failed to retrieve attribute " << attributeName << " of type " << typeInfo.name();
35  throw std::runtime_error( error.str() + " (APR: \" ITechnologySpecificAttributes \" from \" PersistencySvc \")");
36  }
37  return data;
38  }

◆ attributeOfType()

virtual bool pool::ITechnologySpecificAttributes::attributeOfType ( const std::string &  attributeName,
void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
protectedpure virtual

The actual method returning the attribute data given a name.

Implemented in pool::PersistencySvc::UserDatabase, pool::PersistencySvc::MicroSessionManager, and pool::PersistencySvc::Container.

◆ setAttribute()

template<class T >
bool pool::ITechnologySpecificAttributes::setAttribute ( const std::string &  attributeName,
const T &  atttibuteValue,
const std::string &  option = "" 
)
inline

Templated method to set an attribute.

Definition at line 41 of file ITechnologySpecificAttributes.h.

43  {
44  return this->setAttributeOfType( attributeName,
45  static_cast< const void* >( &atttibuteValue ),
46  typeid(T),
47  option );
48  }

◆ setAttributeOfType()

virtual bool pool::ITechnologySpecificAttributes::setAttributeOfType ( const std::string &  attributeName,
const void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
protectedpure virtual

The actual method setting the attribute data given a name.

Implemented in pool::PersistencySvc::UserDatabase, pool::PersistencySvc::MicroSessionManager, and pool::PersistencySvc::Container.


The documentation for this class was generated from the following file:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
pool::ITechnologySpecificAttributes::setAttributeOfType
virtual bool setAttributeOfType(const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option)=0
The actual method setting the attribute data given a name.
pool::ITechnologySpecificAttributes::attributeOfType
virtual bool attributeOfType(const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option)=0
The actual method returning the attribute data given a name.
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35