Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:45

0001 #ifndef SiStripMonitorClient_SiStripCertificationInfo_h
0002 #define SiStripMonitorClient_SiStripCertificationInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     SiStripMonitorClient
0006 // Class  :     SiStripCertificationInfo
0007 //
0008 /**\class SiStripCertificationInfo SiStripCertificationInfo.h
0009    DQM/SiStripMonitorCluster/interface/SiStripCertificationInfo.h
0010 
0011    Description:
0012    Checks the # of SiStrip FEDs from DAQ
0013    Usage:
0014    <usage>
0015 
0016 */
0017 //
0018 //          Author:  Suchandra Dutta
0019 //         reated:  Mon Feb 16 19200:00 CET 2009
0020 //
0021 
0022 #include <string>
0023 
0024 #include "FWCore/Framework/interface/EDAnalyzer.h"
0025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0026 #include "FWCore/Framework/interface/ESHandle.h"
0027 #include "FWCore/Framework/interface/LuminosityBlock.h"
0028 #include "FWCore/Framework/interface/Run.h"
0029 #include "FWCore/Framework/interface/EventSetup.h"
0030 #include "DQMServices/Core/interface/DQMStore.h"
0031 
0032 #include "CalibTracker/Records/interface/SiStripDetCablingRcd.h"
0033 #include "CalibFormats/SiStripObjects/interface/SiStripDetCabling.h"
0034 #include "DataFormats/TrackerCommon/interface/TrackerTopology.h"
0035 #include "Geometry/Records/interface/TrackerTopologyRcd.h"
0036 #include "CondFormats/DataRecord/interface/RunSummaryRcd.h"
0037 
0038 #include <iostream>
0039 #include <fstream>
0040 #include <string>
0041 #include <vector>
0042 #include <map>
0043 
0044 class SiStripDetCabling;
0045 class RunInfo;
0046 
0047 class SiStripCertificationInfo : public edm::EDAnalyzer {
0048 public:
0049   typedef dqm::harvesting::MonitorElement MonitorElement;
0050   typedef dqm::harvesting::DQMStore DQMStore;
0051 
0052   SiStripCertificationInfo(const edm::ParameterSet& ps);
0053 
0054 private:
0055   void beginRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
0056   void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& iSetup) override;
0057   void endRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
0058   void analyze(edm::Event const&, edm::EventSetup const&) override;
0059 
0060   void bookSiStripCertificationMEs(DQMStore& dqm_store);
0061   void resetSiStripCertificationMEs(DQMStore& dqm_store);
0062   void fillSiStripCertificationMEs(DQMStore& dqm_store, edm::EventSetup const& eSetup);
0063 
0064   void fillDummySiStripCertification(DQMStore& dqm_store);
0065   void fillSiStripCertificationMEsAtLumi(DQMStore& dqm_store);
0066 
0067   struct SubDetMEs {
0068     MonitorElement* det_fractionME;
0069     std::string folder_name;
0070     std::string subdet_tag;
0071     int n_layer;
0072   };
0073 
0074   MonitorElement* SiStripCertification{nullptr};
0075   MonitorElement* SiStripCertificationMap{nullptr};
0076   std::map<std::string, SubDetMEs> SubDetMEsMap{};
0077   MonitorElement* SiStripCertificationSummaryMap{nullptr};
0078 
0079   bool sistripCertificationBooked_{false};
0080 
0081   edm::ESHandle<SiStripDetCabling> detCabling_{};
0082 
0083   int nFEDConnected_{};
0084 
0085   edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> detCablingToken_;
0086   edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> tTopoToken_;
0087   edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
0088 };
0089 #endif