RPCMonitorRaw

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
#ifndef DQM_RPCMonitorModule_RPCMonitorRaw_H
#define DQM_RPCMonitorModule_RPCMonitorRaw_H
/** \class RPCMonitorRaw 
 **  Analyse errors in raw data stream as RPCRawDataCounts produced by RPCRawToDigi  
 **/

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

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

#include "DataFormats/RPCDigi/interface/RPCRawDataCounts.h"

class RPCMonitorRaw : public DQMEDAnalyzer {
public:
  explicit RPCMonitorRaw(const edm::ParameterSet& cfg);
  ~RPCMonitorRaw() override;

  void analyze(const edm::Event&, const edm::EventSetup&) override;
  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;

private:
  MonitorElement* me_t[3];
  MonitorElement* me_e[3];
  MonitorElement* me_mapGoodEvents;
  MonitorElement* me_mapBadEvents;

  edm::ParameterSet theConfig;
  std::vector<MonitorElement*> theWatchedErrorHistos[3];  // histos with physical locations
                                                          // (RMB,LINK)of selected  ReadoutErrors

  unsigned int theWatchedErrorHistoPos[10];  // for a give error type show its position
                                             // (1..10) in theWatchedErrorHistos
                                             // to get index one has to subtract -1
                                             // 0 is not selected error type

  edm::EDGetTokenT<RPCRawDataCounts> rpcRawDataCountsTag_;
};

#endif