CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
l1t::DataManager Class Reference

#include <DataManager.h>

Inheritance diagram for l1t::DataManager:
l1t::OMDSReader

Public Member Functions

void connect (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
 
 DataManager ()
 
 DataManager (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
 
cond::persistency::Session dbSession ()
 
void setDebug (bool debug)
 
virtual ~DataManager ()
 

Protected Member Functions

edm::eventsetup::TypeTag findType (const std::string &type)
 

Protected Attributes

cond::persistency::Session session
 

Private Attributes

bool debugFlag = false
 

Detailed Description

Definition at line 17 of file DataManager.h.

Constructor & Destructor Documentation

l1t::DataManager::DataManager ( )

Definition at line 8 of file DataManager.cc.

8 : session(nullptr) {}
cond::persistency::Session session
Definition: DataManager.h:33
l1t::DataManager::DataManager ( const std::string &  connectString,
const std::string &  authenticationPath,
bool  isOMDS = false 
)
explicit

Definition at line 10 of file DataManager.cc.

References connect().

10  {
11  connect(connectString, authenticationPath, isOMDS);
12  }
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:14
l1t::DataManager::~DataManager ( )
virtual

Definition at line 27 of file DataManager.cc.

References cond::persistency::Session::close(), and session.

27  {
28  // delete all in reverse direction
29  session.close();
30  }
cond::persistency::Session session
Definition: DataManager.h:33

Member Function Documentation

void l1t::DataManager::connect ( const std::string &  connectString,
const std::string &  authenticationPath,
bool  isOMDS = false 
)

Definition at line 14 of file DataManager.cc.

References cond::persistency::ConnectionPool::configure(), cond::persistency::ConnectionPool::createSession(), Debug, debugFlag, session, cond::persistency::ConnectionPool::setAuthenticationPath(), setDebug(), and cond::persistency::ConnectionPool::setMessageVerbosity().

Referenced by l1t::OMDSReader::connect(), DataManager(), and o2o_db_cfgmap.DbManagerDAQ::update_hashmap().

14  {
15  setDebug(false);
17  connection.setAuthenticationPath(authenticationPath);
18  if (debugFlag)
20  else
22  connection.configure();
23 
24  session = connection.createSession(connectString, false);
25  }
edm::ErrorSummaryEntry Error
Session createSession(const std::string &connectionString, bool writeCapable=false)
void setMessageVerbosity(coral::MsgLevel level)
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
cond::persistency::Session l1t::DataManager::dbSession ( )
inline

Definition at line 26 of file DataManager.h.

References session.

Referenced by L1CaloHcalScaleConfigOnlineProd::newObject().

26 { return session; }
cond::persistency::Session session
Definition: DataManager.h:33
edm::eventsetup::TypeTag l1t::DataManager::findType ( const std::string &  type)
protected

Definition at line 32 of file DataManager.cc.

References edm::eventsetup::heterocontainer::HCTypeTag::findType().

32  {
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  }
Log< level::Error, false > LogError
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
void l1t::DataManager::setDebug ( bool  debug)

Definition at line 43 of file DataManager.cc.

References debug, and debugFlag.

Referenced by connect().

43 { debugFlag = debug; }
#define debug
Definition: HDRShower.cc:19

Member Data Documentation

bool l1t::DataManager::debugFlag = false
private

Definition at line 36 of file DataManager.h.

Referenced by connect(), and setDebug().

cond::persistency::Session l1t::DataManager::session
protected