test
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 );
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  boost::shared_ptr<coral::ISessionProxy> createCoralSession( const std::string& connectionString, bool writeCapable = false );
47 
48  private:
49  boost::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:
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
64  // this one has to be moved!
66  std::map<std::string,int> m_dbTypes;
67  };
68  }
69 }
70 
71 #endif
72 
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)
void setMessageVerbosity(coral::MsgLevel level)
std::map< std::string, int > m_dbTypes
string connectionString
Definition: autoCondHLT.py:4
Session createReadOnlySession(const std::string &connectionString, const std::string &transactionId)
tuple level
Definition: testEve_cfg.py:34
cond::CoralServiceManager * m_pluginManager
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
void setAuthenticationPath(const std::string &p)
void setFrontierSecurity(const std::string &signature)