File indexing completed on 2024-09-07 04:35:05
0001 #ifndef CalibTracker_SiPixelESProducers_test_SiPixelFakeGainReader
0002 #define CalibTracker_SiPixelESProducers_test_SiPixelFakeGainReader
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0023 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0024 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0025 #include "CalibTracker/SiPixelESProducers/interface/SiPixelGainCalibrationService.h"
0026
0027 #include "TROOT.h"
0028 #include "TFile.h"
0029 #include "TTree.h"
0030 #include "TBranch.h"
0031 #include "TH1F.h"
0032
0033 namespace cms {
0034 class SiPixelFakeGainReader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0035 public:
0036 explicit SiPixelFakeGainReader(const edm::ParameterSet& iConfig);
0037
0038 ~SiPixelFakeGainReader() {}
0039 virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
0040 virtual void endRun(const edm::Run&, const edm::EventSetup&) override;
0041 virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
0042 virtual void endJob() override;
0043
0044 private:
0045 edm::ParameterSet conf_;
0046 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomToken_;
0047 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomTokenBeginRun_;
0048 SiPixelGainCalibrationService SiPixelGainCalibrationService_;
0049
0050 std::map<uint32_t, TH1F*> _TH1F_Pedestals_m;
0051 std::map<uint32_t, TH1F*> _TH1F_Gains_m;
0052 std::string filename_;
0053 TFile* fFile;
0054 };
0055 }
0056 #endif