Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:07:08

0001 #ifndef DTDCSByLumiTask_H
0002 #define DTDCSByLumiTask_H
0003 
0004 /*
0005  * \file DTDCSByLumiTask.h
0006  *
0007  * \author C. Battilana - CIEMAT
0008  * \author P. Bellan - INFN PD
0009  * \author A. Branca = INFN PD
0010  *
0011 */
0012 
0013 #include "FWCore/Framework/interface/Frameworkfwd.h"
0014 #include "FWCore/Framework/interface/ESHandle.h"
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0018 
0019 #include "DQMServices/Core/interface/DQMStore.h"
0020 #include "FWCore/ServiceRegistry/interface/Service.h"
0021 
0022 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0023 
0024 #include "FWCore/Framework/interface/LuminosityBlock.h"
0025 
0026 #include "FWCore/Utilities/interface/ESGetToken.h"
0027 #include "CondFormats/DataRecord/interface/DTHVStatusRcd.h"
0028 #include "CondFormats/DTObjects/interface/DTHVStatus.h"
0029 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0030 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0031 
0032 #include <vector>
0033 
0034 class DTDCSByLumiTask : public DQMOneLumiEDAnalyzer<> {
0035 public:
0036   /// Constructor
0037   DTDCSByLumiTask(const edm::ParameterSet& ps);
0038 
0039   /// Destructor
0040   ~DTDCSByLumiTask() override;
0041 
0042 protected:
0043   /// Begin Run
0044   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0045 
0046   // Book the histograms
0047   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0048 
0049   /// By Lumi DCS DB Operation
0050   void dqmBeginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const&) override;
0051 
0052   /// By Lumi DCS DB Operation
0053   void dqmEndLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup&) override;
0054 
0055   /// Analyze
0056   void analyze(const edm::Event& e, const edm::EventSetup&) override;
0057 
0058 private:
0059   std::string topFolder() const;
0060 
0061   int theEvents;
0062   int theLumis;
0063 
0064   bool DTHVRecordFound;
0065 
0066   edm::ESHandle<DTGeometry> theDTGeom;
0067 
0068   edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeometryToken_;
0069   edm::ESGetToken<DTHVStatus, DTHVStatusRcd> dtHVStatusToken_;
0070 
0071   std::vector<MonitorElement*> hActiveUnits;
0072 };
0073 
0074 #endif
0075 
0076 /* Local Variables: */
0077 /* show-trailing-whitespace: t */
0078 /* truncate-lines: t */
0079 /* End: */