Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-27 04:04:13

0001 #ifndef CalibTracker_SiPixelESProducers_test_SiPixelFakeGainOfflineReader
0002 #define CalibTracker_SiPixelESProducers_test_SiPixelFakeGainOfflineReader
0003 // -*- C++ -*-
0004 //
0005 // Package:    SiPixelFakeGainOfflineReader
0006 // Class:      SiPixelFakeGainOfflineReader
0007 //
0008 /**\class SiPixelFakeGainOfflineReader SiPixelFakeGainOfflineReader.h SiPixelESProducers/test/SiPixelFakeGainOfflineReader.h
0009 
0010  Description: Test analyzer for fake pixel calibrationOffline
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Vincenzo CHIOCHIA
0017 //         Created:  Tue Oct 17 17:40:56 CEST 2006
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/SiPixelGainCalibrationOfflineService.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 SiPixelFakeGainOfflineReader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0035   public:
0036     explicit SiPixelFakeGainOfflineReader(const edm::ParameterSet& iConfig);
0037 
0038     ~SiPixelFakeGainOfflineReader(){};
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 
0047     SiPixelGainCalibrationOfflineService SiPixelGainCalibrationOfflineService_;
0048     edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomToken_;
0049     edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeomTokenBeginRun_;
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 }  // namespace cms
0056 #endif