CMS 3D CMS Logo

DataManager.cc
Go to the documentation of this file.
3 
5 
6 namespace l1t {
7 
8  DataManager::DataManager() : session(nullptr) {}
9 
10  DataManager::DataManager(const std::string& connectString, const std::string& authenticationPath, bool isOMDS) {
11  connect(connectString, authenticationPath, isOMDS);
12  }
13 
14  void DataManager::connect(const std::string& connectString, const std::string& authenticationPath, bool isOMDS) {
15  setDebug(false);
18  if (debugFlag)
20  else
22  connection.configure();
23 
24  session = connection.createSession(connectString, false);
25  }
26 
28  // delete all in reverse direction
29  session.close();
30  }
31 
33  static edm::eventsetup::TypeTag defaultType;
35 
36  if (typeTag == defaultType)
37  //throw cond::Exception ("l1t::DataManager::findType")
38  edm::LogError("L1TriggerDB") << "DataManager::findType() : " << type << " was not found";
39 
40  return typeTag;
41  }
42 
44 } // namespace l1t
edm::ErrorSummaryEntry Error
delete x;
Definition: CaloConfig.h:22
Log< level::Error, false > LogError
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:14
Session createSession(const std::string &connectionString, bool writeCapable=false)
edm::eventsetup::TypeTag findType(const std::string &type)
Definition: DataManager.cc:32
void setMessageVerbosity(coral::MsgLevel level)
#define debug
Definition: HDRShower.cc:19
virtual ~DataManager()
Definition: DataManager.cc:27
void setAuthenticationPath(const std::string &p)
void setDebug(bool debug)
Definition: DataManager.cc:43
const bool Debug
cond::persistency::Session session
Definition: DataManager.h:33
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121