diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc index 03ad20bc0f485548fb9a2b6c4365fc9544430f33..23c4a4da19b6424bdec295bc9d2b25ec4f49d358 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustCnv.icc @@ -99,19 +99,46 @@ StatusCode T_AthenaPoolCustCnv<TRANS, PERS>::poolToObject(const Token*& token, P template <class TRANS, class PERS> StatusCode T_AthenaPoolCustCnv<TRANS, PERS>::DataObjectToPool(DataObject* pObj, const std::string& key) { const std::string className = ClassName<TRANS>::name(); + bool skipDHE = false; TRANS* obj = 0; PERS* persObj = 0; SG::fromStorable(pObj, obj); if (obj == 0) { - ATH_MSG_ERROR("failed to cast to T for class (type/key) " << className << "/" << pObj->name()); - return(StatusCode::FAILURE); + if (pObj->clID() == 1) { + if (pObj->registry() != 0 && pObj->registry()->address() != 0) { + ATH_MSG_DEBUG("Failed to cast DataObject to transient type, doing pers to pers"); + if (!this->compareClassGuid(pool::DbReflex::guid(this->m_classDesc))) { + ATH_MSG_ERROR("Can not evolve schema in pers to pers copy"); + return(StatusCode::FAILURE); + } + if (!poolToObject<PERS>(this->m_i_poolToken, persObj).isSuccess()) { + ATH_MSG_ERROR("Failed to read persistent DataType"); + return(StatusCode::FAILURE); + } + } else { + ATH_MSG_DEBUG("Failed to cast DataObject to transient type, using empty default"); + skipDHE = true; + persObj = new PERS(); + } + } else { + ATH_MSG_ERROR("failed to cast to T for class (type/key) " << className << "/" << pObj->name()); + return(StatusCode::FAILURE); + } } else { if (!transToPers(obj, persObj).isSuccess()) { ATH_MSG_ERROR("Failed to convert to persistent DataType for class (type/key) " << className << "/" << pObj->name()); return(StatusCode::FAILURE); } } - return(objectToPool<PERS>(persObj, this->m_o_poolToken, key)); + const Token* token = 0; + StatusCode status = objectToPool<PERS>(persObj, token, key); + if (skipDHE) { + delete token; token = 0; + this->setToken("\n"); + } else { + this->m_o_poolToken = token; token = 0; + } + return(status); } //__________________________________________________________________________ template <class TRANS, class PERS> @@ -138,8 +165,12 @@ StatusCode T_AthenaPoolCustCnv<TRANS, PERS>::PoolToDataObject(DataObject*& pObj, template <class TRANS, class PERS> inline void T_AthenaPoolCustCnv<TRANS, PERS>::setToken(const std::string& token_str) { if (this->m_i_poolToken == 0) this->m_i_poolToken = new Token; - const_cast<Token*>(this->m_i_poolToken)->fromString(token_str); - m_classID = this->m_i_poolToken != 0 ? this->m_i_poolToken->classID() : Guid::null(); + if (this->m_i_poolToken != 0) { + const_cast<Token*>(this->m_i_poolToken)->fromString(token_str); + m_classID = this->m_i_poolToken->classID(); + } else { + m_classID = Guid::null(); + } } //__________________________________________________________________________ // Compare POOL class GUID with the one from object being read diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc index f05c6cd770ae64e8e14bef56d17fc2c2f7f1cfd3..b982d834bae81fd99f24a2abaa38cd4e70bac28c 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc @@ -16,9 +16,7 @@ #include "SGTools/StorableConversions.h" -//#include "TPTools/AthenaConverterTLPExtension.h" #include "AthenaPoolCnvTPExtension.h" -//#include "TPTools/TopLevelTPCnvBase.h" #include <stdexcept> @@ -29,12 +27,51 @@ T_AthenaPoolCustomCnv<TRANS, PERS>::T_AthenaPoolCustomCnv(ISvcLocator* pSvcLocat template <class TRANS, class PERS> StatusCode T_AthenaPoolCustomCnv<TRANS, PERS>::DataObjectToPool(DataObject* pObj, const std::string& key) { ATH_MSG_VERBOSE("In DataObjectToPool() for key = " << pObj->name()); + bool skipDHE = false; TRANS* obj = 0; PERS* persObj = 0; SG::fromStorable(pObj, obj); if (obj == 0) { - ATH_MSG_ERROR("Failed to cast DataObject to transient type"); - return(StatusCode::FAILURE); + if (pObj->clID() == 1) { + if (pObj->registry() != 0 && pObj->registry()->address() != 0) { + const std::string className = ClassName<PERS>::name(); + if (this->m_className != className) { + this->m_className = className; + auto itClass = this->m_classDescs.find(className); + if (itClass == this->m_classDescs.end()) { + this->m_classDesc = RootType( typeid(PERS) ); + this->m_classDescs[className] = this->m_classDesc; + } else { + // Set to correct class description + this->m_classDesc = (*itClass).second; + } + } + this->setToken(pObj->registry()->address()->par()[0]); + ATH_MSG_DEBUG("Failed to cast DataObject to transient type, doing pers to pers"); + if (!this->compareClassGuid(pool::DbReflex::guid(this->m_classDesc))) { + ATH_MSG_ERROR("Can not evolve schema in pers to pers copy"); + return(StatusCode::FAILURE); + } + AthenaConverterTLPExtension *extCnv = dynamic_cast<AthenaConverterTLPExtension*>(this); + if (extCnv != 0) { + ATH_MSG_ERROR("Can not retrieve " << pObj->name() << " in pers to pers copy"); + return(StatusCode::FAILURE); + } + try { + persObj = this->poolReadObject<PERS>(); + } catch (...) { + ATH_MSG_ERROR("Failed to read persistent DataType"); + return(StatusCode::FAILURE); + } + } else { + ATH_MSG_DEBUG("Failed to cast DataObject to transient type, using empty default"); + skipDHE = true; + persObj = new PERS(); + } + } else { + ATH_MSG_ERROR("Failed to cast DataObject to transient type"); + return(StatusCode::FAILURE); + } } else { try { persObj = createPersistent(obj); @@ -54,7 +91,15 @@ StatusCode T_AthenaPoolCustomCnv<TRANS, PERS>::DataObjectToPool(DataObject* pObj } } m_persObjList.push_back(persObj); - return(this->objectToPool(persObj, this->m_o_poolToken, key)); + const Token* token = 0; + StatusCode status = this->objectToPool(persObj, token, key); + if (skipDHE) { + delete token; token = 0; + this->setToken("\n"); + } else { + this->m_o_poolToken = token; token = 0; + } + return(status); } template <class TRANS, class PERS> diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/AthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/AthenaPool.py index 849afd896b6e9ebf0f9d65861442e681740d150f..19b1661e2c50aa130242aae406fa7c9e4c12d91a 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/AthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/AthenaPool.py @@ -27,19 +27,23 @@ def _loadBasicAthenaPool(): msg.debug( "Loading basic services for AthenaPool..." ) svcMgr += CfgMgr.PoolSvc() + svcMgr.PoolSvc.MaxFilesOpen = 3 #if in AthAnalysisBase, we will set the outputlevel of PoolSvc to ERROR, to silence warnings about missing reflex types #detect AthAnalysisBase by looking at the CMTEXTRATAGS env var, if it contains 'ManaCore' then we are in AthAnalysisBase import os from AthenaCommon.Constants import ERROR if "ManaCore" in os.environ.get('CMTEXTRATAGS',""): svcMgr.PoolSvc.OutputLevel=ERROR + svcMgr += CfgMgr.AthenaPoolCnvSvc() + """ from AthenaCommon.AppMgr import theApp theApp.Dlls += [ ## FIXME # needed: why isn't this guy being picked up through genmap ?? "DBDataModelAthenaPoolPoolCnv", ] + """ if not hasattr (svcMgr, 'EventPersistencySvc'): svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" ) @@ -47,6 +51,7 @@ def _loadBasicAthenaPool(): if not hasattr (svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() + """ # # Make sure AthenaSealSvc is loaded for dict check svcMgr += CfgMgr.AthenaSealSvc() @@ -57,6 +62,7 @@ def _loadBasicAthenaPool(): # Load streamer allowing conversion of old CLHEP classes import AtlasSealCLHEP.OldCLHEPStreamers + """ # Add in MetaDataSvc svcMgr += CfgMgr.MetaDataSvc( "MetaDataSvc" ) diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py index 1f7f00c951fc5c9344d8b807cf03466702ac0c99..5eeb07eda43a0289f8cb3074f0dde481a0ea6939 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/ReadAthenaPool.py @@ -32,6 +32,9 @@ def _configureReadAthenaPool(): # Load the basic services import AthenaPoolCnvSvc.AthenaPool + # Switch off TTreeCache for POOLContainerForm (most of the time only first entry is needed + #svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "ContainerName = 'POOLContainerForm'; TREE_CACHE = '0'" ] + # Load ProxyProviderSvc if not hasattr (svcMgr, 'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc() diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py index 3cfabbbedb0506142841f667a5bf75a2c22b9886..a6416a64c40d42072b89b3b0d075ed2e573b2394 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/python/WriteAthenaPool.py @@ -41,8 +41,8 @@ def _configureWriteAthenaPool(): svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DEFAULT_BUFFERSIZE = '32000'" ] # Turn off auto_flush for DataHeader container to avoid basket optimization - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'TTree=POOLContainer'; TREE_AUTO_FLUSH = '0'" ] - svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'POOLContainerForm(DataHeaderForm)'; BRANCH_BASKET_SIZE = '256000'" ] + svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'POOLContainer(DataHeader)'; BRANCH_BASKET_SIZE = '256000'" ] + svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'POOLContainerForm(DataHeaderForm)'; BRANCH_BASKET_SIZE = '1024000'" ] svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "ContainerName = 'TTree=POOLContainerForm(DataHeaderForm)'; CONTAINER_SPLITLEVEL = '99'" ] svcMgr.AthenaPoolCnvSvc.PoolContainerPrefix = "CollectionTree" diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/share/AthenaPoolCnvSvc_jobOptions.py b/Database/AthenaPOOL/AthenaPoolCnvSvc/share/AthenaPoolCnvSvc_jobOptions.py index 4041c5b35d61cbe60b663b8c829f36d77ab729ce..d9359998088ea88b6be9a2839c2f6d28b44174f7 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/share/AthenaPoolCnvSvc_jobOptions.py +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/share/AthenaPoolCnvSvc_jobOptions.py @@ -64,10 +64,6 @@ svcMgr.AthenaPoolCnvSvc.InputPoolAttributes += [ "ContainerName = '<treeName>'; svcMgr.AthenaPoolCnvSvc.PoolAttributes += [ "DatabaseName = '<fileName>'; ContainerName = '<type>/<key>'; <attributeName> = '<dataType>'" ] svcMgr.AthenaPoolCnvSvc.PoolAttributes = [ ] -# Number of events to process with commitAndHold, before doing a full commit. -# -1 -> only do full commit at end of job -# 0 -> always do a full commit -svcMgr.AthenaPoolCnvSvc.CommitInterval = 0 ## backward compat AthenaPoolCnvSvc = svcMgr.AthenaPoolCnvSvc diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaAttributeListCnv.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaAttributeListCnv.cxx index 505c4cae310c6fef8b23b0f713353d6fd72e1590..afecd2f10131e1884f2df2400c684ce434b58926 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaAttributeListCnv.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaAttributeListCnv.cxx @@ -33,12 +33,12 @@ AthenaAttributeListCnv::~AthenaAttributeListCnv() { } //__________________________________________________________________________ StatusCode AthenaAttributeListCnv::initialize() { - MsgStream log(messageService(), "AthenaAttributeListCnv"); + MsgStream log(msgSvc(), "AthenaAttributeListCnv"); - log << MSG::DEBUG << "initialize() in AthenaAttributeListCnv" << endreq; + log << MSG::DEBUG << "initialize() in AthenaAttributeListCnv" << endmsg; StatusCode status = Converter::initialize(); if (!status.isSuccess()) { - log << MSG::ERROR << "Can not initialize Converter base class." << endreq; + log << MSG::ERROR << "Can not initialize Converter base class." << endmsg; return(status); } return(status); @@ -50,8 +50,8 @@ StatusCode AthenaAttributeListCnv::createObj(IOpaqueAddress* pAddr, DataObject*& // extract an AthenaAttributeList pointer from an // AthenaAttrListAddress and return it - MsgStream log(messageService(), "AthenaAttributeListCnv"); - log << MSG::DEBUG << "Creating AthenaAttrListAddress Object" << endreq; + MsgStream log(msgSvc(), "AthenaAttributeListCnv"); + log << MSG::DEBUG << "Creating AthenaAttrListAddress Object" << endmsg; AthenaAttrListAddress* addr = dynamic_cast<AthenaAttrListAddress*>(pAddr); @@ -59,11 +59,11 @@ StatusCode AthenaAttributeListCnv::createObj(IOpaqueAddress* pAddr, DataObject*& // Successful cast pObj = SG::asStorable(addr->attrList()); if (!pObj) { - log << MSG::ERROR << "AttributeList ptr is 0 from AthenaAttrListAddress " << endreq; + log << MSG::ERROR << "AttributeList ptr is 0 from AthenaAttrListAddress " << endmsg; return(StatusCode::FAILURE); } } else { - log << MSG::ERROR << "Could not extract ptr for AthenaAttrListAddress " << endreq; + log << MSG::ERROR << "Could not extract ptr for AthenaAttrListAddress " << endmsg; return(StatusCode::FAILURE); } @@ -76,8 +76,8 @@ StatusCode AthenaAttributeListCnv::createRep(DataObject* pObj, IOpaqueAddress*& // create an AthenaAttrListAddress and fill it with a pointer to // the AthenaAttributeList - MsgStream log(messageService(), "AthenaAttributeListCnv"); - log << MSG::DEBUG << "Copy AthenaAttributeList ptr into AthenaAttrListAddress" << endreq; + MsgStream log(msgSvc(), "AthenaAttributeListCnv"); + log << MSG::DEBUG << "Copy AthenaAttributeList ptr into AthenaAttrListAddress" << endmsg; AthenaAttributeList* list = 0; //dynamic_cast<AthenaAttributeList*>(pObj); SG::fromStorable(pObj, list); @@ -87,7 +87,7 @@ StatusCode AthenaAttributeListCnv::createRep(DataObject* pObj, IOpaqueAddress*& addr->setAttrList(list); pAddr = addr; - log << MSG::DEBUG << "Created AthenaAttrListAddress with list ptr: " << list << endreq; + log << MSG::DEBUG << "Created AthenaAttrListAddress with list ptr: " << list << endmsg; return(StatusCode::SUCCESS); } //__________________________________________________________________________ diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx index 62c4e88ad604135cbb2cb1230cdc221255fca26b..0d1e6ddc9a6750940e7aab405a9cabe6a9a494b7 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolCnvSvc.cxx @@ -46,14 +46,6 @@ StatusCode AthenaPoolCnvSvc::initialize() { ATH_MSG_FATAL("Cannot get DataModelCompatSvc."); return(StatusCode::FAILURE); } -#if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0) - // Initialize AthenaRootStreamerSvc - ServiceHandle<IService> arssvc("AthenaRootStreamerSvc", this->name()); - if (!arssvc.retrieve().isSuccess()) { - ATH_MSG_FATAL("Cannot get AthenaRootStreamerSvc."); - return(StatusCode::FAILURE); - } -#endif // Retrieve PoolSvc if (!m_poolSvc.retrieve().isSuccess()) { ATH_MSG_FATAL("Cannot get PoolSvc."); @@ -407,6 +399,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS IConverter* cnv = converter(ClassID_traits<DataHeader>::ID()); if (!cnv->updateRepRefs(&address, (DataObject*)obj).isSuccess()) { ATH_MSG_ERROR("Failed updateRepRefs for obj = " << token->toString()); + delete token; token = 0; return(StatusCode::FAILURE); } } @@ -417,6 +410,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS IConverter* cnv = converter(ClassID_traits<DataHeader>::ID()); if (!cnv->updateRep(&address, (DataObject*)obj).isSuccess()) { ATH_MSG_ERROR("Failed updateRep for obj = " << token->toString()); + delete token; token = 0; return(StatusCode::FAILURE); } } @@ -465,7 +459,7 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS } static int commitCounter = 1; try { - if ((commitCounter > m_commitInterval && m_commitInterval > 0) || doCommit) { + if (/*(commitCounter > m_commitInterval && m_commitInterval > 0) || */doCommit) { commitCounter = 1; if (!m_poolSvc->commit(IPoolSvc::kOutputStream).isSuccess()) { ATH_MSG_ERROR("commitOutput FAILED to commit OutputStream."); @@ -503,8 +497,10 @@ StatusCode AthenaPoolCnvSvc::commitOutput(const std::string& /*outputConnectionS if (m_useDetailChronoStat.value()) { m_chronoStatSvc->chronoStop("commitOutput"); } - // prepare chrono for next commit - m_doChronoStat = true; + // prepare chrono for next commit, keep disabled for streaming mode + if (m_inputStreamingTool.empty() && m_outputStreamingTool.empty()) { + m_doChronoStat = true; + } return(StatusCode::SUCCESS); } //______________________________________________________________________________ diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListCollCnv.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListCollCnv.cxx index 0caf95a6e28f8dfd835a0b2abcccc87d8040dc3d..cd7eb48b796fe3bc1b5b7c859c26d59d06a735a7 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListCollCnv.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListCollCnv.cxx @@ -33,12 +33,12 @@ CondAttrListCollCnv::~CondAttrListCollCnv() { } //__________________________________________________________________________ StatusCode CondAttrListCollCnv::initialize() { - MsgStream log(messageService(), "CondAttrListCollCnv"); + MsgStream log(msgSvc(), "CondAttrListCollCnv"); - log << MSG::DEBUG << "initialize() in CondAttrListCollCnv" << endreq; + log << MSG::DEBUG << "initialize() in CondAttrListCollCnv" << endmsg; StatusCode status = Converter::initialize(); if (!status.isSuccess()) { - log << MSG::ERROR << "Can not initialize Converter base class." << endreq; + log << MSG::ERROR << "Can not initialize Converter base class." << endmsg; return(status); } return(status); @@ -50,8 +50,8 @@ StatusCode CondAttrListCollCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pO // we only extract an CondAttrListCollection pointer from an // CondAttrListCollAddress and return it - MsgStream log(messageService(), "CondAttrListCollCnv"); - log << MSG::DEBUG << "Creating CondAttrListCollAddress Object" << endreq; + MsgStream log(msgSvc(), "CondAttrListCollCnv"); + log << MSG::DEBUG << "Creating CondAttrListCollAddress Object" << endmsg; CondAttrListCollAddress* addr = dynamic_cast<CondAttrListCollAddress*>(pAddr); @@ -59,12 +59,12 @@ StatusCode CondAttrListCollCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pO // Successful cast pObj = SG::asStorable(addr->attrListColl()); if (!pObj) { - log << MSG::ERROR << "CondAttrListCollection ptr is 0 from CondAttrListCollAddress " << endreq; + log << MSG::ERROR << "CondAttrListCollection ptr is 0 from CondAttrListCollAddress " << endmsg; return(StatusCode::FAILURE); } } else { - log << MSG::ERROR << "Could not extract ptr for CondAttrListCollAddress " << endreq; + log << MSG::ERROR << "Could not extract ptr for CondAttrListCollAddress " << endmsg; return(StatusCode::FAILURE); } @@ -77,8 +77,8 @@ StatusCode CondAttrListCollCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAd // we only create an CondAttrListCollAddress and fill it with a // pointer to the CondAttrListCollection - MsgStream log(messageService(), "CondAttrListCollCnv"); - log << MSG::DEBUG << "Copy CondAttrListCollection ptr into CondAttrListCollAddress" << endreq; + MsgStream log(msgSvc(), "CondAttrListCollCnv"); + log << MSG::DEBUG << "Copy CondAttrListCollection ptr into CondAttrListCollAddress" << endmsg; CondAttrListCollection* list = 0; //dynamic_cast<CondAttrListCollection*>(pObj); SG::fromStorable(pObj, list); @@ -88,7 +88,7 @@ StatusCode CondAttrListCollCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAd addr->setAttrListColl(list); pAddr = addr; - log << MSG::DEBUG << "Created CondAttrListCollAddress with list ptr: " << list << endreq; + log << MSG::DEBUG << "Created CondAttrListCollAddress with list ptr: " << list << endmsg; return(StatusCode::SUCCESS); } //__________________________________________________________________________ diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListVecCnv.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListVecCnv.cxx index 1f71c6f34972e136e52f4b68e2b0cd43f33ab717..80155c90e8b80ded900dde46a7210e5f6a446cf2 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListVecCnv.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/CondAttrListVecCnv.cxx @@ -32,12 +32,12 @@ CondAttrListVecCnv::~CondAttrListVecCnv() { } //__________________________________________________________________________ StatusCode CondAttrListVecCnv::initialize() { - MsgStream log(messageService(), "CondAttrListVecCnv"); + MsgStream log(msgSvc(), "CondAttrListVecCnv"); - log << MSG::DEBUG << "initialize() in CondAttrListVecCnv" << endreq; + log << MSG::DEBUG << "initialize() in CondAttrListVecCnv" << endmsg; StatusCode status = Converter::initialize(); if (!status.isSuccess()) { - log << MSG::ERROR << "Can not initialize Converter base class." << endreq; + log << MSG::ERROR << "Can not initialize Converter base class." << endmsg; return(status); } return(status); @@ -49,8 +49,8 @@ StatusCode CondAttrListVecCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb // extract an AthenaAttributeList pointer from an // AthenaAttrListAddress and return it - MsgStream log(messageService(), "CondAttrListVecCnv"); - log << MSG::DEBUG << "Creating CondAttrListVecAddress Object" << endreq; + MsgStream log(msgSvc(), "CondAttrListVecCnv"); + log << MSG::DEBUG << "Creating CondAttrListVecAddress Object" << endmsg; CondAttrListVecAddress* addr = dynamic_cast<CondAttrListVecAddress*>(pAddr); @@ -58,11 +58,11 @@ StatusCode CondAttrListVecCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pOb // Successful cast pObj = SG::asStorable(addr->attrListVec()); if (!pObj) { - log << MSG::ERROR << "CondAttrListVec ptr is 0 from CondAttrListVecAddress " << endreq; + log << MSG::ERROR << "CondAttrListVec ptr is 0 from CondAttrListVecAddress " << endmsg; return(StatusCode::FAILURE); } } else { - log << MSG::ERROR << "Could not extract ptr for CondAttrListVecAddress " << endreq; + log << MSG::ERROR << "Could not extract ptr for CondAttrListVecAddress " << endmsg; return(StatusCode::FAILURE); } @@ -75,8 +75,8 @@ StatusCode CondAttrListVecCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAdd // create an AthenaAttrListAddress and fill it with a pointer to // the AthenaAttributeList - MsgStream log(messageService(), "CondAttrListVecCnv"); - log << MSG::DEBUG << "Copy CondAttrListVec ptr into CondAttrListVecAddress" << endreq; + MsgStream log(msgSvc(), "CondAttrListVecCnv"); + log << MSG::DEBUG << "Copy CondAttrListVec ptr into CondAttrListVecAddress" << endmsg; CondAttrListVec* list = 0; //dynamic_cast<AthenaAttributeList*>(pObj); SG::fromStorable(pObj, list); @@ -85,7 +85,7 @@ StatusCode CondAttrListVecCnv::createRep(DataObject* pObj, IOpaqueAddress*& pAdd "POOLContainer_CondAttrListVec][CLID=x"); addr->setAttrListVec(list); pAddr = addr; - log << MSG::DEBUG << "Created CondAttrListVec with list ptr: " << list << endreq; + log << MSG::DEBUG << "Created CondAttrListVec with list ptr: " << list << endmsg; return(StatusCode::SUCCESS); } //__________________________________________________________________________ diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx index 24605568a7d2761b7c5a998f029e36a38169221c..aca58b913ec26dfb8b0747a3415d8ba1e1e503b9 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx @@ -258,6 +258,7 @@ int main() TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); + if (!mgr) std::abort(); if (mgr->addService (svc).isFailure()) std::abort(); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx index c31154526fa82b06b070d2204b08702002a04152..aec0791000a94b25b0af96a1160c3f3d9d46491d 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx @@ -216,6 +216,7 @@ int main() TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); + if (!mgr) std::abort(); if (mgr->addService (svc).isFailure()) std::abort(); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx index bb4eb0acf7815bee145a896e20061460af1f12a5..e8eacc3d401af56ec9502c77203a722a155bc016 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx @@ -175,6 +175,7 @@ int main() TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); + if (!mgr) std::abort(); if (mgr->addService (svc).isFailure()) std::abort(); diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx index fd5216ce376899619839a63d6f4c48d3f9ebdb80..9a4b988be9fab7bbf3a354b7b96578baed1effdb 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx @@ -151,6 +151,7 @@ int main() TestCnvSvc* svc = new TestCnvSvc ("AthenaPoolCnvSvc", pSvcLoc); ISvcManager* mgr = dynamic_cast<ISvcManager*> (pSvcLoc); + if (!mgr) std::abort(); if (mgr->addService (svc).isFailure()) std::abort();