CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConnectionPool.h
Go to the documentation of this file.
1 #ifndef ConditionDatabase_ConnectionPool_h
2 #define ConditionDatabase_ConnectionPool_h
3 
5 //
6 #include <string>
7 #include <memory>
8 //
9 #include "CoralBase/MessageStream.h"
10 
11 namespace edm {
12  class ParameterSet;
13 }
14 
15 namespace coral {
16  class IConnectionServiceConfiguration;
17  class ISessionProxy;
18 }
19 
20 namespace cond {
21  class CoralServiceManager;
22 }
23 
24 namespace cond {
25 
26  namespace persistency {
27  //
29 
30  // a wrapper for the coral connection service.
32  public:
35 
36  void setMessageVerbosity( coral::MsgLevel level );
37  void setAuthenticationPath( const std::string& p );
38  void setAuthenticationSystem( int authSysCode );
39  void setLogging( bool flag );
40  bool isLoggingEnabled() const;
41  void setParameters( const edm::ParameterSet& connectionPset );
42  void configure();
43  Session createSession( const std::string& connectionString, bool writeCapable=false, BackendType backType=DEFAULT_DB );
44  Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId );
45  boost::shared_ptr<coral::ISessionProxy> createCoralSession( const std::string& connectionString, bool writeCapable=false );
46 
47  private:
48  boost::shared_ptr<coral::ISessionProxy> createCoralSession( const std::string& connectionString,
49  const std::string& transactionId,
50  bool writeCapable=false );
51  Session createSession( const std::string& connectionString,
52  const std::string& transactionId,
53  bool writeCapable=false,
54  BackendType backType=DEFAULT_DB );
55  void configure( coral::IConnectionServiceConfiguration& coralConfig);
56  private:
58  int m_authSys = 0;
59  coral::MsgLevel m_messageLevel = coral::Error;
60  bool m_loggingEnabled = false;
61  // this one has to be moved!
63  std::map<std::string,int> m_dbTypes;
64  };
65  }
66 }
67 
68 #endif
69 
boost::shared_ptr< coral::ISessionProxy > createCoralSession(const std::string &connectionString, bool writeCapable=false)
void setParameters(const edm::ParameterSet &connectionPset)
void setAuthenticationSystem(int authSysCode)
Session createSession(const std::string &connectionString, bool writeCapable=false, BackendType backType=DEFAULT_DB)
void setMessageVerbosity(coral::MsgLevel level)
BackendType
Definition: Types.h:23
std::map< std::string, int > m_dbTypes
static constexpr BackendType DEFAULT_DB
Definition: Types.h:24
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
tuple level
Definition: testEve_cfg.py:34
cond::CoralServiceManager * m_pluginManager
void setAuthenticationPath(const std::string &p)