![]() |
ATLAS Offline Software
|
#include <SessionTool.h>
Public Member Functions | |
| SessionTool (const std::string &type, const std::string &name, const IInterface *parent) | |
| Constructors. | |
| virtual | ~SessionTool () |
| Destructor. | |
| SessionTool (const SessionTool &)=delete | |
| SessionTool & | operator= (const SessionTool &)=delete |
| virtual void | setupFC (Gaudi::IFileCatalog &fileCatalog, int ageLimit=-1) |
| virtual void * | readObject (const Token &token, void *object=0) |
| Retrieves an object from persistent store and return with type information The handle to the reflection class is necessary to later delete the object. | |
| virtual Token * | registerForWrite (const Placement &place, const void *object, const RootType &type) |
| registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary. | |
| void | registerDatabaseHandler (DatabaseHandler *dbHandler, const std::string &lfn="") |
| Registers a database. | |
| void | deregisterDatabaseHandler (DatabaseHandler *dbHandler) |
| Deregisters a database. | |
| DatabaseHandler * | lookupByFID (const std::string &fid) |
| Looks up a database by its file id. | |
| DatabaseHandler * | lookupByPFN (const std::string &pfn) |
| Looks up a database by its physical file name. | |
| DatabaseHandler * | lookupByLFN (const std::string &lfn) |
| Looks up a database by its logical file name. | |
| virtual bool | disconnectAll () |
| Explicitly disconnects all the databases. | |
| virtual bool | startTransaction (Io::IoFlag type=Io::READ) |
| Starts a new transaction. Returns the success of the operation. | |
| virtual bool | commit () |
| Commits the transaction. | |
| virtual bool | commitAndHold () |
| Commits and holds the transaction. | |
| virtual Io::IoFlag | openMode () const |
| Returns the transaction type. | |
| virtual std::unique_ptr< Database > | databaseHandle (const std::string &dbName, Database::Specification::NameType dbNameType) |
| Creates and returns a new database handle object. | |
| virtual Gaudi::IFileCatalog & | fileCatalog () |
| Returns the file catalog in use. | |
| DatabaseHandler * | connect (long technology, Io::IoFlag transType, const std::string &fid, const std::string &pfn) |
| Connects to a database. | |
| void | disconnect (DatabaseHandler *database) |
| Disconnects from a database. | |
| std::string | fidForPfn (long technology, const std::string &pfn) |
| Fetches the FID by trying to temporatily connect to a database. | |
| bool | attributeOfType (long technology, const std::string &attributeName, void *data, const std::type_info &typeInfo, const std::string &option) |
| bool | setAttributeOfType (long technology, const std::string &attributeName, const void *data, const std::type_info &typeInfo, const std::string &option) |
| void | closeSession () |
| StatusCode | finalize () override final |
| ServiceHandle< StoreGateSvc > & | evtStore () |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. | |
| const ServiceHandle< StoreGateSvc > & | detStore () const |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. | |
| virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. | |
| virtual StatusCode | sysStart () override |
| Handle START transition. | |
| virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. | |
| virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. | |
| Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T, V, H > &t) |
| void | updateVHKA (Gaudi::Details::PropertyBase &) |
| MsgStream & | msg () const |
| bool | msgLvl (const MSG::Level lvl) const |
Protected Member Functions | |
| void | renounceArray (SG::VarHandleKeyArray &handlesArray) |
| remove all handles from I/O resolution | |
| std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > | renounce (T &h) |
| void | extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps) |
| Add StoreName to extra input/output deps as needed. | |
Private Types | |
| typedef ServiceHandle< StoreGateSvc > | StoreGateSvc_t |
Private Member Functions | |
| MicroSessionManager & | microSessionManager (long technology) |
| Returns the technology given a technology type. | |
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> | |
Private Attributes | |
| Gaudi::IFileCatalog * | m_catalog |
| int | m_ageLimit |
| Io::IoFlag | m_transactionType |
| std::map< long, std::unique_ptr< MicroSessionManager > > | m_technologies |
| std::set< DatabaseHandler * > | m_databases |
| std::map< std::string, DatabaseHandler * > | m_fidToDb |
| std::map< std::string, DatabaseHandler * > | m_pfnToDb |
| std::map< std::string, DatabaseHandler * > | m_lfnToDb |
| std::map< std::string, std::set< std::string > > | m_fidToLfns |
| StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default). | |
| StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default). | |
| std::vector< SG::VarHandleKeyArray * > | m_vhka |
| bool | m_varHandleArraysDeclared |
Definition at line 27 of file SessionTool.h.
|
privateinherited |
Definition at line 376 of file AthCommonDataStore.h.
|
explicit |
Constructors.
Definition at line 16 of file SessionTool.cxx.
|
virtual |
|
delete |
| bool SessionTool::attributeOfType | ( | long | technology, |
| const std::string & | attributeName, | ||
| void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option ) |
Definition at line 205 of file SessionTool.cxx.
| void SessionTool::closeSession | ( | ) |
Definition at line 34 of file SessionTool.cxx.
|
virtual |
Commits the transaction.
Definition at line 132 of file SessionTool.cxx.
|
virtual |
Commits and holds the transaction.
Definition at line 149 of file SessionTool.cxx.
| DatabaseHandler * SessionTool::connect | ( | long | technology, |
| Io::IoFlag | transType, | ||
| const std::string & | fid, | ||
| const std::string & | pfn ) |
Connects to a database.
Definition at line 190 of file SessionTool.cxx.
|
virtual |
Creates and returns a new database handle object.
Definition at line 165 of file SessionTool.cxx.
|
inlineprivateinherited |
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
|
inlineinherited |
Definition at line 145 of file AthCommonDataStore.h.
| void SessionTool::deregisterDatabaseHandler | ( | DatabaseHandler * | dbHandler | ) |
Deregisters a database.
Definition at line 87 of file SessionTool.cxx.
|
inlineinherited |
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 95 of file AthCommonDataStore.h.
| void SessionTool::disconnect | ( | DatabaseHandler * | database | ) |
Disconnects from a database.
Definition at line 197 of file SessionTool.cxx.
|
virtual |
Explicitly disconnects all the databases.
If a transaction is active, then all the changes since the last commit are aborted.
Definition at line 118 of file SessionTool.cxx.
|
inlineinherited |
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition at line 85 of file AthCommonDataStore.h.
|
protectedinherited |
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
| std::string SessionTool::fidForPfn | ( | long | technology, |
| const std::string & | pfn ) |
Fetches the FID by trying to temporatily connect to a database.
Definition at line 201 of file SessionTool.cxx.
|
virtual |
Returns the file catalog in use.
Definition at line 173 of file SessionTool.cxx.
|
finaloverride |
Definition at line 41 of file SessionTool.cxx.
|
overridevirtualinherited |
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
| DatabaseHandler * SessionTool::lookupByFID | ( | const std::string & | fid | ) |
| DatabaseHandler * SessionTool::lookupByLFN | ( | const std::string & | lfn | ) |
| DatabaseHandler * SessionTool::lookupByPFN | ( | const std::string & | pfn | ) |
|
private |
Returns the technology given a technology type.
Definition at line 177 of file SessionTool.cxx.
|
inlineinherited |
Definition at line 24 of file AthCommonMsg.h.
|
inlineinherited |
Definition at line 30 of file AthCommonMsg.h.
|
inlinevirtual |
|
delete |
|
overridevirtualinherited |
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
Retrieves an object from persistent store and return with type information The handle to the reflection class is necessary to later delete the object.
The Guid of the transient class is assumed to be the classID of the token
| token | [IN] reference to the token for the object |
| object | [IN] pointer to memory for the object (created if 0) |
In case of failure zero is returned.
Definition at line 46 of file SessionTool.cxx.
| void SessionTool::registerDatabaseHandler | ( | DatabaseHandler * | dbHandler, |
| const std::string & | lfn = "" ) |
Registers a database.
Definition at line 73 of file SessionTool.cxx.
|
virtual |
registerForWrite registers an object for writing to the persistent medium higher level interactions with the framework are necessary.
| place | [IN] the placement hint |
| object | [IN] pointer to transient object which will be written |
| type | [IN] reflection class description with the layout of transient object |
Definition at line 59 of file SessionTool.cxx.
|
inlineprotectedinherited |
Definition at line 368 of file AthCommonDataStore.h.
|
inlineprotectedinherited |
remove all handles from I/O resolution
Definition at line 352 of file AthCommonDataStore.h.
| bool SessionTool::setAttributeOfType | ( | long | technology, |
| const std::string & | attributeName, | ||
| const void * | data, | ||
| const std::type_info & | typeInfo, | ||
| const std::string & | option ) |
Definition at line 213 of file SessionTool.cxx.
|
virtual |
Definition at line 25 of file SessionTool.cxx.
|
virtual |
Starts a new transaction. Returns the success of the operation.
Definition at line 126 of file SessionTool.cxx.
|
overridevirtualinherited |
Perform system initialization for an algorithm.
We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.
Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.
|
overridevirtualinherited |
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
|
inlineinherited |
Definition at line 298 of file AthCommonDataStore.h.
|
private |
Definition at line 138 of file SessionTool.h.
|
private |
Definition at line 137 of file SessionTool.h.
|
private |
Definition at line 141 of file SessionTool.h.
|
privateinherited |
Pointer to StoreGate (detector store by default).
Definition at line 381 of file AthCommonDataStore.h.
|
privateinherited |
Pointer to StoreGate (event store by default).
Definition at line 378 of file AthCommonDataStore.h.
|
private |
Definition at line 142 of file SessionTool.h.
|
private |
Definition at line 145 of file SessionTool.h.
|
private |
Definition at line 144 of file SessionTool.h.
|
private |
Definition at line 143 of file SessionTool.h.
|
private |
Definition at line 140 of file SessionTool.h.
|
private |
Definition at line 139 of file SessionTool.h.
|
privateinherited |
Definition at line 387 of file AthCommonDataStore.h.
|
privateinherited |
Definition at line 386 of file AthCommonDataStore.h.