CMS 3D CMS Logo

DataManager.h
Go to the documentation of this file.
1 #ifndef CondTools_L1Trigger_DataManager_h
2 #define CondTools_L1Trigger_DataManager_h
3 
6 
7 #include <string>
8 
9 namespace l1t {
10 
11  /* Helper class that provides common objects required to access Pool and Coral DB's.
12  * This class will initialize connections and makes sure that they are closed
13  * when it is destroyed.
14  * Connections are initialized, but user is still responsible for opening and commiting
15  * them
16  */
17  class DataManager {
18  public:
19  DataManager();
20  explicit DataManager(const std::string& connectString, const std::string& authenticationPath, bool isOMDS = false);
21  virtual ~DataManager();
22 
23  void connect(const std::string& connectString, const std::string& authenticationPath, bool isOMDS = false);
24  void setDebug(bool debug);
25 
27 
28  protected:
29  //Returns type object for provided type name
31 
32  // Database connection management
34 
35  private:
36  bool debugFlag = false;
37  };
38 
39 } // namespace l1t
40 
41 #endif
type
Definition: HCALResponse.h:21
delete x;
Definition: CaloConfig.h:22
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:14
edm::eventsetup::TypeTag findType(const std::string &type)
Definition: DataManager.cc:32
#define debug
Definition: HDRShower.cc:19
cond::persistency::Session dbSession()
Definition: DataManager.h:26
virtual ~DataManager()
Definition: DataManager.cc:27
void setDebug(bool debug)
Definition: DataManager.cc:43
cond::persistency::Session session
Definition: DataManager.h:33