Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:43:37

0001 // -*- C++ -*-
0002 //
0003 // Package:    SiStripPlotGain
0004 // Class:      SiStripPlotGain
0005 //
0006 /**\class SiStripPlotGain SiStripPlotGain.cc
0007  DQM/SiStripMonitorSummary/plugins/SiStripPlotGain.cc
0008 
0009  Description: <one line class summary>
0010 
0011  Implementation:
0012      <Notes on implementation>
0013 */
0014 //
0015 // Original Author:  Domenico GIORDANO
0016 //         Created:  Mon Aug 10 10:42:04 CEST 2009
0017 //
0018 //
0019 
0020 // system include files
0021 #include <memory>
0022 
0023 // user include files
0024 #include "CalibTracker/Records/interface/SiStripDependentRecords.h"
0025 #include "CommonTools/TrackerMap/interface/TrackerMap.h"
0026 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
0027 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0028 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0029 #include "FWCore/Framework/interface/ESWatcher.h"
0030 #include "FWCore/Framework/interface/Event.h"
0031 #include "FWCore/Framework/interface/Frameworkfwd.h"
0032 #include "FWCore/Framework/interface/MakerMacros.h"
0033 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0035 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0036 
0037 // ROOT includes
0038 #include "TFile.h"
0039 #include "TH1F.h"
0040 #include "TH2F.h"
0041 
0042 //
0043 // class decleration
0044 //
0045 class TrackerTopology;
0046 
0047 class SiStripPlotGain : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
0048 public:
0049   explicit SiStripPlotGain(const edm::ParameterSet &);
0050   ~SiStripPlotGain() override = default;
0051 
0052 private:
0053   void beginRun(const edm::Run &run, const edm::EventSetup &es) override;
0054   void analyze(const edm::Event &, const edm::EventSetup &) override{};
0055   void endRun(const edm::Run &run, const edm::EventSetup &es) override{};
0056   void endJob() override;
0057 
0058   void DoAnalysis(const TrackerTopology &tTopo, const SiStripApvGain &);
0059   void getHistos(DetId detid, const TrackerTopology &tTopo, std::vector<TH1F *> &histos);
0060   TH1F *getHisto(const long unsigned int &index);
0061 
0062   // ----------member data ---------------------------
0063   edm::ESWatcher<SiStripApvGainRcd> gainWatcher_;
0064   edm::ESGetToken<SiStripApvGain, SiStripApvGainRcd> gainToken_;
0065   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
0066 
0067   TFile *file;
0068   std::vector<TH1F *> vTH1;
0069 
0070   TrackerMap *tkmap;
0071 };