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 <string.h>
10 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
11 
12 
22  public:
23  typedef hcal::ConfigurationDatabaseImpl ConfigurationDatabaseImpl;
24 
25  HCALConfigDB( );
26  ~HCALConfigDB( );
27  HCALConfigDB( std::string _accessor );
28  void connect( std::string _accessor );
29  void connect( std::string _accessor1, std::string _accessor2 ); // for very specific case of XML and Oracle
30  void disconnect( void );
31  void setAccessor( std::string _accessor );
32  std::vector<unsigned int> getOnlineLUT( std::string tag, int crate, int slot, int topbottom, int fiber, int channel, int luttype );
33  std::vector<unsigned int> getOnlineLUT( std::string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT );
34  std::vector<unsigned int> getOnlineLUTFromXML( std::string tag, uint32_t _rawid, hcal::ConfigurationDatabase::LUTType _lt = hcal::ConfigurationDatabase::LinearizerLUT );
35 
36  oracle::occi::Connection * getConnection( void );
37  oracle::occi::Environment * getEnvironment( void );
38 
39  std::string clobToString(const oracle::occi::Clob&);
40 
41  protected:
42 
44  ConfigurationDatabaseImpl * database;
45 
46  // the second DB handle for a crazy case
47  // when two connections are needed,
48  // e.g. when the main connection is to
49  // an XML file
51  ConfigurationDatabaseImpl * database2;
52 
53 };
54 #endif
void disconnect(void)
std::string accessor2
Definition: HCALConfigDB.h:50
ConfigurationDatabaseImpl * database2
Definition: HCALConfigDB.h:51
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)
Gather config data from online DB.
Definition: HCALConfigDB.h:21
hcal::ConfigurationDatabaseImpl ConfigurationDatabaseImpl
Definition: HCALConfigDB.h:23
void connect(std::string _accessor)
Definition: HCALConfigDB.cc:57
void setAccessor(std::string _accessor)
Definition: HCALConfigDB.cc:52
ConfigurationDatabaseImpl * database
Definition: HCALConfigDB.h:44
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:43