Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-18 02:24:41

0001 #ifndef DumpDBToFile_H
0002 #define DumpDBToFile_H
0003 
0004 /** \class DumpDBToFile
0005  *  Class which dump the ttrig written in a DB into
0006  *  a txt file of the same format of ORCA MuBarDigiParameters
0007  *  (see DTCalibrationMap for details)
0008  *
0009  *  \author G. Cerminara - INFN Torino
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   /// Constructor
0039   DumpDBToFile(const edm::ParameterSet &pset);
0040 
0041   /// Destructor
0042   ~DumpDBToFile() override;
0043 
0044   // Operations
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