File indexing completed on 2024-04-06 12:02:50
0001 #ifndef ECAL_SRP_HANDLER_H
0002 #define ECAL_SRP_HANDLER_H
0003
0004 #include <vector>
0005 #include <typeinfo>
0006 #include <string>
0007 #include <map>
0008 #include <iostream>
0009 #include <ctime>
0010
0011 #include "CondCore/PopCon/interface/PopConSourceHandler.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0013
0014 #include "FWCore/ServiceRegistry/interface/Service.h"
0015 #include "CondCore/DBOutputService/interface/PoolDBOutputService.h"
0016 #include "FWCore/Framework/interface/ESHandle.h"
0017 #include "FWCore/Framework/interface/Event.h"
0018 #include "FWCore/Framework/interface/MakerMacros.h"
0019 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "DataFormats/Common/interface/Handle.h"
0022 #include "FWCore/Framework/interface/EventSetup.h"
0023 #include "FWCore/Framework/interface/EventSetupRecordKey.h"
0024
0025 #include "CondFormats/EcalObjects/interface/EcalSRSettings.h"
0026 #include "CondFormats/DataRecord/interface/EcalSRSettingsRcd.h"
0027
0028 #include "OnlineDB/EcalCondDB/interface/all_monitoring_types.h"
0029 #include "OnlineDB/Oracle/interface/Oracle.h"
0030 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
0031
0032 #include "DataFormats/Provenance/interface/Timestamp.h"
0033
0034 namespace edm {
0035 class ParameterSet;
0036 class Event;
0037 class EventSetup;
0038 }
0039
0040 namespace popcon {
0041 class EcalSRPHandler : public popcon::PopConSourceHandler<EcalSRSettings> {
0042 public:
0043 EcalSRPHandler(edm::ParameterSet const&);
0044 ~EcalSRPHandler() override;
0045
0046 void getNewObjects() override;
0047 std::string id() const override { return m_name; }
0048 EcalCondDBInterface* econn;
0049 void importDccConfigFile(EcalSRSettings& sr, const std::string& filename, bool debug = false);
0050 void PrintPayload(EcalSRSettings& sr, std::ofstream& fout);
0051 void ChangePayload(EcalSRSettings& sref, EcalSRSettings& sr);
0052
0053 private:
0054 unsigned long m_firstRun;
0055 unsigned long m_lastRun;
0056 std::string m_sid;
0057 std::string m_user;
0058 std::string m_pass;
0059 std::string m_name;
0060 std::string m_location;
0061 std::string m_runtype;
0062 std::string m_gentag;
0063 std::string m_i_tag;
0064 bool m_debug;
0065 int m_i_version;
0066 };
0067 }
0068 #endif