![]() |
ATLAS Offline Software
|
UserDatabase is an implementation of the IDatabase interface. More...
#include <UserDatabase.h>
Public Types | |
| enum | OpenMode { CLOSED , READ , UPDATE } |
| Current open mode enumeration. More... | |
Public Member Functions | |
| UserDatabase (TechnologyDispatcher &technologyDispatcher, const DatabaseConnectionPolicy &policy, IFileCatalog &fileCatalog, ITransaction &transaction, DatabaseRegistry ®istry, const std::string &name, DatabaseSpecification::NameType nameType) | |
| Constructor. | |
| virtual | ~UserDatabase () |
| Destructor. | |
| DatabaseHandler & | databaseHandler () |
| Returns the database handler. | |
| virtual void | connectForRead () override |
| Connects explicitly to the database for read operations. | |
| virtual void | connectForRead (const DatabaseConnectionPolicy &policy) override |
| virtual void | connectForWrite () override |
| Connects explicitly to the database for write/update operations. | |
| virtual void | connectForWrite (const DatabaseConnectionPolicy &policy) override |
| virtual void | disconnect () override |
| Disconnects from the database. | |
| virtual IDatabase::OpenMode | openMode () const override |
| Returns the opening mode. It can be used to check whether the database is connected. | |
| virtual const std::string & | fid () override |
| Returns the file identifier of this database. | |
| virtual const std::string & | pfn () override |
| Returns the physical file name of this database. | |
| virtual bool | setTechnology (long technology) override |
| Sets the technology identifier for this database. | |
| virtual long | technology () const override |
| Returns the technology identifier for this database. | |
| virtual std::vector< std::string > | containers () override |
| Returns the names of the containers in this database. | |
| virtual IContainer * | containerHandle (const std::string &name) override |
| Returns a pointer to a container object. The user acquires ownership of that object. | |
| virtual const ITechnologySpecificAttributes & | technologySpecificAttributes () const override |
| Returns the object holding the technology specific attributes. | |
| virtual ITechnologySpecificAttributes & | technologySpecificAttributes () override |
| template<class T> | |
| T | attribute (const std::string &attributeName, const std::string &option="") |
| Templated method to retrieve an attribute. | |
| template<class T> | |
| bool | setAttribute (const std::string &attributeName, const T &atttibuteValue, const std::string &option="") |
| Templated method to set an attribute. | |
| 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. | |
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. | |
| 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. | |
Private Member Functions | |
| bool | checkInRegistry () |
| Checks in the registry if the database handler already exists. | |
| void | setTechnologyIdentifier (const std::string &sTechnology) |
| Converts a technology string to the technology (long) identifier. | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| TechnologyDispatcher & | m_technologyDispatcher |
| Reference to the technology dispatcher. | |
| const DatabaseConnectionPolicy & | m_policy |
| Reference to the policy. | |
| IFileCatalog & | m_catalog |
| Reference to the file catalog. | |
| ITransaction & | m_transaction |
| Reference to the global transaction. | |
| DatabaseRegistry & | m_registry |
| Reference to the database registry. | |
| std::string | m_name |
| The database name. | |
| DatabaseSpecification::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. | |
| IDatabase::OpenMode | 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) | |
UserDatabase is an implementation of the IDatabase interface.
Definition at line 32 of file UserDatabase.h.
|
inherited |
Current open mode enumeration.
| Enumerator | |
|---|---|
| CLOSED | |
| READ | |
| UPDATE | |
Definition at line 28 of file IDatabase.h.
| pool::PersistencySvc::UserDatabase::UserDatabase | ( | TechnologyDispatcher & | technologyDispatcher, |
| const DatabaseConnectionPolicy & | policy, | ||
| IFileCatalog & | fileCatalog, | ||
| ITransaction & | transaction, | ||
| DatabaseRegistry & | registry, | ||
| const std::string & | name, | ||
| DatabaseSpecification::NameType | nameType ) |
Constructor.
|
virtual |
Destructor.
|
inlineinherited |
Templated method to retrieve an attribute.
Definition at line 25 of file ITechnologySpecificAttributes.h.
|
overrideprotectedvirtual |
The actual method returning the attribute data given a name.
Implements pool::ITechnologySpecificAttributes.
|
private |
Checks in the registry if the database handler already exists.
|
overridevirtual |
Connects explicitly to the database for read operations.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
overridevirtual |
Connects explicitly to the database for write/update operations.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
overridevirtual |
Returns a pointer to a container object. The user acquires ownership of that object.
Implements pool::IDatabase.
|
overridevirtual |
Returns the names of the containers in this database.
Implements pool::IDatabase.
| DatabaseHandler & pool::PersistencySvc::UserDatabase::databaseHandler | ( | ) |
Returns the database handler.
|
overridevirtual |
Disconnects from the database.
Implements pool::IDatabase.
|
overridevirtual |
Returns the file identifier of this database.
Implements pool::IDatabase.
|
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 163 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 178 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.
|
overridevirtual |
Returns the opening mode. It can be used to check whether the database is connected.
Implements pool::IDatabase.
|
overridevirtual |
Returns the physical file name of this database.
Implements pool::IDatabase.
|
inlineinherited |
Templated method to set an attribute.
Definition at line 41 of file ITechnologySpecificAttributes.h.
|
overrideprotectedvirtual |
The actual method setting the attribute data given a name.
Implements pool::ITechnologySpecificAttributes.
|
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.
|
overridevirtual |
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.
Implements pool::IDatabase.
|
private |
Converts a technology string to the technology (long) identifier.
|
overridevirtual |
Returns the technology identifier for this database.
Implements pool::IDatabase.
|
overridevirtual |
Returns the object holding the technology specific attributes.
Implements pool::IDatabase.
|
overridevirtual |
Implements pool::IDatabase.
|
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 127 of file UserDatabase.h.
|
private |
Reference to the file catalog.
Definition at line 109 of file UserDatabase.h.
|
private |
The underlying database handler.
Definition at line 123 of file UserDatabase.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 115 of file UserDatabase.h.
|
private |
The database name spacification.
Definition at line 117 of file UserDatabase.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
private |
Current open mode.
Definition at line 125 of file UserDatabase.h.
|
private |
Reference to the policy.
Definition at line 107 of file UserDatabase.h.
|
private |
Reference to the database registry.
Definition at line 113 of file UserDatabase.h.
|
private |
The technology identifier of the database.
Definition at line 119 of file UserDatabase.h.
|
private |
Reference to the technology dispatcher.
Definition at line 105 of file UserDatabase.h.
|
private |
Checks if the technology identifier has been set.
Definition at line 121 of file UserDatabase.h.
|
private |
Other names used.
Definition at line 129 of file UserDatabase.h.
|
private |
Definition at line 130 of file UserDatabase.h.
|
private |
Reference to the global transaction.
Definition at line 111 of file UserDatabase.h.