diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx index 886867e422d8517849805510543d6ca64722cdbc..e8970d9d061a40865d7981ce228ea83127ebe960 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "CaloTopoTowerContainerCnv.h" @@ -10,6 +10,7 @@ // Gaudi #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/ThreadLocalContext.h" // Athena #include "CaloUtils/CaloTopoTowerBuilderToolBase.h" @@ -70,6 +71,7 @@ CaloTopoTowerContainer* CaloTopoTowerContainerCnv::createTransient() { Cont->init(); // rebuild the CaloTopoTowers in the container. + const EventContext& ctx = Gaudi::Hive::currentContext(); m_TopoTowerBldr= getTool("CaloTopoTowerBuilderTool","TopoTowerTwrBldr"); if(!m_TopoTowerBldr){ @@ -77,7 +79,7 @@ CaloTopoTowerContainer* CaloTopoTowerContainerCnv::createTransient() { return 0; } if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "creating CaloTopoTowerContainerCnv::PoolToDataObject" << endmsg; - StatusCode scfcal = m_TopoTowerBldr->execute(Cont); + StatusCode scfcal = m_TopoTowerBldr->execute(ctx, Cont); if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" TopoTowers rebuild m_TopoTowerBldr->execute(Cont); Successful "<<endmsg; if (scfcal.isFailure()) { log<<MSG::ERROR<<" TopoTowers rebuild failed "<<endmsg; diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx index 709367333d77e1b2b5d094799293eaac3e226c18..ba46efa930bf64b24de495c3ef77fe977f97d615 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "CaloTowerContainerCnv.h" @@ -10,6 +10,7 @@ // Gaudi #include "GaudiKernel/MsgStream.h" #include "GaudiKernel/IToolSvc.h" +#include "GaudiKernel/ThreadLocalContext.h" // Athena #include "CaloUtils/CaloTowerBuilderToolBase.h" @@ -48,6 +49,7 @@ CaloTowerContainerCnv::~CaloTowerContainerCnv() //StatusCode CaloTowerContainerCnv::PoolToDataObject(DataObject*& pObj,const std::string &token) CaloTowerContainer* CaloTowerContainerCnv::createTransient() { + const EventContext& ctx = Gaudi::Hive::currentContext(); MsgStream log(msgSvc(), "CaloTowerContainerCnv::createTransient" ); CaloTowerContainer* Cont = 0; @@ -106,7 +108,7 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { } } if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for FCAL "<<endmsg; - StatusCode scfcal = m_fcalTowerBldr->execute(Cont); + StatusCode scfcal = m_fcalTowerBldr->execute(ctx, Cont); if (scfcal.isFailure()) { log<<MSG::ERROR<<" Towers rebuild for FCAL failed "<<endmsg; } @@ -122,7 +124,7 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { } } if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for Tile "<<endmsg; - StatusCode sctile=m_tileTowerBldr->execute(Cont); + StatusCode sctile=m_tileTowerBldr->execute(ctx, Cont); if (sctile.isFailure()) { log<<MSG::ERROR<<" Towers rebuild for Tile failed "<<endmsg; } @@ -142,7 +144,7 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { } if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for EM and/or HEC "<<endmsg; m_emHecTowerBldr->setCalos(EmHec); - StatusCode scemHec=m_emHecTowerBldr->execute(Cont); + StatusCode scemHec=m_emHecTowerBldr->execute(ctx, Cont); if (scemHec.isFailure()) { log<<MSG::ERROR<<" Towers rebuild for EM and/or HEC failed "<<endmsg; }