CMS 3D CMS Logo

HcalUnpackerReport.cc
Go to the documentation of this file.
2 
4  : unmappedDigis_(0),
5  unmappedTPDigis_(0),
6  spigotFormatErrors_(0),
7  badqualityDigis_(0),
8  totalDigis_(0),
9  totalTPDigis_(0),
10  totalHOTPDigis_(0),
11  unsuppressed_(false),
12  emptyEventSpigots_(0),
13  ofwSpigots_(0),
14  busySpigots_(0) {}
15 
16 bool HcalUnpackerReport::errorFree() const { return FEDsError_.empty() && spigotFormatErrors_ == 0; }
17 
18 bool HcalUnpackerReport::anyValidHCAL() const { return !FEDsUnpacked_.empty(); }
19 
20 void HcalUnpackerReport::addUnpacked(int fed) { FEDsUnpacked_.push_back(fed); }
21 
22 void HcalUnpackerReport::addError(int fed) { FEDsError_.push_back(fed); }
23 
26  if (ho)
28  else
29  totalTPDigis_++;
30 }
31 
38 
42  badqualityIds_.push_back(id);
43 }
46  unmappedIds_.push_back(eid);
47 }
50  unmappedIds_.push_back(eid);
51 }
52 
55  uint16_t retval = 0;
56  for (i = 0; i < fedInfo_.size(); i += 2)
57  if (fedInfo_[i] == fed) {
58  retval = fedInfo_[i + 1];
59  break;
60  }
61  return HcalCalibrationEventType(retval);
62 }
63 
66  for (i = 0; i < fedInfo_.size(); i += 2)
67  if (fedInfo_[i] == fed) {
68  fedInfo_[i + 1] = uint16_t(ctype);
69  break;
70  }
71  if (i >= fedInfo_.size()) {
72  fedInfo_.push_back(fed);
73  fedInfo_.push_back(uint16_t(ctype));
74  }
75 }
76 
78 
79 static const std::string ReportSeparator("==>");
80 
82  reportInfo_.push_back(name + "==>" + value);
83 }
84 
86  std::string searchFor = name + ReportSeparator;
87  std::vector<std::string>::const_iterator i;
88  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
89  if (i->find(searchFor) == 0)
90  break;
91  return (i != reportInfo_.end());
92 }
94  std::string searchFor = name + ReportSeparator;
95  std::vector<std::string>::const_iterator i;
96  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
97  if (i->find(searchFor) == 0)
98  break;
99  std::string retval;
100  if (i != reportInfo_.end()) {
101  retval = i->substr(searchFor.length());
102  }
103  return retval;
104 }
105 
106 std::vector<std::string> HcalUnpackerReport::getReportKeys() const {
107  std::vector<std::string> retval;
108  std::vector<std::string>::const_iterator i;
109  for (i = reportInfo_.begin(); i != reportInfo_.end(); i++)
110  retval.push_back(i->substr(0, i->find(ReportSeparator)));
111  return retval;
112 }
HcalUnpackerReport::HcalUnpackerReport
HcalUnpackerReport()
Definition: HcalUnpackerReport.cc:3
mps_fire.i
i
Definition: mps_fire.py:428
funct::false
false
Definition: Factorize.h:29
HcalUnpackerReport.h
HcalUnpackerReport::setReportInfo
void setReportInfo(const std::string &name, const std::string &value)
Definition: HcalUnpackerReport.cc:81
HcalUnpackerReport::unmappedTPDigis_
int unmappedTPDigis_
Definition: HcalUnpackerReport.h:72
HcalUnpackerReport::countEmptyEventSpigot
void countEmptyEventSpigot()
Definition: HcalUnpackerReport.cc:35
HcalUnpackerReport::addUnpacked
void addUnpacked(int fed)
Definition: HcalUnpackerReport.cc:20
HcalUnpackerReport::anyValidHCAL
bool anyValidHCAL() const
Definition: HcalUnpackerReport.cc:18
HcalUnpackerReport::errorFree
bool errorFree() const
Definition: HcalUnpackerReport.cc:16
HcalUnpackerReport::countTPDigi
void countTPDigi(bool ho=false)
Definition: HcalUnpackerReport.cc:25
HcalUnpackerReport::totalHOTPDigis_
int totalHOTPDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::addError
void addError(int fed)
Definition: HcalUnpackerReport.cc:22
HcalUnpackerReport::FEDsError_
std::vector< int > FEDsError_
Definition: HcalUnpackerReport.h:71
HcalUnpackerReport::countUnmappedTPDigi
void countUnmappedTPDigi()
Definition: HcalUnpackerReport.cc:33
HcalUnpackerReport::getReportInfo
std::string getReportInfo(const std::string &name) const
Definition: HcalUnpackerReport.cc:93
HcalUnpackerReport::spigotFormatErrors_
int spigotFormatErrors_
Definition: HcalUnpackerReport.h:73
DetId
Definition: DetId.h:17
HcalUnpackerReport::countUnmappedDigi
void countUnmappedDigi()
Definition: HcalUnpackerReport.cc:32
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
HcalUnpackerReport::setFedCalibInfo
void setFedCalibInfo(uint16_t fed, HcalCalibrationEventType ctype)
Definition: HcalUnpackerReport.cc:64
HcalUnpackerReport::badqualityDigis_
int badqualityDigis_
Definition: HcalUnpackerReport.h:73
HcalCalibrationEventType
HcalCalibrationEventType
Definition: HcalCalibrationEventTypes.h:4
HcalElectronicsId
Readout chain identification for Hcal.
Definition: HcalElectronicsId.h:32
HcalUnpackerReport::reportInfo_
std::vector< std::string > reportInfo_
Definition: HcalUnpackerReport.h:79
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalUnpackerReport::unmappedDigis_
int unmappedDigis_
Definition: HcalUnpackerReport.h:72
HcalUnpackerReport::countDigi
void countDigi()
Definition: HcalUnpackerReport.cc:24
HcalUnpackerReport::setUnsuppressed
void setUnsuppressed(bool isSup)
Definition: HcalUnpackerReport.cc:77
HcalUnpackerReport::hasReportInfo
bool hasReportInfo(const std::string &name) const
Definition: HcalUnpackerReport.cc:85
HcalUnpackerReport::fedCalibType
HcalCalibrationEventType fedCalibType(uint16_t fed) const
Definition: HcalUnpackerReport.cc:53
runTauDisplay.eid
eid
Definition: runTauDisplay.py:298
value
Definition: value.py:1
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
HcalUnpackerReport::countBusySpigot
void countBusySpigot()
Definition: HcalUnpackerReport.cc:37
HcalUnpackerReport::totalDigis_
int totalDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::totalTPDigis_
int totalTPDigis_
Definition: HcalUnpackerReport.h:74
HcalUnpackerReport::unmappedIds_
ElectronicsIdVector unmappedIds_
Definition: HcalUnpackerReport.h:76
HcalUnpackerReport::fedInfo_
std::vector< uint16_t > fedInfo_
Definition: HcalUnpackerReport.h:80
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
HcalUnpackerReport::countOFWSpigot
void countOFWSpigot()
Definition: HcalUnpackerReport.cc:36
HcalUnpackerReport::countSpigotFormatError
void countSpigotFormatError()
Definition: HcalUnpackerReport.cc:34
HcalUnpackerReport::countBadQualityDigi
void countBadQualityDigi()
Definition: HcalUnpackerReport.cc:39
HcalUnpackerReport::ofwSpigots_
int ofwSpigots_
Definition: HcalUnpackerReport.h:82
ReportSeparator
static const std::string ReportSeparator("==>")
HcalUnpackerReport::busySpigots_
int busySpigots_
Definition: HcalUnpackerReport.h:82
HcalUnpackerReport::FEDsUnpacked_
std::vector< int > FEDsUnpacked_
Definition: HcalUnpackerReport.h:70
HcalUnpackerReport::getReportKeys
std::vector< std::string > getReportKeys() const
Definition: HcalUnpackerReport.cc:106
HcalUnpackerReport::unsuppressed_
bool unsuppressed_
Definition: HcalUnpackerReport.h:77
HcalUnpackerReport::emptyEventSpigots_
int emptyEventSpigots_
Definition: HcalUnpackerReport.h:82
HcalUnpackerReport::badqualityIds_
DetIdVector badqualityIds_
Definition: HcalUnpackerReport.h:75