ATLAS Offline Software
UserSession.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef INCLUDE_PERSISTENCYSVC_USERSESSION_H
6 #define INCLUDE_PERSISTENCYSVC_USERSESSION_H
7 
9 
10 namespace pool {
11 
12  class DatabaseConnectionPolicy;
13 
14  namespace PersistencySvc {
15 
16  // forward declarations
17  class DatabaseRegistry;
18  class TechnologyDispatcher;
19  class GlobalTransaction;
20 
27  class UserSession : virtual public ISession
28  {
29  public:
32 
34  virtual ~UserSession();
35 
36  UserSession (const UserSession&) = delete;
37  UserSession& operator= (const UserSession&) = delete;
38 
39  // Signatures needed for the PersistencySvc
42 
45 
48 
52  bool disconnectAll();
53 
56  const ITransaction& transaction() const;
57 
59  std::vector< std::string > connectedDatabases() const;
60 
62  IDatabase* databaseHandle( const std::string& dbName,
64 
67 
69  void setFileCatalog(IFileCatalog& catalog);
70 
74 
77 
78  private:
84  };
85  }
86 }
87 
88 #endif
pool::PersistencySvc::UserSession::technologySpecificAttributes
const ITechnologySpecificAttributes & technologySpecificAttributes(long technology) const
Returns the object holding the technology specific attributes for a given technology domain.
pool::PersistencySvc::UserSession::technologyDispatcher
TechnologyDispatcher & technologyDispatcher()
pool::PersistencySvc::UserSession::globalTransaction
ITransaction & globalTransaction()
Returns the global transaction object.
pool::PersistencySvc::GlobalTransaction
Definition: GlobalTransaction.h:20
pool
pool namespace
Definition: libname.h:15
pool::PersistencySvc::UserSession::operator=
UserSession & operator=(const UserSession &)=delete
pool::PersistencySvc::UserSession::setFileCatalog
void setFileCatalog(IFileCatalog &catalog)
Set the file catalog to be used.
pool::PersistencySvc::UserSession::transaction
ITransaction & transaction()
Returns the transaction object.
pool::DatabaseSpecification::NameType
NameType
Enumeration type specifying the database name field, wherever the latter is used in methods accessing...
Definition: DatabaseSpecification.h:14
pool::PersistencySvc::UserSession::transaction
const ITransaction & transaction() const
pool::PersistencySvc::UserSession::registry
DatabaseRegistry & registry()
pool::ISession
Definition: ISession.h:31
pool::IFileCatalog
Definition: IFileCatalog.h:23
pool::PersistencySvc::UserSession::technologySpecificAttributes
ITechnologySpecificAttributes & technologySpecificAttributes(long technology)
PixelModuleFeMask_create_db.dbName
string dbName
Definition: PixelModuleFeMask_create_db.py:21
pool::PersistencySvc::UserSession::defaultConnectionPolicy
const DatabaseConnectionPolicy & defaultConnectionPolicy() const
Retrieves the default connection policy.
pool::PersistencySvc::UserSession::m_policy
DatabaseConnectionPolicy * m_policy
Definition: UserSession.h:79
pool::ITransaction
Definition: ITransaction.h:21
pool::PersistencySvc::UserSession::connectedDatabases
std::vector< std::string > connectedDatabases() const
Returns a vector with the file identifiers of the presently open databases.
ISession.h
pool::PersistencySvc::DatabaseRegistry
Definition: DatabaseRegistry.h:19
pool::PersistencySvc::UserSession::m_transaction
GlobalTransaction * m_transaction
Definition: UserSession.h:82
pool::PersistencySvc::UserSession::m_registry
DatabaseRegistry * m_registry
Definition: UserSession.h:81
pool::PersistencySvc::UserSession
Definition: UserSession.h:28
pool::ITechnologySpecificAttributes
Definition: ITechnologySpecificAttributes.h:22
pool::IDatabase
Definition: IDatabase.h:25
pool::PersistencySvc::UserSession::disconnectAll
bool disconnectAll()
Explicitly disconnects all the databases.
pool::PersistencySvc::UserSession::m_technologyDispatcher
TechnologyDispatcher * m_technologyDispatcher
Definition: UserSession.h:83
pool::PersistencySvc::UserSession::~UserSession
virtual ~UserSession()
Destructor.
pool::PersistencySvc::UserSession::databaseHandle
IDatabase * databaseHandle(const std::string &dbName, DatabaseSpecification::NameType dbNameType)
Returns a pointer to a database object. The user acquires ownership of that object.
pool::PersistencySvc::UserSession::UserSession
UserSession(const UserSession &)=delete
pool::PersistencySvc::UserSession::UserSession
UserSession(IFileCatalog &fileCatalog)
Constructor.
pool::DatabaseConnectionPolicy
Definition: DatabaseConnectionPolicy.h:19
pool::PersistencySvc::UserSession::setDefaultConnectionPolicy
void setDefaultConnectionPolicy(const DatabaseConnectionPolicy &policy)
Sets the default policy when databases are opened/connected.
pool::PersistencySvc::UserSession::fileCatalog
IFileCatalog & fileCatalog()
Returns the file catalog in use.
pool::PersistencySvc::TechnologyDispatcher
Definition: TechnologyDispatcher.h:30
pool::PersistencySvc::UserSession::m_catalog
IFileCatalog * m_catalog
Definition: UserSession.h:80