Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:55

0001 #ifndef DQMOFFLINE_L1TRIGGER_L1TDIFFHARVESTING_H
0002 #define DQMOFFLINE_L1TRIGGER_L1TDIFFHARVESTING_H
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/Framework/interface/LuminosityBlock.h"
0006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0007 
0008 #include "DQMServices/Core/interface/DQMEDHarvester.h"
0009 #include "DQMServices/Core/interface/DQMStore.h"
0010 
0011 #include <string>
0012 #include <vector>
0013 
0014 namespace dqmoffline {
0015   namespace l1t {
0016 
0017     class L1TDiffHarvesting : public DQMEDHarvester {
0018     public:
0019       L1TDiffHarvesting(const edm::ParameterSet &ps);
0020       ~L1TDiffHarvesting() override;
0021 
0022     protected:
0023       void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override;
0024 
0025     private:
0026       class L1TDiffPlotHandler {
0027       public:
0028         L1TDiffPlotHandler(const edm::ParameterSet &ps, std::string plotName);
0029         L1TDiffPlotHandler(const L1TDiffPlotHandler &handler);  // needed for vector collection
0030 
0031         void computeDiff(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter);
0032 
0033         std::string dir1_;
0034         std::string dir2_;
0035         std::string outputDir_;
0036         std::string plotName_;
0037 
0038         MonitorElement *h1_;
0039         MonitorElement *h2_;
0040         MonitorElement *h_diff_;
0041         MonitorElement::Kind histType1_, histType2_;
0042 
0043         void loadHistograms(DQMStore::IGetter &igetter);
0044         bool isValid() const;
0045         void bookDiff(DQMStore::IBooker &ibooker);
0046       };
0047 
0048       typedef std::vector<L1TDiffPlotHandler> L1TDiffPlotHandlers;
0049 
0050       L1TDiffPlotHandlers plotHandlers_;
0051     };
0052 
0053   }  // namespace l1t
0054 }  // namespace dqmoffline
0055 
0056 #endif