00001 #ifndef SiPixelMonitorRawData_SiPixelRawDataErrorSource_h 00002 #define SiPixelMonitorRawData_SiPixelRawDataErrorSource_h 00003 // -*- C++ -*- 00004 // 00005 // Package: SiPixelMonitorRawData 00006 // Class : SiPixelRawDataErrorSource 00007 // 00023 // 00024 // Original Author: Andrew York 00025 // 00026 00027 #include <memory> 00028 00029 // user include files 00030 #include "FWCore/Framework/interface/Frameworkfwd.h" 00031 #include "FWCore/Framework/interface/EDAnalyzer.h" 00032 #include "FWCore/Framework/interface/MakerMacros.h" 00033 00034 #include "DQMServices/Core/interface/DQMStore.h" 00035 00036 #include "DQM/SiPixelMonitorRawData/interface/SiPixelRawDataErrorModule.h" 00037 00038 #include "DataFormats/Common/interface/DetSetVector.h" 00039 #include "DataFormats/SiPixelRawData/interface/SiPixelRawDataError.h" 00040 #include "DataFormats/Common/interface/EDProduct.h" 00041 00042 00043 #include "FWCore/Framework/interface/EDProducer.h" 00044 #include "FWCore/Framework/interface/Event.h" 00045 #include "FWCore/Framework/interface/EventSetup.h" 00046 #include "DataFormats/Common/interface/Handle.h" 00047 #include "FWCore/Framework/interface/ESHandle.h" 00048 00049 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00050 00051 #include <boost/cstdint.hpp> 00052 00053 class SiPixelRawDataErrorSource : public edm::EDAnalyzer { 00054 public: 00055 explicit SiPixelRawDataErrorSource(const edm::ParameterSet& conf); 00056 ~SiPixelRawDataErrorSource(); 00057 00058 typedef edm::DetSet<SiPixelRawDataError>::const_iterator ErrorIterator; 00059 00060 virtual void analyze(const edm::Event&, const edm::EventSetup&); 00061 virtual void beginJob() ; 00062 virtual void endJob() ; 00063 virtual void beginRun(const edm::Run&, edm::EventSetup const&) ; 00064 00065 virtual void buildStructure(edm::EventSetup const&); 00066 virtual void bookMEs(); 00067 00068 private: 00069 edm::ParameterSet conf_; 00070 edm::InputTag src_; 00071 bool saveFile; 00072 bool isPIB; 00073 bool slowDown; 00074 bool reducedSet; 00075 bool modOn; 00076 bool ladOn; 00077 bool bladeOn; 00078 int eventNo; 00079 DQMStore* theDMBE; 00080 std::map<uint32_t,SiPixelRawDataErrorModule*> thePixelStructure; 00081 std::map<uint32_t,SiPixelRawDataErrorModule*> theFEDStructure; 00082 bool firstRun; 00083 MonitorElement* byLumiErrors; 00084 MonitorElement* errorRate; 00085 00086 }; 00087 00088 #endif