From 08c04819c01fc724aab68b8e7a176aa9f59db9c1 Mon Sep 17 00:00:00 2001 From: Tomasz Bold <tomasz.bold@gmail.com> Date: Mon, 30 Mar 2020 14:27:24 +0100 Subject: [PATCH] Optimise SCT data acess only in trigger usecase --- .../src/SCTRawDataProvider.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx index 0a954aea7da..ebe8e1dc15c 100644 --- a/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx +++ b/InnerDetector/InDetEventCnv/SCT_RawDataByteStreamCnv/src/SCTRawDataProvider.cxx @@ -146,14 +146,16 @@ StatusCode SCTRawDataProvider::execute(const EventContext& ctx) const else { rdoInterface = static_cast<ISCT_RDO_Container* >(rdoContainer.ptr()); } - int missingCount{}; - for ( IdentifierHash hash: hashIDs ) { - if ( not rdoInterface->tryAddFromCache( hash ) ) missingCount++; - bsIDCErrContainer->tryAddFromCache( hash ); - } - ATH_MSG_DEBUG("Out of: " << hashIDs.size() << "Hash IDs missing: " << missingCount ); - if ( missingCount == 0 ) { - return StatusCode::SUCCESS; + if ( not hashIDs.empty() ) { + int missingCount{}; + for ( IdentifierHash hash: hashIDs ) { + if ( not rdoInterface->tryAddFromCache( hash ) ) missingCount++; + bsIDCErrContainer->tryAddFromCache( hash ); + } + ATH_MSG_DEBUG("Out of: " << hashIDs.size() << "Hash IDs missing: " << missingCount ); + if ( missingCount == 0 ) { + return StatusCode::SUCCESS; + } } // Ask SCTRawDataProviderTool to decode it and to fill the IDC -- GitLab