File indexing completed on 2024-04-06 11:58:30
0001 #ifndef DumpDBToFile_H
0002 #define DumpDBToFile_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
0015 #include "CondFormats/DTObjects/interface/DTMtime.h"
0016 #include "CondFormats/DataRecord/interface/DTMtimeRcd.h"
0017 #include "CondFormats/DTObjects/interface/DTTtrig.h"
0018 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0019 #include "CondFormats/DTObjects/interface/DTT0.h"
0020 #include "CondFormats/DataRecord/interface/DTT0Rcd.h"
0021 #include "CondFormats/DataRecord/interface/DTStatusFlagRcd.h"
0022 #include "CondFormats/DTObjects/interface/DTStatusFlag.h"
0023 #include "CondFormats/DataRecord/interface/DTDeadFlagRcd.h"
0024 #include "CondFormats/DTObjects/interface/DTDeadFlag.h"
0025 #include "CondFormats/DataRecord/interface/DTReadOutMappingRcd.h"
0026 #include "CondFormats/DTObjects/interface/DTReadOutMapping.h"
0027 #include "CondFormats/DTObjects/interface/DTRecoConditions.h"
0028 #include "CondFormats/DataRecord/interface/DTRecoConditionsTtrigRcd.h"
0029 #include "CondFormats/DataRecord/interface/DTRecoConditionsVdriftRcd.h"
0030 #include "CondFormats/DataRecord/interface/DTRecoConditionsUncertRcd.h"
0031
0032 #include <string>
0033
0034 class DTCalibrationMap;
0035
0036 class DumpDBToFile : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0037 public:
0038
0039 DumpDBToFile(const edm::ParameterSet &pset);
0040
0041
0042 ~DumpDBToFile() override;
0043
0044
0045 void beginRun(const edm::Run &run, const edm::EventSetup &setup) override;
0046
0047 void endRun(const edm::Run &run, const edm::EventSetup &setup) override {}
0048
0049 void analyze(const edm::Event &event, const edm::EventSetup &setup) override {}
0050
0051 void endJob() override;
0052
0053 protected:
0054 private:
0055 edm::ESGetToken<DTMtime, DTMtimeRcd> mTimeMapToken_;
0056 edm::ESGetToken<DTTtrig, DTTtrigRcd> tTrigMapToken_;
0057 edm::ESGetToken<DTT0, DTT0Rcd> t0MapToken_;
0058 edm::ESGetToken<DTStatusFlag, DTStatusFlagRcd> statusMapToken_;
0059 edm::ESGetToken<DTDeadFlag, DTDeadFlagRcd> deadMapToken_;
0060 edm::ESGetToken<DTReadOutMapping, DTReadOutMappingRcd> readOutMapToken_;
0061 edm::ESGetToken<DTRecoConditions, DTRecoConditionsTtrigRcd> tTrigToken_;
0062 edm::ESGetToken<DTRecoConditions, DTRecoConditionsVdriftRcd> vDriftToken_;
0063 edm::ESGetToken<DTRecoConditions, DTRecoConditionsUncertRcd> uncertToken_;
0064
0065 const DTMtime *mTimeMap;
0066 const DTTtrig *tTrigMap;
0067 const DTT0 *tZeroMap;
0068 const DTStatusFlag *statusMap;
0069 const DTDeadFlag *deadMap;
0070 const DTReadOutMapping *channelsMap;
0071 const DTRecoConditions *rconds;
0072
0073 DTCalibrationMap *theCalibFile;
0074
0075 std::string theOutputFileName;
0076
0077 std::string dbToDump;
0078 std::string dbLabel;
0079 std::string format;
0080 };
0081 #endif