14 using namespace rpcrawtodigi;
17 typedef std::map<std::pair<int, int>,
int>::const_iterator
IT;
21 IT im = theRecordTypes.find(make_pair(fedId, type));
22 return (im == theRecordTypes.end()) ? 0 : im->second;
26 for (
IT im = theReadoutErrors.begin(); im != theReadoutErrors.end(); ++im) {
27 if (im->first.first != fedId)
36 for (
IT im = theRecordTypes.begin(); im != theRecordTypes.end(); ++im) {
37 if (im->first.first != fedId)
68 theRecordTypes[make_pair(fed, type)] +=
weight;
72 theReadoutErrors[make_pair(fed, e.
rawCode())] += weight;
77 theRecordTypes[make_pair(irt->first.first, irt->first.second)] += irt->second;
81 theReadoutErrors[make_pair(ire->first.first, ire->first.second)] += ire->second;
85 theGoodEvents[make_pair(ire->first.first, ire->first.second)] += ire->second;
89 theBadEvents[make_pair(ire->first.first, ire->first.second)] += ire->second;
94 std::ostringstream
str;
95 for (
IT irt = theRecordTypes.begin(); irt != theRecordTypes.end(); ++irt) {
96 str <<
"RECORD (" << irt->first.first <<
"," << irt->first.second <<
")" << irt->second;
98 for (
IT ire = theReadoutErrors.begin(); ire != theReadoutErrors.end(); ++ire) {
99 str <<
"ERROR(" << ire->first.first <<
"," << ire->first.second <<
")=" << ire->second << endl;
std::map< std::pair< int, int >, int > theReadoutErrors
int fedErrorRecords(int fedId) const
int fedBxRecords(int fedId) const
int fedFormatErrors(int fedId) const
void addDccRecord(int fedId, const rpcrawtodigi::DataRecord &record, int weight=1)
std::string print() const
std::map< std::pair< int, int >, int > theRecordTypes
std::vector< LinkConnSpec >::const_iterator IT
std::map< std::pair< int, int >, int > theGoodEvents
std::map< std::pair< int, int >, int > theBadEvents
void addReadoutError(int fedId, const rpcrawtodigi::ReadoutError &error, int weight=1)
unsigned int rawCode() const
void operator+=(const RPCRawDataCounts &)
DataRecordType type() const