![]() |
ATLAS Offline Software
|
#include <Database.h>
Classes | |
| struct | Specification |
Public Member Functions | |
| Database (SessionTool &session, const std::string &name, const Specification::NameType nameType) | |
| Constructor. | |
| ~Database () | |
| Destructor. | |
| void | connectForRead () |
| Connects explicitly to the database for read operations. | |
| void * | readObject (const Token &token, void *object=0) |
| Reads an object given a token. | |
| void | connectForWrite () |
| Connects explicitly to the database for write/update operations. | |
| Token * | writeObject (const std::string &containerName, long minorTechnology, const void *object, const RootType &type) |
| Writes an object and returns a token. | |
| void | disconnect () |
| Disconnects from the database. | |
| Io::IoFlag | openMode () const |
| Returns the opening mode. It can be used to check whether the database is connected. | |
| const std::string & | fid () |
| Returns the file identifier of this database. | |
| const std::string & | pfn () |
| Returns the physical file name of this database. | |
| bool | setTechnology (long technology) |
| Sets the technology identifier for this database. | |
| std::vector< std::string > | containers () |
| Returns the names of the containers in this database. | |
| Container * | containerHandle (const std::string &name) |
| Returns a pointer to a container object. The user acquires ownership of that object. | |
| pool::FileDescriptor * | fileDescriptor () |
| bool | attributeOfType (const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) |
| bool | setAttributeOfType (const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Member Functions | |
| bool | checkInRegistry () |
| Checks in the registry if the database handler already exists. | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| SessionTool & | m_session |
| Reference to the session. | |
| Gaudi::IFileCatalog & | m_catalog |
| Reference to the file catalog. | |
| Io::IoFlag | m_transactionType |
| Transaction type (read/update). | |
| DatabaseRegistry & | m_registry |
| Reference to the database registry. | |
| std::string | m_name |
| The database name. | |
| Specification::NameType | m_nameType |
| The database name spacification. | |
| long | m_technology |
| The technology identifier of the database. | |
| bool | m_technologySet |
| Checks if the technology identifier has been set. | |
| DatabaseHandler * | m_databaseHandler |
| The underlying database handler. | |
| Io::IoFlag | m_openMode |
| Current open mode. | |
| bool | m_alreadyConnected |
| Flag indicating whether a connection has been already made once. | |
| std::string | m_the_fid |
| Other names used. | |
| std::string | m_the_pfn |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
Definition at line 27 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
| Database::Database | ( | SessionTool & | session, |
| const std::string & | name, | ||
| const Specification::NameType | nameType ) |
Constructor.
Definition at line 19 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| Database::~Database | ( | ) |
| bool Database::attributeOfType | ( | const std::string & | attributeName, |
| void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option ) |
Definition at line 362 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
|
private |
Checks in the registry if the database handler already exists.
Definition at line 326 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| void Database::connectForRead | ( | ) |
Connects explicitly to the database for read operations.
Definition at line 46 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| void Database::connectForWrite | ( | ) |
Connects explicitly to the database for write/update operations.
Definition at line 108 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
Returns a pointer to a container object. The user acquires ownership of that object.
Definition at line 315 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| std::vector< std::string > Database::containers | ( | ) |
Returns the names of the containers in this database.
Definition at line 304 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| void Database::disconnect | ( | ) |
Disconnects from the database.
Definition at line 188 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| const std::string & Database::fid | ( | ) |
Returns the file identifier of this database.
Definition at line 205 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| pool::FileDescriptor * Database::fileDescriptor | ( | ) |
Definition at line 355 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 167 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 182 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
| Io::IoFlag Database::openMode | ( | ) | const |
Returns the opening mode. It can be used to check whether the database is connected.
Definition at line 198 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| const std::string & Database::pfn | ( | ) |
Returns the physical file name of this database.
Definition at line 263 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
Reads an object given a token.
Definition at line 98 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| bool Database::setAttributeOfType | ( | const std::string & | attributeName, |
| const void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option ) |
Definition at line 373 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
| bool Database::setTechnology | ( | long | technology | ) |
Sets the technology identifier for this database.
This can only be called for newly created databases before the connect method is called. Otherwise false is returned.
Definition at line 291 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
| Token * Database::writeObject | ( | const std::string & | containerName, |
| long | minorTechnology, | ||
| const void * | object, | ||
| const RootType & | type ) |
Writes an object and returns a token.
Definition at line 175 of file Database/AthenaPOOL/PoolSvc/src/Database.cxx.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Flag indicating whether a connection has been already made once.
Definition at line 122 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Reference to the file catalog.
Definition at line 104 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
The underlying database handler.
Definition at line 118 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
mutableprivateinherited |
|
mutableprivateinherited |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels).
Definition at line 132 of file AthMessaging.h.
|
private |
The database name.
Definition at line 110 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
The database name spacification.
Definition at line 112 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Current open mode.
Definition at line 120 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Reference to the database registry.
Definition at line 108 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Reference to the session.
Definition at line 102 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
The technology identifier of the database.
Definition at line 114 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Checks if the technology identifier has been set.
Definition at line 116 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Other names used.
Definition at line 124 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Definition at line 125 of file Database/AthenaPOOL/PoolSvc/src/Database.h.
|
private |
Transaction type (read/update).
Definition at line 106 of file Database/AthenaPOOL/PoolSvc/src/Database.h.