CMS 3D CMS Logo

HCALConfigDB.h
Go to the documentation of this file.
1 //
2 // Gena Kukartsev (Brown), Feb. 1, 2008
3 //
4 //
5 #ifndef HCALConfigDB_h
6 #define HCALConfigDB_h
7 
8 #include <iostream>
9 #include <cstring>
10 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
11 
20 class HCALConfigDB {
21 public:
22  typedef hcal::ConfigurationDatabaseImpl ConfigurationDatabaseImpl;
23 
24  HCALConfigDB();
25  ~HCALConfigDB();
26  HCALConfigDB(std::string _accessor);
27  void connect(std::string _accessor);
28  void connect(std::string _accessor1, std::string _accessor2); // for very specific case of XML and Oracle
29  void disconnect(void);
30  void setAccessor(std::string _accessor);
31  std::vector<unsigned int> getOnlineLUT(
32  std::string tag, int crate, int slot, int topbottom, int fiber, int channel, int luttype);
33  std::vector<unsigned int> getOnlineLUT(
35  uint32_t _rawid,
36  hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT);
37  std::vector<unsigned int> getOnlineLUTFromXML(
39  uint32_t _rawid,
40  hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT);
41 
42  oracle::occi::Connection* getConnection(void);
43  oracle::occi::Environment* getEnvironment(void);
44 
45  std::string clobToString(const oracle::occi::Clob&);
46 
47 protected:
50 
51  // the second DB handle for a crazy case
52  // when two connections are needed,
53  // e.g. when the main connection is to
54  // an XML file
57 };
58 #endif
HCALConfigDB::ConfigurationDatabaseImpl
hcal::ConfigurationDatabaseImpl ConfigurationDatabaseImpl
Definition: HCALConfigDB.h:22
HCALConfigDB::database2
ConfigurationDatabaseImpl * database2
Definition: HCALConfigDB.h:56
HCALConfigDB::connect
void connect(std::string _accessor)
Definition: HCALConfigDB.cc:48
HCALConfigDB::getConnection
oracle::occi::Connection * getConnection(void)
Definition: HCALConfigDB.cc:292
HCALConfigDB::getOnlineLUTFromXML
std::vector< unsigned int > getOnlineLUTFromXML(std::string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt=hcal::ConfigurationDatabase::LinearizerLUT)
Definition: HCALConfigDB.cc:207
HCALConfigDB::setAccessor
void setAccessor(std::string _accessor)
Definition: HCALConfigDB.cc:46
HCALConfigDB::clobToString
std::string clobToString(const oracle::occi::Clob &)
Definition: HCALConfigDB.cc:297
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
HCALConfigDB::HCALConfigDB
HCALConfigDB()
Definition: HCALConfigDB.cc:30
HCALConfigDB::disconnect
void disconnect(void)
Definition: HCALConfigDB.cc:76
HCALConfigDB::getOnlineLUT
std::vector< unsigned int > getOnlineLUT(std::string tag, int crate, int slot, int topbottom, int fiber, int channel, int luttype)
Definition: HCALConfigDB.cc:83
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HCALConfigDB
Gather config data from online DB.
Definition: HCALConfigDB.h:20
HCALConfigDB::getEnvironment
oracle::occi::Environment * getEnvironment(void)
Definition: HCALConfigDB.cc:294
HCALConfigDB::~HCALConfigDB
~HCALConfigDB()
Definition: HCALConfigDB.cc:41
HCALConfigDB::accessor
std::string accessor
Definition: HCALConfigDB.h:48
HCALConfigDB::accessor2
std::string accessor2
Definition: HCALConfigDB.h:55
HCALConfigDB::database
ConfigurationDatabaseImpl * database
Definition: HCALConfigDB.h:49