CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/DQMOffline/CalibTracker/plugins/SiStripQualityHotStripIdentifierRoot.h

Go to the documentation of this file.
00001 #ifndef SiStripQualityHotStripIdentifierRoot_H
00002 #define SiStripQualityHotStripIdentifierRoot_H
00003 
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 #include "FWCore/Utilities/interface/Exception.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00008 
00009 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h"
00010 #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h"
00011 #include "FWCore/ParameterSet/interface/FileInPath.h"
00012 #include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h"
00013 
00014 #include "CalibTracker/SiStripQuality/interface/SiStripQualityHistos.h"
00015 #include "DQMServices/Core/interface/DQMStore.h"
00016 #include "DQMServices/Core/interface/MonitorElement.h"
00017 
00018 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00019 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
00020 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h"
00021 
00022 #include <vector>
00023 #include <iostream>
00024 #include <stdio.h>
00025 #include <string.h>
00026 #include <sstream>
00027 #include <iostream>
00028 #include <fstream>
00029 #include <string>
00030 #include <vector>
00031 #include <sstream>
00032 #include "TFile.h"
00033 #include "TH1F.h"
00034 #include "TH2F.h"
00035 #include "TKey.h"
00036 #include "TObject.h"
00037 #include "TDirectory.h"
00038 #include "TMath.h"
00039 #include "TCanvas.h"
00040 #include "TStyle.h"
00041 #include "TClass.h"
00042 
00043 class SiStripHotStripAlgorithmFromClusterOccupancy;
00044 class SiStripBadAPVAlgorithmFromClusterOccupancy;
00045 class SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy;
00046 
00047 class SiStripQualityHotStripIdentifierRoot : public ConditionDBWriter<SiStripBadStrip> {
00048 
00049 public:
00050 
00051   explicit SiStripQualityHotStripIdentifierRoot(const edm::ParameterSet&);
00052   ~SiStripQualityHotStripIdentifierRoot();
00053 
00054 private:
00055 
00056   //Will be called at the beginning of each run in the job
00057   void algoBeginRun(const edm::Run &, const edm::EventSetup &);
00058   //Will be called at the beginning of each luminosity block in the run
00059   void algoBeginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &){  }
00060   //Will be called at the end of the job
00061   void algoEndJob();
00062 
00063 
00064   //Will be called at every event
00065   void algoAnalyze(const edm::Event&, const edm::EventSetup&){};
00066 
00067   SiStripBadStrip* getNewObject();
00068 
00069   void bookHistos();
00070 
00071 private:
00072   unsigned long long m_cacheID_;
00073   std::string dataLabel_;
00074   edm::ESHandle<SiStripQuality> SiStripQuality_;
00075   bool UseInputDB_;
00076   const edm::ParameterSet conf_;
00077   edm::FileInPath fp_;
00078   SiStripDetInfoFileReader* reader;
00079 
00080   edm::ESHandle<TrackerGeometry> theTrackerGeom;
00081   const TrackerGeometry* _tracker;
00082 
00083   DQMStore* dqmStore_;
00084 
00085   TFile* file0;
00086   std::string filename, dirpath;
00087   unsigned short MinClusterWidth_, MaxClusterWidth_;
00088   double TotNumberOfEvents;
00089   uint32_t calibrationthreshold;
00090 
00091   SiStrip::QualityHistosMap ClusterPositionHistoMap;
00092   SiStripHotStripAlgorithmFromClusterOccupancy*          theIdentifier;
00093   SiStripBadAPVAlgorithmFromClusterOccupancy*            theIdentifier2;
00094   SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy* theIdentifier3;
00095 
00096 };
00097 #endif