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 c035d0c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ namespace l1t {
// Loop over multiple BX and then number of EG cands filling collection
int numBX = 0; //positive int to count BX
for (int bx = firstBX; bx <= lastBX; bx++) {
// Check to make sure that we are receiving the first expected header here
// If we are not, throw a more informative error than the failure of the following "at->" call
if (res_->size(bx) == 0 and block.header().getID() != initialBlkID)
throw(
std::runtime_error("The GlobalAlgBlk unpacker result vector is size 0, but is not receiving the first "
"expected header ID! This may be due to corrupted, or poorly formatted events."));
// If this is the first block on first board, instantiate GlobalAlg so it is there to fill from mult. blocks
if (block.header().getID() == initialBlkID && uGTBoard == 0) {
LogDebug("L1T") << "Creating GT Algorithm Block for BX =" << bx << std::endl;
Expand Down

0 comments on commit c035d0c

Please sign in to comment.