CMS 3D CMS Logo

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