File indexing completed on 2024-04-06 11:58:31
0001 #ifndef DumpFileToDB_H
0002 #define DumpFileToDB_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "FWCore/Framework/interface/Frameworkfwd.h"
0013 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0014 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0015
0016 #include <string>
0017 #include <fstream>
0018 #include <vector>
0019
0020 class DTCalibrationMap;
0021 class DTTtrig;
0022
0023 class DumpFileToDB : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0024 public:
0025
0026 DumpFileToDB(const edm::ParameterSet& pset);
0027
0028
0029 ~DumpFileToDB() override;
0030
0031
0032 void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
0033
0034 void endRun(const edm::Run& run, const edm::EventSetup& setup) override {}
0035
0036 void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
0037
0038 void endJob() override;
0039
0040 protected:
0041 private:
0042 std::vector<int> readChannelsMap(std::stringstream& linestr);
0043
0044 const DTCalibrationMap* theCalibFile;
0045 std::string mapFileName;
0046
0047 std::string dbToDump;
0048 std::string format;
0049
0050
0051 bool diffMode;
0052 const DTTtrig* tTrigMapOrig;
0053
0054 edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0055 };
0056 #endif