CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/DQM/SiStripMonitorSummary/plugins/SiStripPlotGain.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    SiStripPlotGain
00004 // Class:      SiStripPlotGain
00005 // 
00013 //
00014 // Original Author:  Domenico GIORDANO
00015 //         Created:  Mon Aug 10 10:42:04 CEST 2009
00016 // $Id: SiStripPlotGain.h,v 1.2 2009/09/23 14:20:53 kaussen Exp $
00017 //
00018 //
00019 
00020 
00021 // system include files
00022 #include <memory>
00023 
00024 // user include files
00025 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00026 #include "FWCore/Framework/interface/Frameworkfwd.h"
00027 #include "FWCore/Framework/interface/EDAnalyzer.h"
00028 #include "FWCore/Framework/interface/ESHandle.h"
00029 #include "CondFormats/SiStripObjects/interface/SiStripApvGain.h"
00030 
00031 #include "FWCore/Framework/interface/Event.h"
00032 #include "FWCore/Framework/interface/MakerMacros.h"
00033 
00034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00035 
00036 #include "CalibTracker/Records/interface/SiStripDependentRecords.h"
00037 #include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h"
00038 #include "CommonTools/TrackerMap/interface/TrackerMap.h"
00039 
00040 #include "TH2F.h"
00041 #include "TH1F.h"
00042 #include "TFile.h"
00043 
00044 
00045 //
00046 // class decleration
00047 //
00048 
00049 class SiStripPlotGain : public edm::EDAnalyzer {
00050 public:
00051   explicit SiStripPlotGain(const edm::ParameterSet&);
00052   ~SiStripPlotGain();
00053   
00054   
00055 private:
00056   virtual void beginRun(const edm::Run& run, const edm::EventSetup& es);
00057   virtual void analyze(const edm::Event&, const edm::EventSetup&){};
00058   virtual void endJob();
00059   
00060   void DoAnalysis(const SiStripApvGain&);
00061   void getHistos(const uint32_t & detid,std::vector<TH1F*>& histos);
00062   TH1F* getHisto(const long unsigned int& index);
00063 
00064   unsigned long long getCache(const edm::EventSetup & eSetup){ return eSetup.get<SiStripApvGainRcd>().cacheIdentifier();}
00065 
00066 
00067      // ----------member data ---------------------------
00068 
00069 
00070   SiStripDetInfoFileReader * fr;
00071 
00072   edm::ESHandle<SiStripApvGain> Handle_;
00073 
00074 
00075   TFile* file;
00076   std::vector<TH1F*> vTH1;
00077 
00078   TrackerMap *tkmap;
00079 
00080   
00081   unsigned long long cacheID;
00082 };
00083 
00084