![]() |
![]() |
00001 #ifndef SiStripQualityHotStripIdentifier_H 00002 #define SiStripQualityHotStripIdentifier_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 00016 #include <vector> 00017 00018 class SiStripQualityHotStripIdentifier : public ConditionDBWriter<SiStripBadStrip> { 00019 00020 public: 00021 00022 explicit SiStripQualityHotStripIdentifier(const edm::ParameterSet&); 00023 ~SiStripQualityHotStripIdentifier(); 00024 00025 private: 00026 00027 //Will be called at the beginning of the job 00028 void algoBeginJob(const edm::EventSetup&){ resetHistos(); } 00029 //Will be called at the beginning of each run in the job 00030 void algoBeginRun(const edm::Run &, const edm::EventSetup &){ resetHistos(); } 00031 //Will be called at the beginning of each luminosity block in the run 00032 void algoBeginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &){ resetHistos(); } 00033 //Will be called at the end of the job 00034 void algoEndJob(); 00035 00036 00037 //Will be called at every event 00038 void algoAnalyze(const edm::Event&, const edm::EventSetup&); 00039 00040 SiStripBadStrip* getNewObject(); 00041 00042 00043 void bookHistos(); 00044 void resetHistos(); 00045 void fillHisto(uint32_t detid,float value); 00046 00047 private: 00048 const edm::ParameterSet conf_; 00049 edm::FileInPath fp_; 00050 SiStripDetInfoFileReader* reader; 00051 edm::InputTag Cluster_src_; 00052 edm::InputTag Track_src_; 00053 bool tracksCollection_in_EventTree; 00054 00055 unsigned short MinClusterWidth_, MaxClusterWidth_; 00056 00057 SiStrip::QualityHistosMap ClusterPositionHistoMap; 00058 }; 00059 #endif