ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
pool::PersistencySvc::Container Class Reference

#include <Container.h>

Inheritance diagram for pool::PersistencySvc::Container:
Collaboration diagram for pool::PersistencySvc::Container:

Public Member Functions

 Container (FileDescriptor &fileDescriptor, IStorageExplorer &storageExplorer, long technology, const std::string &name)
 
 ~Container ()
 destructor More...
 
virtual const std::string & parentDatabaseName () const override
 Returns the name (fid) of the parent database. More...
 
virtual long technology () const override
 Returns the technology identifier for this container. More...
 
virtual ITokenIteratortokens (const std::string &selection) override
 Starts an iteration over the tokens in the container. More...
 
virtual const ITechnologySpecificAttributestechnologySpecificAttributes () const override
 Returns the object holding the technology specific attributes for a given technology domain. More...
 
virtual ITechnologySpecificAttributestechnologySpecificAttributes () override
 
const std::string & name () const
 Returns the name of this container. More...
 
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 bool attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) override
 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) override
 The actual method setting the attribute data given a name. More...
 

Private Attributes

FileDescriptorm_fileDescriptor
 Reference to file descriptor of the parent database. More...
 
IStorageExplorerm_storageExplorer
 Reference to the storage explorer. More...
 
long m_technology
 The technology identifier. More...
 
std::string m_name
 The name of the container. More...
 

Detailed Description

Container is an implementation of the IContainer interface

Definition at line 26 of file Container.h.

Constructor & Destructor Documentation

◆ Container()

pool::PersistencySvc::Container::Container ( FileDescriptor fileDescriptor,
IStorageExplorer storageExplorer,
long  technology,
const std::string &  name 
)

◆ ~Container()

pool::PersistencySvc::Container::~Container ( )

destructor

Member Function Documentation

◆ attribute()

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

Templated method to retrieve an attribute.

Definition at line 37 of file ITechnologySpecificAttributes.h.

38  {
39  T data;
40  const std::type_info& typeInfo = typeid(T);
41  if ( ! this->attributeOfType( attributeName,
42  static_cast< void* >( &data ),
43  typeInfo,
44  option ) ) {
45  std::ostringstream error;
46  error << "Failed to retrieve attribute " << attributeName << " of type " << typeInfo.name();
47  throw Exception( error.str() );
48  }
49  return data;
50  }

◆ attributeOfType()

virtual bool pool::PersistencySvc::Container::attributeOfType ( const std::string &  attributeName,
void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
overrideprotectedvirtual

The actual method returning the attribute data given a name.

Implements pool::ITechnologySpecificAttributes.

◆ name()

const std::string& pool::IContainer::name ( ) const
inherited

Returns the name of this container.

◆ parentDatabaseName()

virtual const std::string& pool::PersistencySvc::Container::parentDatabaseName ( ) const
overridevirtual

Returns the name (fid) of the parent database.

Implements pool::IContainer.

◆ setAttribute()

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

Templated method to set an attribute.

Definition at line 53 of file ITechnologySpecificAttributes.h.

55  {
56  return this->setAttributeOfType( attributeName,
57  static_cast< const void* >( &atttibuteValue ),
58  typeid(T),
59  option );
60  }

◆ setAttributeOfType()

virtual bool pool::PersistencySvc::Container::setAttributeOfType ( const std::string &  attributeName,
const void *  data,
const std::type_info &  typeInfo,
const std::string &  option 
)
overrideprotectedvirtual

The actual method setting the attribute data given a name.

Implements pool::ITechnologySpecificAttributes.

◆ technology()

virtual long pool::PersistencySvc::Container::technology ( ) const
overridevirtual

Returns the technology identifier for this container.

Implements pool::IContainer.

◆ technologySpecificAttributes() [1/2]

virtual const ITechnologySpecificAttributes& pool::PersistencySvc::Container::technologySpecificAttributes ( ) const
overridevirtual

Returns the object holding the technology specific attributes for a given technology domain.

Implements pool::IContainer.

◆ technologySpecificAttributes() [2/2]

virtual ITechnologySpecificAttributes& pool::PersistencySvc::Container::technologySpecificAttributes ( )
overridevirtual

Implements pool::IContainer.

◆ tokens()

virtual ITokenIterator* pool::PersistencySvc::Container::tokens ( const std::string &  selection)
overridevirtual

Starts an iteration over the tokens in the container.

Returns a token iterator whose ownership is passed to the user.

Implements pool::IContainer.

Member Data Documentation

◆ m_fileDescriptor

FileDescriptor& pool::PersistencySvc::Container::m_fileDescriptor
private

Reference to file descriptor of the parent database.

Definition at line 69 of file Container.h.

◆ m_name

std::string pool::IContainer::m_name
privateinherited

The name of the container.

Definition at line 52 of file IContainer.h.

◆ m_storageExplorer

IStorageExplorer& pool::PersistencySvc::Container::m_storageExplorer
private

Reference to the storage explorer.

Definition at line 72 of file Container.h.

◆ m_technology

long pool::PersistencySvc::Container::m_technology
private

The technology identifier.

Definition at line 75 of file Container.h.


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