1 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
11 ConfigurationDatabaseImpl::ConfigurationDatabaseImpl() : m_logger(&std::
cout) {
17 method.clear(); host.clear(); port.clear(); user.clear(); db.clear(); params.clear();
19 if (accessor.empty())
return;
23 end=accessor.find(
"://");
24 if (end==std::string::npos)
return;
26 method=accessor.substr(start,end-start);
29 end=accessor.find(
'@',start);
30 if (end!=std::string::npos) {
31 user=accessor.substr(start,end-start);
35 end=accessor.find(
':',start);
36 if (end!=std::string::npos) {
37 host=accessor.substr(start,end-start);
41 end=accessor.find(
'/',start);
42 if (end==std::string::npos)
return;
43 if (host.empty()) host=accessor.substr(start,end-start);
44 else port=accessor.substr(start,end-start);
47 end=accessor.find(
'?',start);
48 if (end==std::string::npos) {
49 db=accessor.substr(start);
51 }
else db=accessor.substr(start,end-start);
56 while (start!=std::string::npos) {
58 end=accessor.find(
'=',start);
59 if (end==std::string::npos)
break;
60 pname=accessor.substr(start,end-start);
62 end=accessor.find_first_of(
",&",start);
63 if (end==std::string::npos) {
64 pvalue=accessor.substr(start);
66 pvalue=accessor.substr(start,end-start);
73 std::vector<std::string> ConfigurationDatabaseImpl::getValidTags()
throw (
hcal::
exception::ConfigurationDatabaseException) {
74 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
76 ConfigurationDatabase::ApplicationConfig ConfigurationDatabaseImpl::getApplicationConfig(
const std::string&
tag,
const std::string& classname,
int instance)
throw (hcal::exception::ConfigurationDatabaseException) {
77 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
80 std::string ConfigurationDatabaseImpl::getConfigurationDocument(
const std::string&
tag)
throw (hcal::exception::ConfigurationDatabaseException) {
81 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
84 unsigned int ConfigurationDatabaseImpl::getFirmwareChecksum(
const std::string& board,
unsigned int version)
throw (hcal::exception::ConfigurationDatabaseException) {
85 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
88 void ConfigurationDatabaseImpl::getFirmwareMCS(
const std::string& board,
unsigned int version, std::vector<std::string>& mcsLines)
throw (hcal::exception::ConfigurationDatabaseException) {
89 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
91 void ConfigurationDatabaseImpl::getLUTs(
const std::string&
tag,
int crate,
int slot, std::map<ConfigurationDatabase::LUTId, ConfigurationDatabase::LUT >& LUTs)
throw (hcal::exception::ConfigurationDatabaseException) {
92 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
94 void ConfigurationDatabaseImpl::getLUTChecksums(
const std::string&
tag, std::map<ConfigurationDatabase::LUTId, ConfigurationDatabase::MD5Fingerprint>& checksums)
throw (hcal::exception::ConfigurationDatabaseException) {
95 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
97 void ConfigurationDatabaseImpl::getPatterns(
const std::string&
tag,
int crate,
int slot, std::map<ConfigurationDatabase::PatternId, ConfigurationDatabase::HTRPattern>& patterns)
throw (hcal::exception::ConfigurationDatabaseException) {
98 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
100 void ConfigurationDatabaseImpl::getZSThresholds(
const std::string&
tag,
int crate,
int slot, std::map<ConfigurationDatabase::ZSChannelId, int>& thresholds)
throw (hcal::exception::ConfigurationDatabaseException) {
101 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
103 void ConfigurationDatabaseImpl::getHLXMasks(
const std::string&
tag,
int crate,
int slot, std::map<ConfigurationDatabase::FPGAId, ConfigurationDatabase::HLXMasks>&
masks)
throw (hcal::exception::ConfigurationDatabaseException) {
104 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
106 void ConfigurationDatabaseImpl::getRBXdata(
const std::string&
tag,
108 ConfigurationDatabase::RBXdatumType dtype,
109 std::map<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>& RBXdata)
110 throw (hcal::exception::ConfigurationDatabaseException) {
111 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
113 void ConfigurationDatabaseImpl::getRBXpatterns(
const std::string&
tag,
115 std::map<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXpattern>& patterns)
116 throw (hcal::exception::ConfigurationDatabaseException) {
117 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
121 oracle::occi::Connection * ConfigurationDatabaseImpl::getConnection(
void ){
125 oracle::occi::Environment * ConfigurationDatabaseImpl::getEnvironment(
void ){
tuple start
Check for commandline option errors.
static PFTauRenderPlugin instance
static const uint32_t masks[]