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