00001 #ifndef SiStripMonitorClient_SiStripDcsInfo_h 00002 #define SiStripMonitorClient_SiStripDcsInfo_h 00003 // -*- C++ -*- 00004 // 00005 // Package: SiStripMonitorClient 00006 // Class : SiStripDcsInfo 00007 // 00016 // 00017 // Author: Suchandra Dutta 00018 // Created: Mon Feb 16 19:00:00 CET 2009 00019 // 00020 00021 #include <string> 00022 00023 #include "FWCore/Framework/interface/EDAnalyzer.h" 00024 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00025 #include "FWCore/Framework/interface/ESHandle.h" 00026 #include "FWCore/Framework/interface/LuminosityBlock.h" 00027 #include "FWCore/Framework/interface/Run.h" 00028 #include "FWCore/Framework/interface/EventSetup.h" 00029 00030 #include <iostream> 00031 #include <fstream> 00032 #include <string> 00033 #include <vector> 00034 #include <map> 00035 00036 class DQMStore; 00037 class MonitorElement; 00038 class SiStripDetVOff; 00039 class SiStripDetCabling; 00040 00041 class SiStripDcsInfo: public edm::EDAnalyzer { 00042 00043 public: 00044 00046 SiStripDcsInfo(const edm::ParameterSet& ps); 00047 00049 virtual ~SiStripDcsInfo(); 00050 00051 private: 00052 00054 void beginJob(); 00055 00057 void beginRun(edm::Run const& run, edm::EventSetup const& eSetup); 00058 00060 void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup) ; 00061 00063 void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup); 00064 00066 void endRun(edm::Run const& run, edm::EventSetup const& eSetup); 00067 00069 void analyze(edm::Event const&, edm::EventSetup const&); 00070 00071 00072 00073 private: 00074 void bookStatus(); 00075 void readStatus(edm::EventSetup const&); 00076 void readCabling(edm::EventSetup const&); 00077 void addBadModules(); 00078 void fillStatus(); 00079 void fillDummyStatus(); 00080 00081 DQMStore* dqmStore_; 00082 MonitorElement * DcsFraction_; 00083 00084 struct SubDetMEs{ 00085 std::string folder_name; 00086 MonitorElement* DcsFractionME; 00087 int TotalDetectors; 00088 std::vector<uint32_t> FaultyDetectors; 00089 }; 00090 00091 std::map <std::string, SubDetMEs> SubDetMEsMap; 00092 unsigned long long m_cacheIDCabling_; 00093 unsigned long long m_cacheIDDcs_; 00094 bool bookedStatus_; 00095 00096 edm::ESHandle<SiStripDetVOff> siStripDetVOff_; 00097 int nFEDConnected_; 00098 00099 int nLumiAnalysed_; 00100 00101 edm::ESHandle< SiStripDetCabling > detCabling_; 00102 }; 00103 #endif