CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalUnpackerReport.cc
Go to the documentation of this file.
2 
4  unmappedDigis_(0), unmappedTPDigis_(0),
5  spigotFormatErrors_(0), badqualityDigis_(0),
6  totalDigis_(0),totalTPDigis_(0),totalHOTPDigis_(0), unsuppressed_(false)
7 {
8 }
9 
11  return FEDsError_.empty() && spigotFormatErrors_==0;
12 }
13 
15  return !FEDsUnpacked_.empty();
16 }
17 
19  FEDsUnpacked_.push_back(fed);
20 }
21 
23  FEDsError_.push_back(fed);
24 }
25 
27  totalDigis_++;
28 }
30  if (ho) totalHOTPDigis_++;
31  else totalTPDigis_++;
32 }
33 
36 }
39 }
42 }
45 }
48  badqualityIds_.push_back(id);
49 }
52  unmappedIds_.push_back(eid);
53 }
56  unmappedIds_.push_back(eid);
57 }
58 
61  uint16_t retval=0;
62  for (i=0; i<fedInfo_.size(); i+=2)
63  if (fedInfo_[i]==fed) {
64  retval=fedInfo_[i+1];
65  break;
66  }
67  return HcalCalibrationEventType(retval);
68 }
69 
72  for (i=0; i<fedInfo_.size(); i+=2)
73  if (fedInfo_[i]==fed) {
74  fedInfo_[i+1]=uint16_t(ctype);
75  break;
76  }
77  if (i>=fedInfo_.size()) {
78  fedInfo_.push_back(fed);
79  fedInfo_.push_back(uint16_t(ctype));
80  }
81 }
82 
84  unsuppressed_=isSup;
85 }
86 
87 static const std::string ReportSeparator("==>");
88 
89 void HcalUnpackerReport::setReportInfo(const std::string& name, const std::string& value) {
90  reportInfo_.push_back(name+"==>"+value);
91 }
92 
93 bool HcalUnpackerReport::hasReportInfo(const std::string& name) const {
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) break;
98  return (i!=reportInfo_.end());
99 }
100 std::string HcalUnpackerReport::getReportInfo(const std::string& name) const {
101  std::string searchFor=name+ReportSeparator;
102  std::vector<std::string>::const_iterator i;
103  for (i=reportInfo_.begin(); i!=reportInfo_.end(); i++)
104  if (i->find(searchFor)==0) break;
105  std::string retval;
106  if (i!=reportInfo_.end()) {
107  retval=i->substr(searchFor.length());
108  }
109  return retval;
110 }
111 
112 std::vector<std::string> HcalUnpackerReport::getReportKeys() const {
113  std::vector<std::string> retval;
114  std::vector<std::string>::const_iterator i;
115  for (i=reportInfo_.begin(); i!=reportInfo_.end(); i++)
116  retval.push_back(i->substr(0,i->find(ReportSeparator)));
117  return retval;
118 }
std::vector< std::string > reportInfo_
int i
Definition: DBlmapReader.cc:9
std::vector< int > FEDsError_
std::vector< int > FEDsUnpacked_
std::vector< std::string > getReportKeys() const
void setFedCalibInfo(uint16_t fed, HcalCalibrationEventType ctype)
void setUnsuppressed(bool isSup)
bool anyValidHCAL() const
std::vector< uint16_t > fedInfo_
HcalCalibrationEventType
ElectronicsIdVector unmappedIds_
uint16_t size_type
DetIdVector badqualityIds_
bool hasReportInfo(const std::string &name) const
void countTPDigi(bool ho=false)
Definition: DetId.h:20
std::string getReportInfo(const std::string &name) const
static const std::string ReportSeparator("==>")
void setReportInfo(const std::string &name, const std::string &value)
void addUnpacked(int fed)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
HcalCalibrationEventType fedCalibType(uint16_t fed) const