test
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  emptyEventSpigots_(0),ofwSpigots_(0),busySpigots_(0)
8 {
9 }
10 
12  return FEDsError_.empty() && spigotFormatErrors_==0;
13 }
14 
16  return !FEDsUnpacked_.empty();
17 }
18 
20  FEDsUnpacked_.push_back(fed);
21 }
22 
24  FEDsError_.push_back(fed);
25 }
26 
28  totalDigis_++;
29 }
31  if (ho) totalHOTPDigis_++;
32  else totalTPDigis_++;
33 }
34 
37 }
40 }
43 }
47 
50 }
53  badqualityIds_.push_back(id);
54 }
57  unmappedIds_.push_back(eid);
58 }
61  unmappedIds_.push_back(eid);
62 }
63 
66  uint16_t retval=0;
67  for (i=0; i<fedInfo_.size(); i+=2)
68  if (fedInfo_[i]==fed) {
69  retval=fedInfo_[i+1];
70  break;
71  }
72  return HcalCalibrationEventType(retval);
73 }
74 
77  for (i=0; i<fedInfo_.size(); i+=2)
78  if (fedInfo_[i]==fed) {
79  fedInfo_[i+1]=uint16_t(ctype);
80  break;
81  }
82  if (i>=fedInfo_.size()) {
83  fedInfo_.push_back(fed);
84  fedInfo_.push_back(uint16_t(ctype));
85  }
86 }
87 
89  unsuppressed_=isSup;
90 }
91 
92 static const std::string ReportSeparator("==>");
93 
95  reportInfo_.push_back(name+"==>"+value);
96 }
97 
99  std::string searchFor=name+ReportSeparator;
100  std::vector<std::string>::const_iterator i;
101  for (i=reportInfo_.begin(); i!=reportInfo_.end(); i++)
102  if (i->find(searchFor)==0) break;
103  return (i!=reportInfo_.end());
104 }
106  std::string searchFor=name+ReportSeparator;
107  std::vector<std::string>::const_iterator i;
108  for (i=reportInfo_.begin(); i!=reportInfo_.end(); i++)
109  if (i->find(searchFor)==0) break;
110  std::string retval;
111  if (i!=reportInfo_.end()) {
112  retval=i->substr(searchFor.length());
113  }
114  return retval;
115 }
116 
117 std::vector<std::string> HcalUnpackerReport::getReportKeys() const {
118  std::vector<std::string> retval;
119  std::vector<std::string>::const_iterator i;
120  for (i=reportInfo_.begin(); i!=reportInfo_.end(); i++)
121  retval.push_back(i->substr(0,i->find(ReportSeparator)));
122  return retval;
123 }
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:18
std::string getReportInfo(const std::string &name) const
static const std::string ReportSeparator("==>")
void setReportInfo(const std::string &name, const std::string &value)
volatile std::atomic< bool > shutdown_flag false
void addUnpacked(int fed)
Readout chain identification for Hcal.
HcalCalibrationEventType fedCalibType(uint16_t fed) const