CMS 3D CMS Logo

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

◆ DataManager() [1/2]

l1t::DataManager::DataManager ( )

Definition at line 8 of file DataManager.cc.

8 : session(nullptr) {}
cond::persistency::Session session
Definition: DataManager.h:33

◆ DataManager() [2/2]

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

Definition at line 10 of file DataManager.cc.

References CSC_BadChambers_cfi::authenticationPath, and 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

◆ ~DataManager()

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

◆ connect()

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

Definition at line 14 of file DataManager.cc.

References CSC_BadChambers_cfi::authenticationPath, 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);
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

◆ dbSession()

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

◆ findType()

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

◆ setDebug()

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

◆ debugFlag

bool l1t::DataManager::debugFlag = false
private

Definition at line 36 of file DataManager.h.

Referenced by connect(), and setDebug().

◆ session

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