93 ATH_CHECK( febErrorSummary.
record (std::make_unique<LArFebErrorSummary>()) );
102 unsigned int nbSamplesFirst=0;
103 uint32_t eventTypeFirst = 999;
105 ATH_MSG_DEBUG(
" LArFebHeaderContainer Size = "<< hdrCont->size() );
107 std::set<unsigned int> all_febs;
114 int nbOfFebsInError = 0;
116 for (
const auto*
const it : *hdrCont) {
122 all_febs.erase(int_id);
128 uint32_t rodstatus = it->RodStatus();
130 const std::vector<uint16_t>& sca = it->SCA();
132 uint32_t eventType = it->DetEventType();
135 bool typeMism =
false;
137 if (eventTypeFirst == 999)
138 eventTypeFirst = eventType;
139 if (eventType != eventTypeFirst)
142 std::bitset<32> rodstatusbits(rodstatus);
144 bool scaOutOfRange =
false;
145 bool badNbOfSp =
false;
147 bool checkSumErr =
false;
151 if (nbSamplesFirst == 0) {
153 if (eventType == 2 && (!sca.empty()))
154 nbSamplesFirst = sca.size();
156 if (eventType == 4 && (it->NbSamples() != 0))
157 nbSamplesFirst = it->NbSamples();
160 if (eventType == 2) {
161 if (nbSamplesFirst != sca.size() && !sca.empty())
163 for (
unsigned int i = 0; i < sca.size(); ++i) {
165 scaOutOfRange =
true;
168 if (eventType == 4 && (nbSamplesFirst != it->NbSamples()) && (it->NbSamples() != 0))
172 if (eventType == 2 && sca.empty())
174 if (eventType == 4 && (it->RodResults1Size() == 0))
178 if (!it->ChecksumVerification())
180 if (eventType == 4) {
182 if ((it->FormatVersion() & 0xF) <= 11)
183 expSize1 = it->NbSweetCells1() + 83 + (int)ceilf((it->NbSamples() + 1) / 2.0);
184 if ((it->FormatVersion() & 0xF) >= 12)
185 expSize1 = it->NbSweetCells1() + 84 + (int)ceilf((it->NbSamples() + 1) / 2.0);
186 if (expSize1 != it->RodResults1Size()) {
189 int nbOf32bits = (it->NbSweetCells2() * it->NbSamples() + 1) / 2.0;
190 if (nbOf32bits != it->RodResults2Size()) {
204 if (rodstatusbits[6])
207 if (rodstatusbits[2] || rodstatusbits[7])
210 if (rodstatusbits[3] || rodstatusbits[8])
222 if (rodstatusbits[5])
225 if (rodstatusbits[24])
245 if (err_toignore > 0) {
246 uint16_t erri = (uint16_t)(err_toignore);
247 errw = errw & (~erri);
252 std::lock_guard lock(
m_mtx);
254 if (errw & (1 << i)) {
257 ++(m_errsPerFeb[int_id]);
260 ATH_MSG_DEBUG(std::format(
" Error for this FEB id {:#x} is {:#x}",int_id,errw));
262 if (!febErrorSummary->set_feb_error(int_id, errw)) {
264 ATH_MSG_DEBUG(
" failed to insert the error into LArFebErrorSummary " << std::hex << febid << std::dec);
270 nbOfFebsInError += 1;
278 for (
auto it : all_febs) {
282 ATH_MSG_DEBUG(
" This FEB is not read out 0x" << std::hex << it << std::dec);
289 const std::string bec =
m_onlineHelper->barrel_ec(febid) == 0 ?
"BARREL/" :
"ENDCAP/";
290 const std::string side =
m_onlineHelper->pos_neg(febid) == 0 ?
"C/" :
"A/";
294 febErrorSummary->set_feb_error(it, errw);
315 return StatusCode::SUCCESS;