Skip to content

Commit

Permalink
Update GlobalAlgBlkUnpacker to throw error in the case of headers rec…
Browse files Browse the repository at this point in the history
…eived in the wrong order
  • Loading branch information
aloeliger committed Apr 25, 2023
1 parent b0b0e73 commit f93445c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ namespace l1t {
GlobalAlgBlk talg = GlobalAlgBlk();
res_->push_back(bx, talg);
}
//If this is not the first block, but the vector is empty, something has gone wrong (corrupted data)
else if (res_->isEmpty(bx))
throw cms::Exception("InvalidGlobalAlgBlkBxCollection")
<< "The GlobalAlgBlk unpacker result vector is empty, but is not receiving the first expected header "
"ID! This may be due to corrupted, or poorly formatted events.\n"
<< "uGTBoard: " << uGTBoard << "\nBX: " << bx << "\nFirst expected block: " << initialBlkID
<< "\nReceived block: " << block.header().getID();

//fetch
GlobalAlgBlk alg = res_->at(bx, 0);
Expand Down

0 comments on commit f93445c

Please sign in to comment.