1 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
11 ConfigurationDatabaseImpl::ConfigurationDatabaseImpl() : m_logger(&std::
cout) {}
13 void ConfigurationDatabaseImpl::parseAccessor(
const std::string& accessor,
19 std::map<std::string, std::string>&
params) {
34 end = accessor.find(
"://");
35 if (end == std::string::npos)
38 method = accessor.substr(start, end - start);
41 end = accessor.find(
'@', start);
42 if (end != std::string::npos) {
43 user = accessor.substr(start, end - start);
47 end = accessor.find(
':', start);
48 if (end != std::string::npos) {
49 host = accessor.substr(start, end - start);
53 end = accessor.find(
'/', start);
54 if (end == std::string::npos)
57 host = accessor.substr(start, end - start);
59 port = accessor.substr(start, end - start);
62 end = accessor.find(
'?', start);
63 if (end == std::string::npos) {
64 db = accessor.substr(start);
67 db = accessor.substr(start, end - start);
72 while (start != std::string::npos) {
74 end = accessor.find(
'=', start);
75 if (end == std::string::npos)
77 pname = accessor.substr(start, end - start);
79 end = accessor.find_first_of(
",&", start);
80 if (end == std::string::npos) {
81 pvalue = accessor.substr(start);
83 pvalue = accessor.substr(start, end - start);
85 params[
pname] = pvalue;
90 std::vector<std::string> ConfigurationDatabaseImpl::getValidTags() noexcept(
false) {
91 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
93 ConfigurationDatabase::ApplicationConfig ConfigurationDatabaseImpl::getApplicationConfig(
95 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
99 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
102 unsigned int ConfigurationDatabaseImpl::getFirmwareChecksum(
const std::string& board,
103 unsigned int version) noexcept(
false) {
104 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
107 void ConfigurationDatabaseImpl::getFirmwareMCS(
const std::string& board,
109 std::vector<std::string>& mcsLines) noexcept(
false) {
110 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
112 void ConfigurationDatabaseImpl::getLUTs(
116 std::map<ConfigurationDatabase::LUTId, ConfigurationDatabase::LUT>& LUTs) noexcept(
false) {
117 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
119 void ConfigurationDatabaseImpl::getLUTChecksums(
121 std::map<ConfigurationDatabase::LUTId, ConfigurationDatabase::MD5Fingerprint>& checksums) noexcept(
false) {
122 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
124 void ConfigurationDatabaseImpl::getPatterns(
128 std::map<ConfigurationDatabase::PatternId, ConfigurationDatabase::HTRPattern>& patterns) noexcept(
false) {
129 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
131 void ConfigurationDatabaseImpl::getZSThresholds(
135 std::map<ConfigurationDatabase::ZSChannelId, int>&
thresholds) noexcept(
false) {
136 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
138 void ConfigurationDatabaseImpl::getHLXMasks(
142 std::map<ConfigurationDatabase::FPGAId, ConfigurationDatabase::HLXMasks>& masks) noexcept(
false) {
143 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
145 void ConfigurationDatabaseImpl::getRBXdata(
148 ConfigurationDatabase::RBXdatumType dtype,
149 std::map<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXdatum>& RBXdata) noexcept(
false) {
150 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
152 void ConfigurationDatabaseImpl::getRBXpatterns(
155 std::map<ConfigurationDatabase::RBXdatumId, ConfigurationDatabase::RBXpattern>& patterns) noexcept(
false) {
156 XCEPT_RAISE(hcal::exception::ConfigurationDatabaseException,
"Not implemented");
160 oracle::occi::Connection* ConfigurationDatabaseImpl::getConnection(
void) {
return nullptr; }
162 oracle::occi::Environment* ConfigurationDatabaseImpl::getEnvironment(
void) {
return nullptr; }
static PFTauRenderPlugin instance