82 bool eventRejected =
false;
83 std::bitset<13> rejectionBits;
85 std::vector<int> febInErrorTree(0);
86 std::vector<int> febErrorTypeTree(0);
93 unsigned int l1Trig = thisEvent->level1TriggerType();
100 unsigned lumi_block = thisEvent->lumiBlock();
109 return StatusCode::FAILURE;
112 if (hdrCont->size()==0) {
114 return StatusCode::SUCCESS;
117 if (!lArFebErrorSummary.
isValid()) {
119 return StatusCode::FAILURE;
126 std::vector<std::string> l1triggers;
127 if(!trigTool.empty()) {
131 for (
unsigned int i=0;i< l1triggers.size();i++) {
138 if (l1triggers.size()>0) {trigok=
true;}
else {trigok=
false;}
141 uint32_t firstEventType = (*hdrCont->begin())->DetEventType();
144 std::lock_guard<std::mutex> lock(m_mut);
153 std::lock_guard<std::mutex> lock(m_mut);
154 if (!m_dspThrDone && firstEventType == 4) {
162 dspADC=dspThresh->samplesThr(ch);
163 dspQT=dspThresh->tQThr(ch);
171 if (!dspThreshFlat.
good()) {
173 <<
". Will not fill histograms." );
176 for (
unsigned iChan=0;iChan<chanMax;++iChan) {
183 ATH_MSG_WARNING(
"No LArDSPThresholds key specified. Will not fill these histograms" );
190 if (firstEventType == 4 && (*hdrCont->begin())->RodRawDataSize() != 0) firstEventType = 14;
193 int firstEventNbSp=-1;
194 unsigned int totNbOfSweet2 = 0;
195 float larEventSize = 0;
196 float larEventSize_part[8] = {0.,0.,0.,0.,0.,0.,0.,0.};
209 for ( ; it!=it_e;++it) {
217 unsigned int partitionNb_dE =
returnPartition(barrel_ec,pos_neg,ft,slot);
218 unsigned int subdet = partitionNb_dE / 2;
221 nfeb[partitionNb_dE]++ ;
223 ATH_MSG_WARNING(
"Unknown partition number: "<< partitionNb_dE <<
" not filling !");
226 larEventSize += (float) ((*it)->RodRawDataSize() + (*it)->RodResults1Size() + (*it)->RodResults2Size());
227 if(partitionNb_dE<8) larEventSize_part[partitionNb_dE] += (float) ((*it)->RodRawDataSize() + (*it)->RodResults1Size() + (*it)->RodResults2Size());
230 uint32_t eventType = (*it)->DetEventType();
232 if (eventType == 4 && (*it)->RodRawDataSize() != 0) eventType = 14;
234 if (firstEventNbSp < 0)
235 if ((*it)->NbSamples() != 0)
236 firstEventNbSp=(*it)->NbSamples();
239 l1word = (*it)->LVL1TigType();
242 if (firstEventType == 4) totNbOfSweet2 = totNbOfSweet2+(*it)->NbSweetCells2();
246 sw1 = (*it)->NbSweetCells1();
247 sw2 = (*it)->NbSweetCells2();
249 if ((*it)->LVL1TigType() == 0 || (*it)->LVL1TigType() == 170 || (*it)->LVL1TigType() != l1Trig){
258 bool anyfebIE =
false;
259 for (std::vector<HWIdentifier>::const_iterator allFeb =
m_onlineHelper->feb_begin();
262 bool currentFebStatus =
false;
263 uint16_t feberrorSummary = lArFebErrorSummary->feb_error(febid);
265 if ( feberrorSummary != 0 ){
270 unsigned int partitionNb_dE =
returnPartition(barrel_ec,pos_neg,ft,slot);
274 fillErrorsSummary(partitionNb_dE,ft,slot,feberrorSummary,lar_inerror, rejectionBits, currentFebStatus, eventRejected);
276 ATH_MSG_WARNING(
"Unknown partition number: "<< partitionNb_dE <<
" not filling !");
279 if (currentFebStatus && febInErrorTree.size()<33){
281 febErrorTypeTree.push_back(rejectionBits.to_ulong());
284 if(currentFebStatus) anyfebIE = currentFebStatus;
291 for(
auto nf: nfeb) nbOfFeb+=nf;
292 if (firstEventType == 2 || firstEventType == 4 || firstEventType == 14) {
297 bool newHighWaterMarkNFebBlocksTotal =
false;
309 unsigned subdet = i / 2;
322 if (febInErrorTree.size()>=1 || newHighWaterMarkNFebBlocksTotal || nbOfFeb <
m_nbOfFebBlocksTotal ){
323 evtrej=0; evt_yield = 100.;
324 if (febInErrorTree.size()>=4) evtrej=1;
326 else evtyieldout=100.;
347 evtrej=6; evt_yield = 0.; evtyieldout=0.;
370 fill(
m_monGroupName,mon_febInErrorTree,mon_febErrorTypeTree,eventTime,eventTime_ns,evtonerej);
378 if(streamsThisEvent.size()==1 && streamsThisEvent[0] ==
m_streams.size()) streamsThisEvent[0]=
m_streams.size()-1;
383 for(
unsigned int str=0;
str<streamsThisEvent.size(); ++
str) {
385 if(trigok && streamsThisEvent[
str] <
m_streams.size() && (
m_streams[streamsThisEvent[
str]].find(
"CosmicCalo") != std::string::npos)) {
396 streambin = streamsThisEvent[
str];
397 evsize = larEventSize/262144;
401 unsigned subdet = i / 2;
402 evsize = larEventSize_part[i]/
sizeNorm;
409 unsigned subdet = i / 2;
410 evsize=larEventSize_part[i]/
sizeNorm;
416 return StatusCode::SUCCESS;
421void LArFEBMonAlg::fillErrorsSummary(
unsigned int partitNb_2,
int ft,
int slot,uint16_t
error,
bool lar_inerror, std::bitset<13> &rejectionBits,
bool ¤tFebStatus,
bool &eventRejected)
const
424 if (m_badFebs.count(std::make_pair(slot,ft)) != 0)
return;
429 if (
error & (1<<0) ){
430 unsigned subdet = partitNb_2 / 2;
434 currentFebStatus =
true;
435 rejectionBits.set(0);
440 if (
error & (1<<1) ){
441 unsigned subdet = partitNb_2 / 2;
445 currentFebStatus =
true;
446 rejectionBits.set(1);
451 if (
error & (1<<2) ){
452 unsigned subdet = partitNb_2 / 2;
456 currentFebStatus =
true;
457 rejectionBits.set(2);
462 if (
error & (1<<3) ){
463 unsigned subdet = partitNb_2 / 2;
467 currentFebStatus =
true;
468 rejectionBits.set(3);
473 if (
error & (1<<4) ){
474 unsigned subdet = partitNb_2 / 2;
478 currentFebStatus =
true;
479 rejectionBits.set(4);
484 if (
error & (1<<5) ){
485 unsigned subdet = partitNb_2 / 2;
489 currentFebStatus =
true;
490 rejectionBits.set(5);
495 if (
error & (1<<6) ){
496 unsigned subdet = partitNb_2 / 2;
500 currentFebStatus =
true;
501 rejectionBits.set(6);
506 if (
error & (1<<7) ){
507 unsigned subdet = partitNb_2 / 2;
511 currentFebStatus =
true;
512 rejectionBits.set(7);
517 if (
error & (1<<8) ){
518 unsigned subdet = partitNb_2 / 2;
522 currentFebStatus =
true;
523 rejectionBits.set(8);
528 if (
error & (1<<9) ){
529 unsigned subdet = partitNb_2 / 2;
533 currentFebStatus =
true;
534 rejectionBits.set(9);
540 if (
error & (1<<11) ){
541 unsigned subdet = partitNb_2 / 2;
545 currentFebStatus =
true;
546 rejectionBits.set(10);
551 if (
error & (1<<12) ){
554 unsigned subdet = partitNb_2 / 2;
558 currentFebStatus =
true;
559 rejectionBits.set(11);
565 if (
error & (1<<13) ){
566 unsigned subdet = partitNb_2 / 2;
570 currentFebStatus =
true;
571 rejectionBits.set(12);
577 unsigned subdet = partitNb_2 / 2;
579 if (currentFebStatus){
584 eventRejected =
true;