File indexing completed on 2023-03-17 10:42:24
0001 #ifndef DTVDriftAnalyzer_H
0002 #define DTVDriftAnalyzer_H
0003
0004
0005
0006
0007
0008
0009
0010 #include "FWCore/Framework/interface/Frameworkfwd.h"
0011 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0014 #include "CondFormats/DataRecord/interface/DTMtimeRcd.h"
0015 #include "CondFormats/DataRecord/interface/DTRecoConditionsVdriftRcd.h"
0016
0017 #include <string>
0018 #include <fstream>
0019 #include <map>
0020 #include <vector>
0021
0022 class DTMtime;
0023 class DTRecoConditions;
0024 class TFile;
0025 class TH1D;
0026
0027 class DTVDriftAnalyzer : public edm::one::EDAnalyzer<> {
0028 public:
0029
0030 DTVDriftAnalyzer(const edm::ParameterSet& pset);
0031
0032
0033 virtual ~DTVDriftAnalyzer();
0034
0035
0036
0037 virtual void beginRun(const edm::Run& run, const edm::EventSetup& setup);
0038 void analyze(const edm::Event& event, const edm::EventSetup& setup) {}
0039
0040 void endJob();
0041
0042 protected:
0043 private:
0044 std::string getHistoName(const DTWireId& lId) const;
0045 std::string getDistribName(const DTWireId& wId) const;
0046
0047
0048 TFile* theFile;
0049
0050
0051 const DTMtime* mTimeMap;
0052 const DTRecoConditions* vDriftMap_;
0053 bool readLegacyVDriftDB;
0054
0055
0056 std::map<std::pair<int, int>, TH1D*> theVDriftHistoMap;
0057 std::map<std::pair<int, int>, TH1D*> theResoHistoMap;
0058
0059 std::map<std::vector<int>, TH1D*> theVDriftDistribMap;
0060 std::map<std::vector<int>, TH1D*> theResoDistribMap;
0061
0062 edm::ESGetToken<DTMtime, DTMtimeRcd> mTimeMapToken_;
0063 edm::ESGetToken<DTRecoConditions, DTRecoConditionsVdriftRcd> vDriftMapToken_;
0064 };
0065 #endif