CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/DQM/SiStripMonitorClient/plugins/SiStripDaqInfo.h

Go to the documentation of this file.
00001 #ifndef SiStripMonitorClient_SiStripDaqInfo_h
00002 #define SiStripMonitorClient_SiStripDaqInfo_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     SiStripMonitorClient
00006 // Class  :     SiStripDaqInfo
00007 // 
00016 //
00017 //          Author:  Suchandra Dutta
00018 //         Created:  Thu Dec 11 17:50:00 CET 2008
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 SiStripFedCabling;
00039 
00040 class SiStripDaqInfo: public edm::EDAnalyzer {
00041 
00042  public:
00043 
00045   SiStripDaqInfo(const edm::ParameterSet& ps);
00046   
00048   virtual ~SiStripDaqInfo();
00049 
00050  private:
00051 
00053   void beginJob();
00054 
00056   void beginRun(edm::Run const& run, edm::EventSetup const& eSetup);
00057 
00059   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup);
00060 
00062   void endRun(edm::Run const& run, edm::EventSetup const& eSetup);
00063 
00065   void analyze(edm::Event const&, edm::EventSetup const&);
00066 
00067 
00068 private:
00069   void readFedIds(const edm::ESHandle<SiStripFedCabling>& fedcabling);
00070   void readSubdetFedFractions(std::vector<int>& fed_ids);
00071   void bookStatus();
00072   void fillDummyStatus();
00073   void findExcludedModule(unsigned short fed_id);
00074 
00075   std::map<std::string,std::vector<unsigned short> > subDetFedMap;
00076 
00077   DQMStore* dqmStore_;
00078   MonitorElement * DaqFraction_;
00079 
00080   struct SubDetMEs{
00081     MonitorElement* DaqFractionME;
00082     int ConnectedFeds;
00083   };
00084 
00085   std::map <std::string, SubDetMEs> SubDetMEsMap;
00086 
00087   unsigned long long m_cacheID_;
00088   int nFedTotal;
00089   bool bookedStatus_;
00090 
00091   edm::ESHandle< SiStripFedCabling > fedCabling_;
00092 };
00093 #endif