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

#include <MicroSessionManager.h>

Inheritance diagram for pool::PersistencySvc::MicroSessionManager:
Collaboration diagram for pool::PersistencySvc::MicroSessionManager:

Public Member Functions

 MicroSessionManager (DatabaseRegistry &registry, ITransaction &transaction, long technology)
 Constructor. More...
 
virtual ~MicroSessionManager ()
 Destructor. More...
 
DatabaseHandlerconnect (const std::string &fid, const std::string &pfn, long accessMode)
 Connects to a database. More...
 
void disconnect (DatabaseHandler *database)
 Disconnects from a database. More...
 
bool disconnectAll ()
 Disconnects from all the databases. More...
 
long technology () const
 Returns the technology. More...
 
std::string fidForPfn (const std::string &pfn)
 Fetches the FID by trying to temporatily connect to a database. 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

DatabaseRegistrym_registry
 
ITransactionm_transaction
 
IStorageSvcm_storageSvc
 
IStorageExplorerm_storageExplorer
 
Session * m_session
 
long m_technology
 
std::set< DatabaseHandler * > m_databaseHandlers
 

Detailed Description

MicroSessionManager is a class taking care of starting sessions for a given major technology and managing the individual database connections.

Definition at line 35 of file MicroSessionManager.h.

Constructor & Destructor Documentation

◆ MicroSessionManager()

pool::PersistencySvc::MicroSessionManager::MicroSessionManager ( DatabaseRegistry registry,
ITransaction transaction,
long  technology 
)

Constructor.

◆ ~MicroSessionManager()

virtual pool::PersistencySvc::MicroSessionManager::~MicroSessionManager ( )
virtual

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::MicroSessionManager::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.

◆ connect()

DatabaseHandler* pool::PersistencySvc::MicroSessionManager::connect ( const std::string &  fid,
const std::string &  pfn,
long  accessMode 
)

Connects to a database.

◆ disconnect()

void pool::PersistencySvc::MicroSessionManager::disconnect ( DatabaseHandler database)

Disconnects from a database.

◆ disconnectAll()

bool pool::PersistencySvc::MicroSessionManager::disconnectAll ( )

Disconnects from all the databases.

◆ fidForPfn()

std::string pool::PersistencySvc::MicroSessionManager::fidForPfn ( const std::string &  pfn)

Fetches the FID by trying to temporatily connect to a database.

◆ 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::MicroSessionManager::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()

long pool::PersistencySvc::MicroSessionManager::technology ( ) const

Returns the technology.

Member Data Documentation

◆ m_databaseHandlers

std::set<DatabaseHandler*> pool::PersistencySvc::MicroSessionManager::m_databaseHandlers
private

Definition at line 81 of file MicroSessionManager.h.

◆ m_registry

DatabaseRegistry& pool::PersistencySvc::MicroSessionManager::m_registry
private

Definition at line 75 of file MicroSessionManager.h.

◆ m_session

Session* pool::PersistencySvc::MicroSessionManager::m_session
private

Definition at line 79 of file MicroSessionManager.h.

◆ m_storageExplorer

IStorageExplorer* pool::PersistencySvc::MicroSessionManager::m_storageExplorer
private

Definition at line 78 of file MicroSessionManager.h.

◆ m_storageSvc

IStorageSvc* pool::PersistencySvc::MicroSessionManager::m_storageSvc
private

Definition at line 77 of file MicroSessionManager.h.

◆ m_technology

long pool::PersistencySvc::MicroSessionManager::m_technology
private

Definition at line 80 of file MicroSessionManager.h.

◆ m_transaction

ITransaction& pool::PersistencySvc::MicroSessionManager::m_transaction
private

Definition at line 76 of file MicroSessionManager.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