Skip to content

Commit

Permalink
Merge branch 'HEP-FCC:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dasphy authored Jun 24, 2024
2 parents 2627561 + 4506532 commit 1f3550b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion RecCalorimeter/src/components/CreateCaloCells.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ StatusCode CreateCaloCells::initialize() {
}

// Copy over the CellIDEncoding string from the input collection to the output collection
m_cellsCellIDEncoding.put(m_hitsCellIDEncoding.get());
auto hitsEncoding = m_hitsCellIDEncoding.get_optional();
if (!hitsEncoding.has_value()) {
error () << "Missing cellID encoding for input collection" << endmsg;
return StatusCode::FAILURE;
}
m_cellsCellIDEncoding.put(hitsEncoding.value());

return StatusCode::SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ StatusCode CreateCaloCellPositionsFCCee::initialize() {
}

// Copy over the CellIDEncoding string from the input collection to the output collection
m_positionedHitsCellIDEncoding.put(m_hitsCellIDEncoding.get());
std::string hitsEncoding = m_hitsCellIDEncoding.get("");
if (hitsEncoding == "") {
warning() << "Missing cellID encoding for input collection" << endmsg;
}
m_positionedHitsCellIDEncoding.put(hitsEncoding);

return StatusCode::SUCCESS;
}
Expand Down

0 comments on commit 1f3550b

Please sign in to comment.