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::eventsetup::heterocontainer::HCTypeTag::findType
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
ConnectionPool.h
MessageLogger.h
l1t::DataManager::session
cond::persistency::Session session
Definition: DataManager.h:33
l1t::DataManager::setDebug
void setDebug(bool debug)
Definition: DataManager.cc:43
cond::persistency::Session::close
void close()
Definition: Session.cc:50
cond::persistency::ConnectionPool::createSession
Session createSession(const std::string &connectionString, bool writeCapable=false)
Definition: ConnectionPool.cc:172
Debug
const bool Debug
Definition: CosmicMuonParameters.h:12
debug
#define debug
Definition: HDRShower.cc:19
l1t::DataManager::debugFlag
bool debugFlag
Definition: DataManager.h:36
cond::persistency::ConnectionPool
Definition: ConnectionPool.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::persistency::ConnectionPool::setMessageVerbosity
void setMessageVerbosity(coral::MsgLevel level)
Definition: ConnectionPool.cc:186
l1t
delete x;
Definition: CaloConfig.h:22
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
edm::eventsetup::heterocontainer::HCTypeTag
Definition: HCTypeTag.h:38
leef::Error
edm::ErrorSummaryEntry Error
Definition: LogErrorEventFilter.cc:29
cond::persistency::ConnectionPool::setAuthenticationPath
void setAuthenticationPath(const std::string &p)
Definition: ConnectionPool.cc:35
cond::persistency::ConnectionPool::configure
void configure()
Definition: ConnectionPool.cc:127
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
l1t::DataManager::~DataManager
virtual ~DataManager()
Definition: DataManager.cc:27
writeEcalDQMStatus.authenticationPath
authenticationPath
Definition: writeEcalDQMStatus.py:19
l1t::DataManager::connect
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:14
l1t::DataManager::findType
edm::eventsetup::TypeTag findType(const std::string &type)
Definition: DataManager.cc:32
DataManager.h
l1t::DataManager::DataManager
DataManager()
Definition: DataManager.cc:8