CMS 3D CMS Logo

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:
34  ~ConnectionPool();
35 
36  void setMessageVerbosity( coral::MsgLevel level );
37  void setAuthenticationPath( const std::string& p );
38  void setAuthenticationSystem( int authSysCode );
39  void setFrontierSecurity( const std::string& signature );
40  void setLogging( bool flag );
41  bool isLoggingEnabled() const;
42  void setParameters( const edm::ParameterSet& connectionPset );
43  void configure();
44  Session createSession( const std::string& connectionString, bool writeCapable = false );
45  Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId );
46  std::shared_ptr<coral::ISessionProxy> createCoralSession( const std::string& connectionString, bool writeCapable = false );
47 
48  private:
49  std::shared_ptr<coral::ISessionProxy> createCoralSession( const std::string& connectionString,
50  const std::string& transactionId,
51  bool writeCapable = false );
52  Session createSession( const std::string& connectionString,
53  const std::string& transactionId,
54  bool writeCapable = false );
55  void configure( coral::IConnectionServiceConfiguration& coralConfig );
56  private:
57  std::string m_authPath = std::string( "" );
58  int m_authSys = 0;
59  coral::MsgLevel m_messageLevel = coral::Error;
60  bool m_loggingEnabled = false;
61  //The frontier security option is turned on for all sessions
62  //usig this wrapper of the CORAL connection setup for configuring the server access
63  std::string m_frontierSecurity = std::string( "" );
64  // this one has to be moved!
65  cond::CoralServiceManager* m_pluginManager = nullptr;
66  std::map<std::string,int> m_dbTypes;
67  };
68  }
69 }
70 
71 #endif
72 
Session * createSession(SessionOptions &sessionOptions)
Definition: TensorFlow.cc:87
Definition: Binary.h:9
std::map< std::string, int > m_dbTypes
void setLogging(const std::string &level="3")
Definition: TensorFlow.cc:14
Definition: plugin.cc:24
HLT enums.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined signature
Definition: Activities.doc:4