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
void disconnect(void)
Definition: HCALConfigDB.cc:76
std::string accessor2
Definition: HCALConfigDB.h:55
ConfigurationDatabaseImpl * database2
Definition: HCALConfigDB.h:56
oracle::occi::Environment * getEnvironment(void)
oracle::occi::Connection * getConnection(void)
std::vector< unsigned int > getOnlineLUT(std::string tag, int crate, int slot, int topbottom, int fiber, int channel, int luttype)
Definition: HCALConfigDB.cc:83
Gather config data from online DB.
Definition: HCALConfigDB.h:20
hcal::ConfigurationDatabaseImpl ConfigurationDatabaseImpl
Definition: HCALConfigDB.h:22
void connect(std::string _accessor)
Definition: HCALConfigDB.cc:48
void setAccessor(std::string _accessor)
Definition: HCALConfigDB.cc:46
ConfigurationDatabaseImpl * database
Definition: HCALConfigDB.h:49
std::vector< unsigned int > getOnlineLUTFromXML(std::string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt=hcal::ConfigurationDatabase::LinearizerLUT)
std::string clobToString(const oracle::occi::Clob &)
std::string accessor
Definition: HCALConfigDB.h:48