diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx index 2077970211d5ba0c6c9823508cb26b016758b842..43b05693310621cc9d7d3e2fb22f88d5e76489be 100644 --- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx +++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/src/TrigCaloDataAccessSvc.cxx @@ -68,7 +68,7 @@ StatusCode TrigCaloDataAccessSvc::finalize() { EventContext ec; ec.setSlot( slot ); HLTCaloEventCache *cache = m_larcell.get( ec ); - cache->container->finalize(); + ATH_CHECK(cache->container->finalize()); delete cache->container; cache->lastFSEvent = 0xFFFFFFFF; delete cache->fullcont; @@ -97,7 +97,7 @@ StatusCode TrigCaloDataAccessSvc::loadCollections ( const EventContext& context, ATH_MSG_DEBUG( "LArTT requested for event " << context << " and RoI " << roi ); StatusCode sc = prepareLArCollections( context, roi, sampling, detID ); - if ( !sc.isFailure() ) return sc; + if ( sc.isFailure() ) return sc; { // this has to be guarded because getTT called on the LArCollection bu other threads updates internal map @@ -127,6 +127,7 @@ StatusCode TrigCaloDataAccessSvc::loadFullCollections ( const EventContext& cont ConstDataVector<CaloCellContainer>& cont ) { StatusCode sc = prepareLArFullCollections( context ); + if ( sc.isFailure() ) return StatusCode::FAILURE; std::lock_guard<std::mutex> getCollClock{ m_getCollMutex }; CaloCellContainer* cont_to_copy = m_larcell.get(context)->fullcont ; @@ -182,7 +183,9 @@ StatusCode TrigCaloDataAccessSvc::prepareLArFullCollections( const EventContext& Monitored::MonitoredScope::declare( m_monTool, lockTime, detidMon ); // collection prepared cache->lastFSEvent = context.evt(); - return StatusCode(static_cast<Status>(status)); + if ( status ) return StatusCode::FAILURE; + else return StatusCode::SUCCESS; + //return StatusCode(static_cast<Status>(status)); } StatusCode TrigCaloDataAccessSvc::lateInit() { // non-const this thing @@ -456,6 +459,7 @@ StatusCode TrigCaloDataAccessSvc::prepareLArCollections( const EventContext& con auto roiPhi = Monitored::MonitoredScalar::declare( "roiPhi_LAr", roi.phi() ); Monitored::MonitoredScope::declare( m_monTool, lockTime, roiEta, roiPhi, roiROBs ); - return static_cast<Status>(status); + if ( status ) return StatusCode::FAILURE; + else return StatusCode::SUCCESS; }