CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DbConnection.h
Go to the documentation of this file.
1 #ifndef COND_DBCommon_DbConnection_h
2 #define COND_DBCommon_DbConnection_h
3 
4 #include <string>
5 #include <boost/shared_ptr.hpp>
7 #include "DbSession.h"
8 //
9 // Package: CondCore/DBCommon
10 // Class: DbConnection
11 //
16 namespace coral {
17  class ConnectionService;
18  class ISessionProxy;
19  class IMonitoringReporter;
20  class IWebCacheControl;
21 }
22 
23 namespace edm{
24  class ParameterSet;
25 }
26 
27 namespace ora {
28  class ConnectionPool;
29 }
30 
31 namespace cond{
32 
33  /*
34  **/
35  class DbConnection{
36  public:
37  DbConnection();
38 
40 
41  virtual ~DbConnection();
42 
43  DbConnection& operator=(const DbConnection& conn);
44 
45  void configure();
46 
47  void configure( cond::DbConfigurationDefaults defaultItem );
48 
49  void configure( const edm::ParameterSet& connectionPset );
50 
51  void close();
52 
53  bool isOpen() const;
54 
55  DbSession createSession() const;
56 
59 
60  boost::shared_ptr<ora::ConnectionPool> connectionPool() const;
61 
62  coral::IConnectionService& connectionService() const;
63 
64  const coral::IMonitoringReporter& monitoringReporter() const;
65 
66  coral::IWebCacheControl& webCacheControl() const;
67 
68  private:
70 
71  private:
72  boost::shared_ptr<ConnectionImpl> m_implementation;
73 
74  };
75 }
76 #endif
77 // DBCONNECTION_H
To be moved in DBCommon, has to serve also the pure coral use case.
virtual ~DbConnection()
Definition: DbConnection.cc:46
const coral::IMonitoringReporter & monitoringReporter() const
bool isOpen() const
Definition: DbConnection.cc:84
DbConnectionConfiguration & configuration()
Definition: DbConnection.cc:89
coral::IWebCacheControl & webCacheControl() const
coral::IConnectionService & connectionService() const
DbConnection & operator=(const DbConnection &conn)
Definition: DbConnection.cc:49
boost::shared_ptr< ora::ConnectionPool > connectionPool() const
Definition: DbConnection.cc:99
DbSession createSession() const
Definition: DbConnection.cc:72
boost::shared_ptr< ConnectionImpl > m_implementation
Definition: DbConnection.h:69
tuple conn
Definition: results_mgr.py:53