00001 #ifndef SiStripQualityHotStripIdentifier_H 00002 #define SiStripQualityHotStripIdentifier_H 00003 00004 #include "FWCore/Framework/interface/EventSetup.h" 00005 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00006 #include "FWCore/Utilities/interface/Exception.h" 00007 #include "FWCore/Framework/interface/ESHandle.h" 00008 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00009 00010 #include "CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h" 00011 #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h" 00012 #include "FWCore/ParameterSet/interface/FileInPath.h" 00013 #include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" 00014 #include "CalibFormats/SiStripObjects/interface/SiStripQuality.h" 00015 00016 #include "CalibTracker/SiStripQuality/interface/SiStripQualityHistos.h" 00017 00018 #include <vector> 00019 00020 class SiStripQualityHotStripIdentifier : public ConditionDBWriter<SiStripBadStrip> { 00021 00022 public: 00023 00024 explicit SiStripQualityHotStripIdentifier(const edm::ParameterSet&); 00025 ~SiStripQualityHotStripIdentifier(); 00026 00027 private: 00028 00029 //Will be called at the beginning of the job 00030 void algoBeginJob(const edm::EventSetup&){} 00031 //Will be called at the beginning of each run in the job 00032 void algoBeginRun(const edm::Run &, const edm::EventSetup &); 00033 //Will be called at the beginning of each luminosity block in the run 00034 void algoBeginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &){ resetHistos(); } 00035 //Will be called at the end of the job 00036 void algoEndJob(); 00037 00038 00039 //Will be called at every event 00040 void algoAnalyze(const edm::Event&, const edm::EventSetup&); 00041 00042 SiStripBadStrip* getNewObject(); 00043 00044 00045 void bookHistos(); 00046 void resetHistos(); 00047 void fillHisto(uint32_t detid,float value); 00048 00049 private: 00050 unsigned long long m_cacheID_; 00051 std::string dataLabel_; 00052 edm::ESHandle<SiStripQuality> SiStripQuality_; 00053 const edm::ParameterSet conf_; 00054 edm::FileInPath fp_; 00055 SiStripDetInfoFileReader* reader; 00056 edm::InputTag Cluster_src_; 00057 edm::InputTag Track_src_; 00058 bool tracksCollection_in_EventTree; 00059 00060 unsigned short MinClusterWidth_, MaxClusterWidth_; 00061 00062 SiStrip::QualityHistosMap ClusterPositionHistoMap; 00063 }; 00064 #endif