RPCRawDataCounts

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
#ifndef DataFormats_RPCDigi_RPCRawDataCounts_H
#define DataFormats_RPCDigi_RPCRawDataCounts_H

#include <map>
#include <vector>
#include <string>

namespace rpcrawtodigi {
  class DataRecord;
}
namespace rpcrawtodigi {
  class ReadoutError;
}

class RPCRawDataCounts {
public:
  RPCRawDataCounts() {}
  ~RPCRawDataCounts() {}
  void addDccRecord(int fedId, const rpcrawtodigi::DataRecord& record, int weight = 1);
  void addReadoutError(int fedId, const rpcrawtodigi::ReadoutError& error, int weight = 1);
  void operator+=(const RPCRawDataCounts&);
  std::string print() const;

  int fedBxRecords(int fedId) const;
  int fedFormatErrors(int fedId) const;
  int fedErrorRecords(int fedId) const;

private:
  friend class RPCMonitorRaw;
  std::map<std::pair<int, int>, int> theRecordTypes;
  std::map<std::pair<int, int>, int> theReadoutErrors;
  std::map<std::pair<int, int>, int> theGoodEvents;
  std::map<std::pair<int, int>, int> theBadEvents;
};
#endif