File indexing completed on 2024-09-11 04:32:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #include <memory>
0022
0023
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
0038 #include "TFile.h"
0039 #include "TH1F.h"
0040 #include "TH2F.h"
0041
0042
0043
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
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 };