CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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
52 
53 };
54 #endif
void disconnect(void)
Definition: HCALConfigDB.cc:96
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:53
void setAccessor(std::string _accessor)
Definition: HCALConfigDB.cc:48
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