Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef ESTrendTask_H
0002 #define ESTrendTask_H
0003 
0004 #include "FWCore/Framework/interface/Event.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006 
0007 #include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
0008 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0009 
0010 #include "DQMServices/Core/interface/DQMEDAnalyzer.h"
0011 
0012 #include "TProfile.h"
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 class ESTrendTask : public DQMEDAnalyzer {
0016 public:
0017   // Constructor
0018   ESTrendTask(const edm::ParameterSet& ps);
0019 
0020   // Destructor
0021   ~ESTrendTask() override {}
0022 
0023 protected:
0024   void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
0025 
0026   // Analyze
0027   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0028 
0029   // BeginRun
0030   void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
0031 
0032   // Update time check
0033   void updateTime(const edm::Event&);
0034 
0035   // Shift bins of TProfile to the right
0036   void shift2Right(TProfile* p, int bins = 1);
0037 
0038   // Shift bins of TProfile to the left
0039   void shift2Left(TProfile* p, int bins = 1);
0040 
0041 private:
0042   int ievt_;
0043 
0044   std::string prefixME_;
0045 
0046   edm::EDGetTokenT<ESRecHitCollection> rechittoken_;
0047   edm::EDGetTokenT<ESRawDataCollection> dccCollections_;
0048 
0049   MonitorElement* hESRecHitTrend_[2][2];
0050   MonitorElement* hESSLinkErrTrend_;
0051   MonitorElement* hESFiberErrTrend_;
0052 
0053   MonitorElement* hESRecHitTrendHr_[2][2];
0054   MonitorElement* hESSLinkErrTrendHr_;
0055   MonitorElement* hESFiberErrTrendHr_;
0056 
0057   long int start_time_;
0058   long int current_time_;
0059   long int last_time_;
0060 };
0061 
0062 #endif