Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef DTScalerInfoTask_H
0002 #define DTScalerInfoTask_H
0003 
0004 /*
0005  * \file DTScalerInfoTask.h
0006  *
0007  * \author C. Battilana - CIEMAT
0008  *
0009 */
0010 
0011 #include "FWCore/Framework/interface/Frameworkfwd.h"
0012 #include "DataFormats/Common/interface/Handle.h"
0013 #include "FWCore/Framework/interface/LuminosityBlock.h"
0014 
0015 #include "FWCore/Framework/interface/Event.h"
0016 #include "FWCore/Framework/interface/MakerMacros.h"
0017 
0018 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0019 
0020 #include "DQMServices/Core/interface/DQMStore.h"
0021 
0022 #include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
0023 
0024 #include "DataFormats/DTDigi/interface/DTLocalTriggerCollection.h"
0025 #include "DataFormats/Luminosity/interface/LumiDetails.h"
0026 #include "DataFormats/Scalers/interface/LumiScalers.h"
0027 
0028 #include <vector>
0029 #include <string>
0030 #include <map>
0031 
0032 class DTTimeEvolutionHisto;
0033 
0034 class DTScalerInfoTask : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
0035   friend class DTMonitorModule;
0036 
0037 public:
0038   /// Constructor
0039   DTScalerInfoTask(const edm::ParameterSet& ps);
0040 
0041   /// Destructor
0042   ~DTScalerInfoTask() override;
0043 
0044 protected:
0045   // Book the histograms
0046   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0047 
0048   ///Beginrun
0049   void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
0050 
0051   /// Analyze
0052   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0053 
0054   /// To reset the MEs
0055   void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
0056 
0057   /// Perform trend plot operations
0058   void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
0059 
0060 private:
0061   int nEvents;
0062   int nEventsInLS;
0063 
0064   edm::ParameterSet theParams;
0065 
0066   edm::EDGetTokenT<LumiScalersCollection> scalerToken_;
0067 
0068   std::map<std::string, DTTimeEvolutionHisto*> trendHistos;
0069   MonitorElement* nEventMonitor;
0070 };
0071 
0072 #endif
0073 
0074 /* Local Variables: */
0075 /* show-trailing-whitespace: t */
0076 /* truncate-lines: t */
0077 /* End: */