Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:00:05

0001 #ifndef ConfigurationDatabaseImplXerces_hh_included
0002 #define ConfigurationDatabaseImplXerces_hh_included 1
0003 
0004 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseImpl.hh"
0005 #include <map>
0006 #include <string>
0007 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabaseStandardXMLParser.hh"
0008 
0009 //OCCI include
0010 #include "OnlineDB/Oracle/interface/Oracle.h"
0011 
0012 class ConfigurationDatabaseImplXMLFile : public hcal::ConfigurationDatabaseImpl {
0013 public:
0014   ConfigurationDatabaseImplXMLFile();
0015   ~ConfigurationDatabaseImplXMLFile() override;
0016   bool canHandleMethod(const std::string& method) const override;
0017   void connect(const std::string& accessor) noexcept(false) override;
0018   void disconnect() override;
0019 
0020   unsigned int getFirmwareChecksum(const std::string& board, unsigned int version) noexcept(false) override;
0021   void getZSThresholds(const std::string& tag,
0022                        int crate,
0023                        int slot,
0024                        std::map<hcal::ConfigurationDatabase::ZSChannelId, int>& thresholds) noexcept(false) override;
0025   void getFirmwareMCS(const std::string& board,
0026                       unsigned int version,
0027                       std::vector<std::string>& mcsLines) noexcept(false) override;
0028   // maximally simple implementation
0029   void getLUTs(
0030       const std::string& tag,
0031       int crate,
0032       int slot,
0033       std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::LUT>& LUTs) noexcept(false) override;
0034   void getLUTChecksums(const std::string& tag,
0035                        std::map<hcal::ConfigurationDatabase::LUTId, hcal::ConfigurationDatabase::MD5Fingerprint>&
0036                            checksums) noexcept(false) override;
0037   void getPatterns(const std::string& tag,
0038                    int crate,
0039                    int slot,
0040                    std::map<hcal::ConfigurationDatabase::PatternId, hcal::ConfigurationDatabase::HTRPattern>&
0041                        patterns) noexcept(false) override;
0042 
0043   // added by Gena Kukartsev
0044   //virtual oracle::occi::Connection * getConnection( void );
0045   //virtual oracle::occi::Environment * getEnvironment( void );
0046 
0047 private:
0048   std::map<std::string, std::string> extractParams(int beg, int end);
0049   std::map<std::string, std::string> parseWhere(const std::string& where);
0050   std::string createKey(const std::map<std::string, std::string>& params);
0051   std::map<std::string, std::pair<int, int> > m_lookup;
0052   std::string m_buffer;
0053   ConfigurationDatabaseStandardXMLParser m_parser;
0054 };
0055 
0056 #endif  // ConfigurationDatabaseImplXMLFile_hh_included