CondTools
L1Trigger
src
DataManager.cc
Go to the documentation of this file.
1
#include "
CondTools/L1Trigger/interface/DataManager.h
"
2
#include "
CondCore/CondDB/interface/ConnectionPool.h
"
3
4
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
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
);
16
cond::persistency::ConnectionPool
connection;
17
connection.
setAuthenticationPath
(
authenticationPath
);
18
if
(
debugFlag
)
19
connection.
setMessageVerbosity
(
coral::Debug
);
20
else
21
connection.
setMessageVerbosity
(
coral::Error
);
22
connection.
configure
();
23
24
session
= connection.
createSession
(connectString,
false
);
25
}
26
27
DataManager::~DataManager
() {
28
// delete all in reverse direction
29
session
.
close
();
30
}
31
32
edm::eventsetup::TypeTag
DataManager::findType
(
const
std::string
&
type
) {
33
static
edm::eventsetup::TypeTag
defaultType;
34
edm::eventsetup::TypeTag
typeTag =
edm::eventsetup::TypeTag::findType
(
type
);
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
43
void
DataManager::setDebug
(
bool
debug
) {
debugFlag
=
debug
; }
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:154
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:31
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
cond::persistency::ConnectionPool::setMessageVerbosity
void setMessageVerbosity(coral::MsgLevel level)
Definition:
ConnectionPool.cc:168
edm::LogError
Definition:
MessageLogger.h:183
l1t
delete x;
Definition:
CaloConfig.h:22
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:32
cond::persistency::ConnectionPool::configure
void configure()
Definition:
ConnectionPool.cc:121
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
type
type
Definition:
HCALResponse.h:21
DataManager.h
l1t::DataManager::DataManager
DataManager()
Definition:
DataManager.cc:8
Generated for CMSSW Reference Manual by
1.8.16