diff --git a/Event/ByteStreamCnvSvc/CMakeLists.txt b/Event/ByteStreamCnvSvc/CMakeLists.txt index 2978f65f396ee9bd8ceaa0773004ba6d8ae8b5a1..4d364f5abee1b4c279073846e03f548ddf41e935 100644 --- a/Event/ByteStreamCnvSvc/CMakeLists.txt +++ b/Event/ByteStreamCnvSvc/CMakeLists.txt @@ -20,7 +20,7 @@ atlas_add_library( ByteStreamCnvSvcLib PRIVATE_LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} ${Boost_LIBRARIES} AthenaKernel SGTools CollectionBase FileCatalog AthenaPoolUtilities PersistentDataModel xAODEventInfo xAODTrigger - ByteStreamCnvSvcLegacy ) + ByteStreamCnvSvcLegacy CxxUtils ) atlas_add_component( ByteStreamCnvSvc src/components/*.cxx diff --git a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx index b3100875086adde8c12df3d3d1b8e1dfebe887b8..36e698b110408f4f172f129f8850d2687f360a8d 100644 --- a/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx +++ b/Event/ByteStreamCnvSvc/src/EventSelectorByteStream.cxx @@ -11,6 +11,7 @@ #include "ByteStreamCnvSvc/ByteStreamInputSvc.h" #include "ByteStreamCnvSvcBase/ByteStreamAddress.h" #include "ByteStreamCnvSvc/ByteStreamExceptions.h" +#include "CxxUtils/checker_macros.h" #include "GaudiKernel/ClassID.h" #include "GaudiKernel/FileIncident.h" @@ -732,7 +733,8 @@ StatusCode EventSelectorByteStream::seek(Context& /* it */, int evtNum) const { } int delta = evtNum - m_firstEvt[m_fileCount]; if (delta > 0) { - if (nextImpl(*m_beginIter,delta, lock).isFailure()) return StatusCode::FAILURE; + EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter; + if (nextImpl(*beginIter,delta, lock).isFailure()) return StatusCode::FAILURE; } } // event in current file @@ -743,10 +745,12 @@ StatusCode EventSelectorByteStream::seek(Context& /* it */, int evtNum) const { // nothing to do } else if ( delta > 0 ) { // forward - if ( this->nextImpl(*m_beginIter, delta, lock).isFailure() ) return StatusCode::FAILURE; + EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter; + if ( this->nextImpl(*beginIter, delta, lock).isFailure() ) return StatusCode::FAILURE; } else if ( delta < 0 ) { // backward - if ( this->previousImpl(*m_beginIter, -1*delta, lock).isFailure() ) return(StatusCode::FAILURE); + EventContextByteStream* beginIter ATLAS_THREAD_SAFE = m_beginIter; + if ( this->previousImpl(*beginIter, -1*delta, lock).isFailure() ) return(StatusCode::FAILURE); } } return StatusCode::SUCCESS;