Skip to content

Commit 77f78e8

Browse files
committed
add protection for missing handleExtResults
1 parent f77cffe commit 77f78e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PhysicsTools/NanoAOD/plugins/L1TriggerResultsConverter.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ void L1TriggerResultsConverter::produce(edm::Event& iEvent, const edm::EventSetu
135135
if (store_unprefireable_bit_) {
136136
edm::Handle<GlobalExtBlkBxCollection> handleExtResults;
137137
iEvent.getByToken(token_ext_, handleExtResults);
138-
unprefireable_bit = handleExtResults->at(0, 0).getExternalDecision(GlobalExtBlk::maxExternalConditions - 1);
138+
if (handleExtResults->size() != 0) {
139+
unprefireable_bit = handleExtResults->at(0, 0).getExternalDecision(GlobalExtBlk::maxExternalConditions - 1);
140+
}
139141
}
140142
} else {
141143
// Legacy access

0 commit comments

Comments
 (0)