Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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