Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:09:09

0001 #ifndef TrackingMonitorClient_TrackingCertificationInfo_h
0002 #define TrackingMonitorClient_TrackingCertificationInfo_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     TrackingMonitorClient
0006 // Class  :     TrackingCertificationInfo
0007 //
0008 /**\class TrackingCertificationInfo TrackingCertificationInfo.h DQM/TrackingMonitorClient/interface/TrackingCertificationInfo.h
0009 
0010  Description: 
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 
0017 #include <string>
0018 
0019 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 #include "FWCore/Framework/interface/ESHandle.h"
0022 #include "FWCore/Framework/interface/ESWatcher.h"
0023 #include "FWCore/Framework/interface/LuminosityBlock.h"
0024 #include "FWCore/Framework/interface/Run.h"
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 
0027 #include "DQMServices/Core/interface/DQMStore.h"
0028 
0029 #include <fstream>
0030 #include <string>
0031 #include <vector>
0032 #include <map>
0033 
0034 class SiStripDetCabling;
0035 class SiStripDetCablingRcd;
0036 class RunInfo;
0037 class RunInfoRcd;
0038 
0039 class TrackingCertificationInfo : public DQMEDHarvester {
0040 public:
0041   /// Constructor
0042   TrackingCertificationInfo(const edm::ParameterSet& ps);
0043 
0044   /// Destructor
0045   ~TrackingCertificationInfo() override;
0046 
0047 private:
0048   /// BeginJob
0049   void beginJob() override;
0050 
0051   /// Begin Run
0052   void beginRun(edm::Run const& run, edm::EventSetup const& eSetup) override;
0053 
0054   /// End Of Luminosity
0055   void dqmEndLuminosityBlock(DQMStore::IBooker& ibooker_,
0056                              DQMStore::IGetter& igetter_,
0057                              edm::LuminosityBlock const& lumiSeg,
0058                              edm::EventSetup const& iSetup) override;
0059 
0060   /// EndJob
0061   void dqmEndJob(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_) override;
0062 
0063 private:
0064   void bookTrackingCertificationMEs(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0065   void bookTrackingCertificationMEsAtLumi(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0066 
0067   void resetTrackingCertificationMEs(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0068   void resetTrackingCertificationMEsAtLumi(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0069 
0070   void fillTrackingCertificationMEs(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0071   void fillTrackingCertificationMEsAtLumi(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0072 
0073   void fillDummyTrackingCertification(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0074   void fillDummyTrackingCertificationAtLumi(DQMStore::IBooker& ibooker_, DQMStore::IGetter& igetter_);
0075 
0076   struct TrackingMEs {
0077     MonitorElement* TrackingFlag;
0078   };
0079 
0080   struct TrackingLSMEs {
0081     MonitorElement* TrackingFlag;
0082   };
0083 
0084   std::map<std::string, TrackingMEs> TrackingMEsMap;
0085   std::map<std::string, TrackingLSMEs> TrackingLSMEsMap;
0086 
0087   MonitorElement* TrackingCertification;
0088   MonitorElement* TrackingCertificationSummaryMap;
0089 
0090   MonitorElement* TrackingLSCertification;
0091 
0092   edm::ParameterSet pSet_;
0093 
0094   bool trackingCertificationBooked_;
0095   bool trackingLSCertificationBooked_;
0096   int nFEDConnected_;
0097   bool allPixelFEDConnected_;
0098   bool verbose_;
0099   std::string TopFolderName_;
0100 
0101   bool checkPixelFEDs_;
0102 
0103   unsigned long long m_cacheID_;
0104 
0105   edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
0106   const RunInfo* sumFED_ = nullptr;
0107   edm::ESGetToken<SiStripDetCabling, SiStripDetCablingRcd> detCablingToken_;
0108   edm::ESWatcher<SiStripDetCablingRcd> fedDetCablingWatcher_;
0109   const SiStripDetCabling* detCabling_;
0110 
0111   std::vector<std::string> SubDetFolder;
0112 };
0113 #endif