Skip to content

Commit

Permalink
Merge pull request #41401 from aloeliger/errorMessageUpdate
Browse files Browse the repository at this point in the history
Update GlobalAlgBlkUnpacker to throw error in the case of headers received in the wrong order
  • Loading branch information
cmsbuild authored Apr 25, 2023
2 parents 02d37b0 + f93445c commit 0c3a8c6
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 0c3a8c6

Please sign in to comment.