From 10c2881176aa4e803bfa967d78a2b8610e8a3d0c Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Tue, 24 Oct 2023 08:06:47 +0200 Subject: [PATCH] Simplify getting the readouts --- SimG4Components/src/InspectHitsCollectionsTool.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SimG4Components/src/InspectHitsCollectionsTool.cpp b/SimG4Components/src/InspectHitsCollectionsTool.cpp index 34aeca3..3881858 100644 --- a/SimG4Components/src/InspectHitsCollectionsTool.cpp +++ b/SimG4Components/src/InspectHitsCollectionsTool.cpp @@ -34,8 +34,7 @@ StatusCode InspectHitsCollectionsTool::initialize() { << "Make sure you have GeoSvc and SimSvc in the right order in the configuration." << endmsg; return StatusCode::FAILURE; } - auto lcdd = m_geoSvc->getDetector(); - auto allReadouts = lcdd->readouts(); + auto allReadouts = m_geoSvc->getDetector()->readouts(); for (auto& readoutName : m_readoutNames) { if (allReadouts.find(readoutName) == allReadouts.end()) { error() << "Readout " << readoutName << " not found! Please check tool configuration." << endmsg;