Skip to content

Commit

Permalink
taking getTriggerCellFromCell out of a try/catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
yiiyama authored and jbsauvan committed May 22, 2019
1 parent 4e6be31 commit ebb546f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions L1Trigger/L1THGCalUtilities/plugins/CaloTruthCellsProducer.cc
Expand Up @@ -95,14 +95,8 @@ void CaloTruthCellsProducer::produce(edm::Event& event, edm::EventSetup const& s

for (auto const& he : hitToEnergy) {
DetId hitId(he.first);
uint32_t tcId;
try {
tcId = geometry.getTriggerCellFromCell(hitId);
} catch (cms::Exception const& ex) {
edm::LogError("CaloTruthCellsProducer") << ex.what();
continue;
}

// this line will throw if (for whatever reason) hitId is not mapped to a trigger cell id
uint32_t tcId(geometry.getTriggerCellFromCell(hitId));
tcToEnergies[tcId].first += he.second;
}

Expand Down

0 comments on commit ebb546f

Please sign in to comment.