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 }
18 
19 namespace cond {
20  class CoralServiceManager;
21 }
22 
23 namespace cond {
24 
25  namespace persistency {
26  //
28 
29  // a wrapper for the coral connection service.
31  public:
34 
35  void setMessageVerbosity( coral::MsgLevel level );
36  void setAuthenticationPath( const std::string& p );
37  void setAuthenticationSystem( int authSysCode );
38  void setLogging( bool flag );
39  bool isLoggingEnabled() const;
40  void setParameters( const edm::ParameterSet& connectionPset );
41  void configure();
42  Session createSession( const std::string& connectionString, bool writeCapable=false, BackendType backType=DEFAULT_DB );
43  Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId );
44 
45  private:
46  Session createSession( const std::string& connectionString,
47  const std::string& transactionId,
48  bool writeCapable=false,
49  BackendType backType=DEFAULT_DB );
50  void configure( coral::IConnectionServiceConfiguration& coralConfig);
51  private:
53  int m_authSys = 0;
54  coral::MsgLevel m_messageLevel = coral::Error;
55  bool m_loggingEnabled = false;
56  // this one has to be moved!
58  std::map<std::string,int> m_dbTypes;
59  };
60  }
61 }
62 
63 #endif
64 
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)