File indexing completed on 2021-02-14 13:09:25
0001 #ifndef CastorMonitorModule_H
0002 #define CastorMonitorModule_H
0003
0004 #include "CalibFormats/CastorObjects/interface/CastorDbService.h"
0005 #include "CalibFormats/CastorObjects/interface/CastorDbRecord.h"
0006
0007 #include "FWCore/Framework/interface/EDAnalyzer.h"
0008 #include "FWCore/Framework/interface/Event.h"
0009 #include "FWCore/Framework/interface/Frameworkfwd.h"
0010 #include "FWCore/Framework/interface/MakerMacros.h"
0011 #include "FWCore/Framework/interface/Run.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/ServiceRegistry/interface/Service.h"
0014
0015 #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
0016 #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
0017 #include "DataFormats/L1Trigger/interface/BXVector.h"
0018 #include "L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h"
0019
0020 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0021 #include "DQMServices/Core/interface/DQMStore.h"
0022
0023 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0024 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0025 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0026 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0027 #include "Geometry/Records/interface/IdealGeometryRecord.h"
0028
0029 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0030 #include "SimDataFormats/CaloHit/interface/PCaloHit.h"
0031 #include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
0032 #include "SimG4CMS/Calo/interface/CaloHit.h"
0033
0034 #include "DataFormats/Provenance/interface/EventID.h"
0035 #include "FWCore/Utilities/interface/CPUTimer.h"
0036 #include "FWCore/Utilities/interface/EDGetToken.h"
0037 #include "FWCore/Utilities/interface/ESGetToken.h"
0038
0039 #include "DataFormats/Common/interface/TriggerResults.h"
0040 #include "FWCore/Common/interface/TriggerNames.h"
0041
0042 #include "DataFormats/CastorReco/interface/CastorCluster.h"
0043 #include "DataFormats/CastorReco/interface/CastorJet.h"
0044 #include "DataFormats/CastorReco/interface/CastorTower.h"
0045 #include "DataFormats/DetId/interface/DetId.h"
0046 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0047 #include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
0048 #include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h" //no CastorUnpackerReport at the moment
0049
0050
0051 #include "DQM/CastorMonitor/interface/CastorDigiMonitor.h"
0052 #include "DQM/CastorMonitor/interface/CastorRecHitMonitor.h"
0053
0054 #include "DQM/CastorMonitor/interface/CastorLEDMonitor.h"
0055
0056
0057 #include "CalibCalorimetry/CastorCalib/interface/CastorDbASCIIIO.h" //-- use to get/dump Calib to DB
0058 #include "CondFormats/CastorObjects/interface/CastorChannelQuality.h" //-- use to get/hold channel status
0059 #include "CondFormats/DataRecord/interface/CastorChannelQualityRcd.h"
0060
0061 #include <fstream>
0062 #include <iostream>
0063 #include <memory>
0064 #include <string>
0065 #include <sys/time.h>
0066 #include <vector>
0067
0068 class CastorMonitorModule : public DQMOneEDAnalyzer<> {
0069 public:
0070 CastorMonitorModule(const edm::ParameterSet &ps);
0071 ~CastorMonitorModule() override;
0072
0073 protected:
0074 void analyze(const edm::Event &iEvent, const edm::EventSetup &) override;
0075
0076 void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override;
0077 void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override;
0078
0079 void dqmEndRun(const edm::Run &run, const edm::EventSetup &) override;
0080
0081 private:
0082 int fVerbosity;
0083 std::string subsystemname_;
0084
0085 int ievt_;
0086
0087
0088
0089
0090 edm::EDGetTokenT<edm::TriggerResults> tokenTriggerResults;
0091 edm::EDGetTokenT<FEDRawDataCollection> inputTokenRaw_;
0092 edm::EDGetTokenT<HcalUnpackerReport> inputTokenReport_;
0093 edm::EDGetTokenT<CastorDigiCollection> inputTokenDigi_;
0094 edm::EDGetTokenT<CastorRecHitCollection> inputTokenRecHitCASTOR_;
0095 typedef std::vector<reco::CastorTower> CastorTowerCollection;
0096 edm::EDGetTokenT<CastorTowerCollection> inputTokenCastorTowers_;
0097 typedef std::vector<reco::BasicJet> BasicJetCollection;
0098 edm::EDGetTokenT<BasicJetCollection> JetAlgorithm;
0099
0100 edm::ESGetToken<CastorDbService, CastorDbRecord> castorDbServiceToken_;
0101
0102
0103
0104 std::unique_ptr<CastorRecHitMonitor> RecHitMon_;
0105 std::unique_ptr<CastorDigiMonitor> DigiMon_;
0106 std::unique_ptr<CastorLEDMonitor> LedMon_;
0107
0108
0109
0110 MonitorElement *CastorEventProduct;
0111 MonitorElement *hunpkrep;
0112
0113 bool showTiming_;
0114 edm::CPUTimer cpu_timer;
0115 };
0116
0117 #endif