Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:18

0001 #ifndef EcalFEDMonitor_H
0002 #define EcalFEDMonitor_H
0003 
0004 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0005 #include "DQMServices/Core/interface/DQMStore.h"
0006 
0007 #include "FWCore/Framework/interface/ESHandle.h"
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "FWCore/ServiceRegistry/interface/Service.h"
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 #include "FWCore/Utilities/interface/InputTag.h"
0013 
0014 #include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
0015 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
0016 
0017 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0018 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0019 
0020 #include "DataFormats/EcalDetId/interface/EcalDetIdCollections.h"
0021 
0022 #include "DQM/EcalCommon/interface/EcalDQMCommonUtils.h"
0023 
0024 #include <iostream>
0025 
0026 // Making the class templated temporarily, until HLT sequence can be fixed (is using EBHltTask and EEHltTask currently)
0027 template <int SUBDET>
0028 class EcalFEDMonitorTemp : public DQMEDAnalyzer {
0029 public:
0030   EcalFEDMonitorTemp(edm::ParameterSet const &);
0031   ~EcalFEDMonitorTemp() override {}
0032 
0033 private:
0034   void analyze(edm::Event const &, edm::EventSetup const &) override;
0035   void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override;
0036 
0037   void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0038 
0039   enum MEs { kEBOccupancy, kEBFatal, kEBNonFatal, kEEOccupancy, kEEFatal, kEENonFatal, nMEs };
0040 
0041   EcalElectronicsMapping const *electronicsMap;
0042   void setElectronicsMap(edm::EventSetup const &);
0043   EcalElectronicsMapping const *GetElectronicsMap();
0044 
0045   std::string folderName_;
0046 
0047   edm::EDGetTokenT<FEDRawDataCollection> FEDRawDataToken_;
0048   edm::EDGetTokenT<EBDetIdCollection> ebGainErrorsToken_;
0049   edm::EDGetTokenT<EEDetIdCollection> eeGainErrorsToken_;
0050   edm::EDGetTokenT<EBDetIdCollection> ebChIdErrorsToken_;
0051   edm::EDGetTokenT<EEDetIdCollection> eeChIdErrorsToken_;
0052   edm::EDGetTokenT<EBDetIdCollection> ebGainSwitchErrorsToken_;
0053   edm::EDGetTokenT<EEDetIdCollection> eeGainSwitchErrorsToken_;
0054   edm::EDGetTokenT<EcalElectronicsIdCollection> towerIdErrorsToken_;
0055   edm::EDGetTokenT<EcalElectronicsIdCollection> blockSizeErrorsToken_;
0056   edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> elecMapHandle;
0057 
0058   std::vector<MonitorElement *> MEs_;
0059 };
0060 
0061 #endif