ESRawDataTask

ESRawLSCache

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
#ifndef ESRawDataTask_H
#define ESRawDataTask_H

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include "DataFormats/EcalRawData/interface/EcalRawDataCollections.h"
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"

#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"

struct ESRawLSCache {
  int ievtLS_;
};

class ESRawDataTask : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<ESRawLSCache>> {
public:
  ESRawDataTask(const edm::ParameterSet& ps);
  ~ESRawDataTask() override {}

protected:
  /// Analyze
  void analyze(const edm::Event& e, const edm::EventSetup& c) override;

  /// Setup
  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;

  /// Begin Lumi
  std::shared_ptr<ESRawLSCache> globalBeginLuminosityBlock(const edm::LuminosityBlock& lumi,
                                                           const edm::EventSetup& c) const override;
  /// End Lumi
  void globalEndLuminosityBlock(const edm::LuminosityBlock& lumi, const edm::EventSetup& c) override;

private:
  int ievt_;

  std::string prefixME_;

  edm::EDGetTokenT<ESRawDataCollection> dccCollections_;
  edm::EDGetTokenT<FEDRawDataCollection> FEDRawDataCollection_;

  MonitorElement* meL1ADCCErrors_;
  MonitorElement* meL1ADCCErrorsByLS_;
  MonitorElement* meBXDCCErrors_;
  MonitorElement* meBXDCCErrorsByLS_;
  MonitorElement* meOrbitNumberDCCErrors_;
  MonitorElement* meOrbitNumberDCCErrorsByLS_;
  MonitorElement* meL1ADiff_;
  MonitorElement* meBXDiff_;
  MonitorElement* meOrbitNumberDiff_;

  int runNum_;
};

#endif