From c0855a54252014f928d8676ddef9e7bef4d3763a Mon Sep 17 00:00:00 2001 From: Walter Lampl <Walter.Lampl@cern.ch> Date: Tue, 1 Nov 2016 12:16:14 +0100 Subject: [PATCH] add T/P converter for CaloClusterCellLinkContainer (CaloAthenaPool-00-03-11) 2016-11-01 Walter Lampl <walter.lampl@ cern.ch> * add T/P converter for CaloClusterCellLinkContainer * tag CaloAthenaPool-00-03-11 2016-10-24 Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch> * Taught the package how to cooperate with a single-project build. (With the currently planned git layout.) * Removed the executable flag from the source files of the package. * Removed the empty CaloAthenaPool/ directory. * Tagging as CaloAthenaPool-00-03-10 2016-08-03 scott snyder <snyder@bnl.gov> * Tagging CaloAthenaPool-00-03-09. * endreq -> endmsg. 2016-06-30 scott snyder <snyder@bnl.gov> * Tagging CaloAthenaPool-00-03-08. ... (Long ChangeLog diff - truncated) --- .../CaloCnv/CaloAthenaPool/CMakeLists.txt | 47 +++++++++++-------- .../CaloCnv/CaloAthenaPool/cmt/requirements | 0 .../src/CaloCellContainerCnv.cxx | 18 +++---- .../CaloAthenaPool/src/CaloCellContainerCnv.h | 3 -- .../src/CaloCellLinkContainerCnv.cxx | 14 +++--- .../src/CaloCellLinkContainerCnv.h | 0 .../src/CaloClusterCellLinkContainerCnv.cxx | 28 ++++++----- .../src/CaloClusterCellLinkContainerCnv.h | 11 +++-- .../src/CaloClusterContainerCnv.cxx | 24 +++++----- .../src/CaloClusterContainerCnv.h | 0 .../src/CaloShowerContainerCnv.cxx | 14 +++--- .../src/CaloShowerContainerCnv.h | 0 .../src/CaloTopoTowerContainerCnv.cxx | 30 ++++++------ .../src/CaloTopoTowerContainerCnv.h | 0 .../src/CaloTowerContainerCnv.cxx | 38 +++++++-------- .../src/CaloTowerContainerCnv.h | 0 .../CaloAthenaPool/test/CaloAthenaPool.xml | 0 17 files changed, 116 insertions(+), 111 deletions(-) mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/cmt/requirements mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.h mode change 100755 => 100644 Calorimeter/CaloCnv/CaloAthenaPool/test/CaloAthenaPool.xml diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt b/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt index b367ae89a02..7c58d0756ca 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt +++ b/Calorimeter/CaloCnv/CaloAthenaPool/CMakeLists.txt @@ -1,3 +1,4 @@ +# $Id: CMakeLists.txt 780060 2016-10-24 14:27:13Z krasznaa $ ################################################################################ # Package: CaloAthenaPool ################################################################################ @@ -6,37 +7,43 @@ atlas_subdir( CaloAthenaPool ) # Declare the package's dependencies: -atlas_depends_on_subdirs( PUBLIC - Database/AthenaPOOL/AthenaPoolUtilities - PRIVATE - AtlasTest/TestTools - Calorimeter/CaloCnv/CaloTPCnv - Calorimeter/CaloDetDescr - Calorimeter/CaloEvent - Calorimeter/CaloInterface - Calorimeter/CaloUtils - Control/SGTools - Control/StoreGate - Database/AthenaPOOL/AthenaPoolCnvSvc ) +atlas_depends_on_subdirs( + PUBLIC + Database/AthenaPOOL/AthenaPoolUtilities + PRIVATE + AtlasTest/TestTools + Calorimeter/CaloCnv/CaloTPCnv + Calorimeter/CaloDetDescr + Calorimeter/CaloEvent + Calorimeter/CaloInterface + Calorimeter/CaloUtils + Control/SGTools + Control/StoreGate + Database/AthenaPOOL/AthenaPoolCnvSvc ) # Component(s) in the package: atlas_add_poolcnv_library( CaloAthenaPoolPoolCnv - src/*.cxx - FILES CaloEvent/CaloCellContainer.h CaloEvent/CaloClusterContainer.h CaloEvent/CaloClusterCellLinkContainer.h CaloEvent/CaloTopoTowerContainer.h CaloEvent/CaloTowerContainer.h CaloEvent/CaloCellLinkContainer.h CaloEvent/CaloShowerContainer.h - LINK_LIBRARIES AthenaPoolUtilities CaloTPCnv CaloDetDescrLib CaloEvent CaloUtilsLib SGTools StoreGateLib SGtests AthenaPoolCnvSvcLib ) + src/*.h src/*.cxx + FILES CaloEvent/CaloCellContainer.h CaloEvent/CaloClusterContainer.h + CaloEvent/CaloClusterCellLinkContainer.h CaloEvent/CaloTopoTowerContainer.h + CaloEvent/CaloTowerContainer.h CaloEvent/CaloCellLinkContainer.h + CaloEvent/CaloShowerContainer.h + LINK_LIBRARIES AthenaPoolUtilities CaloTPCnv CaloDetDescrLib CaloEvent + CaloUtilsLib SGTools StoreGateLib AthenaPoolCnvSvcLib ) # Install files from the package: atlas_install_headers( CaloAthenaPool ) atlas_install_joboptions( share/*.py ) - -# Set up (a) test(s) for the converter(s): -if( IS_DIRECTORY ${CMAKE_SOURCE_DIR}/Database/AthenaPOOL/AthenaPoolUtilities ) - set( AthenaPoolUtilitiesTest_DIR - ${CMAKE_SOURCE_DIR}/Database/AthenaPOOL/AthenaPoolUtilities/cmake ) +# Find the helper code for the T/P tests: +set( _poolTestDir + ${CMAKE_CURRENT_SOURCE_DIR}/../../../Database/AthenaPOOL/AthenaPoolUtilities ) +if( IS_DIRECTORY ${_poolTestDir} ) + set( AthenaPoolUtilitiesTest_DIR ${_poolTestDir}/cmake ) endif() find_package( AthenaPoolUtilitiesTest ) +# Set up the tests if possible: if( ATHENAPOOLUTILITIESTEST_FOUND ) run_tpcnv_test( CaloTPCnv_14.5.0 AOD-14.5.0-full ) run_tpcnv_test( CaloTPCnv_15.1.0 AOD-15.1.0-full ) diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/cmt/requirements b/Calorimeter/CaloCnv/CaloAthenaPool/cmt/requirements old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.cxx old mode 100755 new mode 100644 index 4962551141c..19da03dc619 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.cxx @@ -17,12 +17,8 @@ #include "CaloInterface/ICaloCompactCellTool.h" CaloCellContainerCnv::CaloCellContainerCnv(ISvcLocator* svcloc) - : - // Base class constructor - CaloCellContainerCnvBase::T_AthenaPoolCustomCnv(svcloc), - m_detMgr(0), - m_compactCellTool(0), - m_p1_guid("91B7AAA5-E302-4666-A4F6-7B331240AF23") + : CaloCellContainerCnvBase::T_AthenaPoolCustomCnv(svcloc), + m_p1_guid("91B7AAA5-E302-4666-A4F6-7B331240AF23") {} CaloCellContainerCnv::~CaloCellContainerCnv(){ @@ -30,8 +26,8 @@ CaloCellContainerCnv::~CaloCellContainerCnv(){ CaloCellContainerPERS* CaloCellContainerCnv::createPersistent(CaloCellContainer* trans) { - MsgStream log(messageService(), "CaloCellContainerCnv"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloCellContainer_p1" << endreq; + MsgStream log(msgSvc(), "CaloCellContainerCnv"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloCellContainer_p1" << endmsg; CaloCellContainerPERS* pers=new CaloCellContainerPERS(); m_converter1.transToPers(trans,pers); return pers; @@ -40,16 +36,16 @@ CaloCellContainerPERS* CaloCellContainerCnv::createPersistent(CaloCellContainer* CaloCellContainer* CaloCellContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloCellContainerCnv" ); + MsgStream log(msgSvc(), "CaloCellContainerCnv" ); CaloCellContainer* trans=new CaloCellContainer(); if (compareClassGuid(m_p1_guid)) { - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Reading CaloCellContainer_p1. GUID=" << m_classID.toString() << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Reading CaloCellContainer_p1. GUID=" << m_classID.toString() << endmsg; CaloCompactCellContainer* pers=poolReadObject<CaloCompactCellContainer>(); m_converter1.persToTrans(pers,trans); delete pers; return trans; } else { - log << MSG::ERROR << "Unsupported persistent version of CaloCellContainer. GUID="<< m_classID.toString() << endreq; + log << MSG::ERROR << "Unsupported persistent version of CaloCellContainer. GUID="<< m_classID.toString() << endmsg; throw std::runtime_error("Unsupported persistent version of Data Collection"); } return trans; diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.h old mode 100755 new mode 100644 index 4cf12832df9..2ea9e7b529d --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.h +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellContainerCnv.h @@ -37,9 +37,6 @@ public: virtual CaloCellContainerPERS* createPersistent(CaloCellContainer*); private: - /// Save LArDDMgr for initializing CaloCells - const CaloDetDescrManager* m_detMgr; - ICaloCompactCellTool* m_compactCellTool; CaloCellContainerCnv_p1 m_converter1; pool::Guid m_p1_guid; diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.cxx old mode 100755 new mode 100644 index 248e8914959..6e5d913a704 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.cxx @@ -17,8 +17,8 @@ CaloCellLinkContainerCnv::CaloCellLinkContainerCnv(ISvcLocator* svcLoc) : CaloCellLinkContainerPERS* CaloCellLinkContainerCnv::createPersistent(CaloCellLinkContainer* trans) { - MsgStream log(messageService(), "CaloCellLinkContainerCnv"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloCellLinkContainer_p1" << endreq; + MsgStream log(msgSvc(), "CaloCellLinkContainerCnv"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloCellLinkContainer_p1" << endmsg; CaloCellLinkContainerPERS* pers=new CaloCellLinkContainerPERS(); m_converter_p2.transToPers(trans,pers,log); return pers; @@ -27,15 +27,15 @@ CaloCellLinkContainerPERS* CaloCellLinkContainerCnv::createPersistent(CaloCellLi CaloCellLinkContainer* CaloCellLinkContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloCellLinkContainerCnv" ); + MsgStream log(msgSvc(), "CaloCellLinkContainerCnv" ); if (compareClassGuid(m_p0_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p0 of CaloCellLinkContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; return poolReadObject<CaloCellLinkContainer>(); } else if (compareClassGuid(m_p1_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloCellLinkContainer_p1. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloCellLinkContainer_p1* pers=poolReadObject<CaloCellLinkContainer_p1>(); CaloCellLinkContainer* trans=new CaloCellLinkContainer(); m_converter_p1.persToTrans(pers,trans,log); @@ -44,7 +44,7 @@ CaloCellLinkContainer* CaloCellLinkContainerCnv::createTransient() { } else if (compareClassGuid(m_p2_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloCellLinkContainer_p2. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloCellLinkContainer_p2* pers=poolReadObject<CaloCellLinkContainer_p2>(); CaloCellLinkContainer* trans=new CaloCellLinkContainer(); m_converter_p2.persToTrans(pers,trans,log); @@ -53,7 +53,7 @@ CaloCellLinkContainer* CaloCellLinkContainerCnv::createTransient() { } log << MSG::ERROR << "Unsupported persistent version of CaloCellLinkContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; throw std::runtime_error("Unsupported persistent version of Data Collection"); return 0; } diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloCellLinkContainerCnv.h old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.cxx index d2de9c21825..c19ba159d95 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.cxx @@ -2,7 +2,7 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: CaloClusterCellLinkContainerCnv.cxx 613575 2014-08-26 19:23:37Z gemmeren $ +// $Id: CaloClusterCellLinkContainerCnv.cxx 781569 2016-11-01 12:16:14Z wlampl $ // System include(s): #include <exception> @@ -19,25 +19,19 @@ CaloClusterCellLinkContainerCnv::CaloClusterCellLinkContainerCnv( ISvcLocator* s } -CaloClusterCellLinkContainer* CaloClusterCellLinkContainerCnv::createPersistent(CaloClusterCellLinkContainer* trans ) { +CaloClusterCellLinkContainer_p1* CaloClusterCellLinkContainerCnv::createPersistent(CaloClusterCellLinkContainer* trans ) { - - // Create a view copy of the container: - CaloClusterCellLinkContainer* result = - new CaloClusterCellLinkContainer( trans->begin(), trans->end(), - SG::VIEW_ELEMENTS ); - result->toPersistent(); - - // Return the new container: + CaloClusterCellLinkContainer_p1* result=new CaloClusterCellLinkContainer_p1(); + m_converter.transToPers(trans,result,msg()); return result; } CaloClusterCellLinkContainer* CaloClusterCellLinkContainerCnv::createTransient() { // The known ID(s) for this container: - static pool::Guid v1_guid( "545AC204-2749-4AAC-9783-B1E5A7A0030F"); - + static pool::Guid v0_guid( "545AC204-2749-4AAC-9783-B1E5A7A0030F"); + static pool::Guid v1_guid( "C70A8262-05DB-48FC-8E4A-73793B4E58B9"); // Check if we're reading the most up to date type: - if( compareClassGuid( v1_guid ) ) { + if( compareClassGuid( v0_guid ) ) { std::unique_ptr<CaloClusterCellLinkContainer> p( poolReadObject<CaloClusterCellLinkContainer >() ); if( p->ownPolicy() == SG::VIEW_ELEMENTS ) { CaloClusterCellLinkContainer* result = new CaloClusterCellLinkContainer( p->begin(), p->end(), SG::OWN_ELEMENTS ); @@ -46,6 +40,14 @@ CaloClusterCellLinkContainer* CaloClusterCellLinkContainerCnv::createTransient() return p.release(); } + if ( compareClassGuid(v1_guid) ) { + std::unique_ptr<CaloClusterCellLinkContainer_p1> pers( poolReadObject<CaloClusterCellLinkContainer_p1 >() ); + + CaloClusterCellLinkContainer* trans=new CaloClusterCellLinkContainer(); + m_converter.persToTrans(pers.get(),trans,msg()); + return trans; + } + // If we didn't recognise the ID, let's complain: throw std::runtime_error( "Unsupported version of " "CaloClusterCellLinkContainer found" ); diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.h index cffadfc2b65..a2e9ee77d93 100644 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.h +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterCellLinkContainerCnv.h @@ -4,15 +4,17 @@ Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */ -// $Id: CaloClusterCellLinkContainerCnv.h 585280 2014-02-26 15:45:07Z wlampl $ +// $Id: CaloClusterCellLinkContainerCnv.h 781569 2016-11-01 12:16:14Z wlampl $ #ifndef CALOCLUSTERCELLLINKCONTAINERCNV_H #define CALOCLUSTERCELLLINKCONTAINERCNV_H #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" #include "CaloEvent/CaloClusterCellLinkContainer.h" +#include "CaloTPCnv/CaloClusterCellLinkContainerCnv_p1.h" + /// Type definition for the converter's base -typedef T_AthenaPoolCustomCnv<CaloClusterCellLinkContainer, CaloClusterCellLinkContainer > CaloClusterCellLinkContainerCnvBase; +typedef T_AthenaPoolCustomCnv<CaloClusterCellLinkContainer, CaloClusterCellLinkContainer_p1 > CaloClusterCellLinkContainerCnvBase; class CaloClusterCellLinkContainerCnv : public CaloClusterCellLinkContainerCnvBase { @@ -24,13 +26,14 @@ public: CaloClusterCellLinkContainerCnv( ISvcLocator* svcLoc ); /// Function preparing the container to be written out - virtual CaloClusterCellLinkContainer* createPersistent(CaloClusterCellLinkContainer* trans ); + virtual CaloClusterCellLinkContainer_p1* createPersistent(CaloClusterCellLinkContainer* trans ); /// Function reading in the persistent object virtual CaloClusterCellLinkContainer* createTransient(); private: - void toPersistent( CaloClusterCellLink* lnk ) const; + void toPersistent( CaloClusterCellLink* lnk ) const; + CaloClusterCellLinkContainerCnv_p1 m_converter; }; #endif diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.cxx old mode 100755 new mode 100644 index 666cae9b0fc..e08b5b6f09e --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.cxx @@ -24,8 +24,8 @@ CaloClusterContainerCnv::CaloClusterContainerCnv(ISvcLocator* svcLoc) : CaloClusterContainerPERS* CaloClusterContainerCnv::createPersistent(CaloClusterContainer* trans) { - MsgStream log(messageService(), "CaloClusterContainerCnv"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloClusterContainer_p7" << endreq; + MsgStream log(msgSvc(), "CaloClusterContainerCnv"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloClusterContainer_p7" << endmsg; CaloClusterContainerPERS* pers=new CaloClusterContainerPERS(); m_converter_p7.transToPers(trans,pers,log); return pers; @@ -34,26 +34,26 @@ CaloClusterContainerPERS* CaloClusterContainerCnv::createPersistent(CaloClusterC CaloClusterContainer* CaloClusterContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloClusterContainerCnv" ); + MsgStream log(msgSvc(), "CaloClusterContainerCnv" ); // Search for persistent version to convert - last version first CaloClusterContainer* trans = 0; if (compareClassGuid(m_p7_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p7. GUID=" << m_classID.toString() << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p7. GUID=" << m_classID.toString() << endmsg; CaloClusterContainer_p7* pers=poolReadObject<CaloClusterContainer_p7>(); m_converter_p7.persToTrans(pers,trans,log); delete pers; } else if (compareClassGuid(m_p6_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p6. GUID=" << m_classID.toString() << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p6. GUID=" << m_classID.toString() << endmsg; CaloClusterContainer_p6* pers=poolReadObject<CaloClusterContainer_p6>(); m_converter_p6.persToTrans(pers,trans,log); delete pers; } else if (compareClassGuid(m_p5_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p5. GUID=" << m_classID.toString() << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p5. GUID=" << m_classID.toString() << endmsg; CaloClusterContainer_p5* pers=poolReadObject<CaloClusterContainer_p5>(); m_converter_p5.persToTrans(pers,trans,log); delete pers; @@ -61,7 +61,7 @@ CaloClusterContainer* CaloClusterContainerCnv::createTransient() { else if (compareClassGuid(m_p4_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p4. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloClusterContainer_p4* pers=poolReadObject<CaloClusterContainer_p4>(); m_converter_p4.persToTrans(pers,trans,log); delete pers; @@ -69,7 +69,7 @@ CaloClusterContainer* CaloClusterContainerCnv::createTransient() { else if (compareClassGuid(m_p3_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p3. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloClusterContainer_p3* pers=poolReadObject<CaloClusterContainer_p3>(); m_converter_p3.persToTrans(pers,trans,log); delete pers; @@ -77,7 +77,7 @@ CaloClusterContainer* CaloClusterContainerCnv::createTransient() { else if (compareClassGuid(m_p2_guid)) { trans=new CaloClusterContainer(SG::VIEW_ELEMENTS); if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p2. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloClusterContainer_p2* pers=poolReadObject<CaloClusterContainer_p2>(); m_converter_p2.persToTrans(pers,trans,log); delete pers; @@ -85,19 +85,19 @@ CaloClusterContainer* CaloClusterContainerCnv::createTransient() { else if (compareClassGuid(m_p1_guid)) { trans=new CaloClusterContainer(); if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read CaloClusterContainer_p1. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloClusterContainer_p1* pers=poolReadObject<CaloClusterContainer_p1>(); m_converter_p1.persToTrans(pers,trans,log); delete pers; } else if (compareClassGuid(m_p0_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p0 of CaloClusterContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; trans = poolReadObject<CaloClusterContainer>(); } else { log << MSG::ERROR << "Unsupported persistent version of CaloClusterContainer GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; throw std::runtime_error("Unsupported persistent version of CaloClusterContainer"); } //CaloClusterSignalState::setCollectionDefaultState(trans,P4SignalState::CALIBRATED); diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloClusterContainerCnv.h old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.cxx old mode 100755 new mode 100644 index 5f53c28704d..9daaa686c3c --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.cxx @@ -17,8 +17,8 @@ CaloShowerContainerCnv::CaloShowerContainerCnv(ISvcLocator* svcLoc) : CaloShowerContainerPERS* CaloShowerContainerCnv::createPersistent(CaloShowerContainer* trans) { - MsgStream log(messageService(), "CaloShowerContainerCnv"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloShowerContainer_p2" << endreq; + MsgStream log(msgSvc(), "CaloShowerContainerCnv"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloShowerContainer_p2" << endmsg; CaloShowerContainerPERS* pers=new CaloShowerContainerPERS(); m_converter2.transToPers(trans,pers,log); return pers; @@ -27,15 +27,15 @@ CaloShowerContainerPERS* CaloShowerContainerCnv::createPersistent(CaloShowerCont CaloShowerContainer* CaloShowerContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloShowerContainerCnv" ); + MsgStream log(msgSvc(), "CaloShowerContainerCnv" ); if (compareClassGuid(m_p0_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p0 of CaloShowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; return poolReadObject<CaloShowerContainer>(); } else if (compareClassGuid(m_p1_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Reading CaloShowerContainer_p1. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloShowerContainer_p1* pers=poolReadObject<CaloShowerContainer_p1>(); CaloShowerContainer* trans=new CaloShowerContainer(); m_converter1.persToTrans(pers,trans,log); @@ -44,7 +44,7 @@ CaloShowerContainer* CaloShowerContainerCnv::createTransient() { } else if (compareClassGuid(m_p2_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Reading CaloShowerContainer_p2. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloShowerContainer_p2* pers=poolReadObject<CaloShowerContainer_p2>(); CaloShowerContainer* trans=new CaloShowerContainer(); m_converter2.persToTrans(pers,trans,log); @@ -53,7 +53,7 @@ CaloShowerContainer* CaloShowerContainerCnv::createTransient() { } log << MSG::ERROR << "Unsupported persistent version of CaloShowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; throw std::runtime_error("Unsupported persistent version of Data Collection"); return 0; } diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloShowerContainerCnv.h old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx old mode 100755 new mode 100644 index 06002131a12..068d38515a6 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.cxx @@ -40,7 +40,7 @@ CaloTopoTowerContainerCnv::~CaloTopoTowerContainerCnv() // // Get the messaging service, print where you are // MsgStream log(msgSvc(), "CaloTopoTowerContainerCnv"); -// log << MSG::INFO << "initialize()" << endreq; +// log << MSG::INFO << "initialize()" << endmsg; // return StatusCode::SUCCESS; // } @@ -48,24 +48,24 @@ CaloTopoTowerContainerCnv::~CaloTopoTowerContainerCnv() //StatusCode CaloTopoTowerContainerCnv::PoolToDataObject(DataObject*& pObj,const std::string &token) CaloTopoTowerContainer* CaloTopoTowerContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloTopoTowerContainerCnv::createTransient" ); + MsgStream log(msgSvc(), "CaloTopoTowerContainerCnv::createTransient" ); CaloTopoTowerContainer* Cont = 0; - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Starting CaloTopoTowerContainerCnv::PoolToDataObject" << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Starting CaloTopoTowerContainerCnv::PoolToDataObject" << endmsg; if (compareClassGuid(p0_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p0 of CaloTopoTowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; Cont=poolReadObject<CaloTopoTowerContainer>(); } else if(compareClassGuid(p1_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p1 of CaloTopoTowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloTopoTowerContainerPERS* pers=poolReadObject<CaloTopoTowerContainer_p1>(); Cont=new CaloTopoTowerContainer(); m_converter.persToTrans(pers,Cont,log); delete pers; } if (!Cont) { - log << MSG::FATAL << "Unable to get object from pool" << endreq; + log << MSG::FATAL << "Unable to get object from pool" << endmsg; return Cont; } @@ -75,23 +75,23 @@ CaloTopoTowerContainer* CaloTopoTowerContainerCnv::createTransient() { m_TopoTowerBldr= getTool("CaloTopoTowerBuilderTool","TopoTowerTwrBldr"); if(!m_TopoTowerBldr){ - log<<MSG::ERROR<< " Failed to create CaloTopoTowerContainer " <<endreq; + log<<MSG::ERROR<< " Failed to create CaloTopoTowerContainer " <<endmsg; return 0; } - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "creating CaloTopoTowerContainerCnv::PoolToDataObject" << endreq; + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "creating CaloTopoTowerContainerCnv::PoolToDataObject" << endmsg; StatusCode scfcal = m_TopoTowerBldr->execute(Cont); - if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" TopoTowers rebuild m_TopoTowerBldr->execute(Cont); Successful "<<endreq; + 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 "<<endreq; + log<<MSG::ERROR<<" TopoTowers rebuild failed "<<endmsg; } - if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" TopoTowers rebuild worked "<<endreq; + if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" TopoTowers rebuild worked "<<endmsg; return Cont; } CaloTopoTowerContainerPERS* CaloTopoTowerContainerCnv::createPersistent(CaloTopoTowerContainer* trans) { - MsgStream log(messageService(), "CaloTopoTowerContainerCnv::createPersistent"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloTopoTowerContainer_p1" << endreq; + MsgStream log(msgSvc(), "CaloTopoTowerContainerCnv::createPersistent"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloTopoTowerContainer_p1" << endmsg; CaloTopoTowerContainerPERS* pers=new CaloTopoTowerContainerPERS(); m_converter.transToPers(trans,pers,log); return pers; @@ -109,7 +109,7 @@ const std::string& type, const std::string& nm) { log << MSG::ERROR << "Tool Service not found" - << endreq; + << endmsg; return 0 ; } @@ -126,7 +126,7 @@ const std::string& type, const std::string& nm) << "Cannot find tool named <" << type << "/" << nm << ">" - << endreq; + << endmsg; return 0; } return dynamic_cast<CaloTopoTowerBuilderToolBase*>(algToolPtr); diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTopoTowerContainerCnv.h old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx old mode 100755 new mode 100644 index df3d0013f95..389365ccb43 --- a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx +++ b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.cxx @@ -42,7 +42,7 @@ CaloTowerContainerCnv::~CaloTowerContainerCnv() // // Get the messaging service, print where you are // MsgStream log(msgSvc(), "CaloTowerContainerCnv"); -// log << MSG::INFO << "initialize()" << endreq; +// log << MSG::INFO << "initialize()" << endmsg; // return StatusCode::SUCCESS; // } @@ -50,24 +50,24 @@ CaloTowerContainerCnv::~CaloTowerContainerCnv() //StatusCode CaloTowerContainerCnv::PoolToDataObject(DataObject*& pObj,const std::string &token) CaloTowerContainer* CaloTowerContainerCnv::createTransient() { - MsgStream log(messageService(), "CaloTowerContainerCnv::createTransient" ); + MsgStream log(msgSvc(), "CaloTowerContainerCnv::createTransient" ); CaloTowerContainer* Cont = 0; if (compareClassGuid(p0_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p0 of CaloTowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; Cont=poolReadObject<CaloTowerContainer>(); } else if(compareClassGuid(p1_guid)) { if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Read version p1 of CaloTowerContainer. GUID=" - << m_classID.toString() << endreq; + << m_classID.toString() << endmsg; CaloTowerContainerPERS* pers=poolReadObject<CaloTowerContainer_p1>(); Cont=new CaloTowerContainer(); m_converter.persToTrans(pers,Cont); delete pers; } if (!Cont) { - log << MSG::FATAL << "Unable to get object from pool" << endreq; + log << MSG::FATAL << "Unable to get object from pool" << endmsg; return Cont; } @@ -79,7 +79,7 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { std::vector<CaloCell_ID::SUBCALO> v; if(Cont->getCalos(v)==0){ - log<<MSG::WARNING<< " No SUBCALO in CaloTowerContainer"<<endreq; + log<<MSG::WARNING<< " No SUBCALO in CaloTowerContainer"<<endmsg; return Cont; } @@ -103,14 +103,14 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { m_fcalTowerBldr= getTool("LArFCalTowerBuilderTool", "LArTowerFCal"); if(!m_fcalTowerBldr){ - log<<MSG::ERROR<< " Failed to create LArFCalTowerBuilder " <<endreq; + log<<MSG::ERROR<< " Failed to create LArFCalTowerBuilder " <<endmsg; return 0; } } - if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for FCAL "<<endreq; + if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for FCAL "<<endmsg; StatusCode scfcal = m_fcalTowerBldr->execute(Cont); if (scfcal.isFailure()) { - log<<MSG::ERROR<<" Towers rebuild for FCAL failed "<<endreq; + log<<MSG::ERROR<<" Towers rebuild for FCAL failed "<<endmsg; } } @@ -119,14 +119,14 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { m_tileTowerBldr= getTool("TileTowerBuilderTool", "TileTower"); if(!m_tileTowerBldr){ - log<<MSG::ERROR<< " Failed to create TileTowerBuilder " <<endreq; + log<<MSG::ERROR<< " Failed to create TileTowerBuilder " <<endmsg; return 0; } } - if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for Tile "<<endreq; + if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for Tile "<<endmsg; StatusCode sctile=m_tileTowerBldr->execute(Cont); if (sctile.isFailure()) { - log<<MSG::ERROR<<" Towers rebuild for Tile failed "<<endreq; + log<<MSG::ERROR<<" Towers rebuild for Tile failed "<<endmsg; } } @@ -138,15 +138,15 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { "LArTowerEMHEC"); m_emHecTowerBldr=dynamic_cast<CaloTowerBuilderTool*>(bldr); if(!m_emHecTowerBldr){ - log<<MSG::ERROR<< " Failed to create LArTowerBuilder for EM&HEC" <<endreq; + log<<MSG::ERROR<< " Failed to create LArTowerBuilder for EM&HEC" <<endmsg; return 0; } } - if (log.level() <= MSG::DEBUG) log<<MSG::DEBUG<<" Towers rebuild for EM and/or HEC "<<endreq; + 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); if (scemHec.isFailure()) { - log<<MSG::ERROR<<" Towers rebuild for EM and/or HEC failed "<<endreq; + log<<MSG::ERROR<<" Towers rebuild for EM and/or HEC failed "<<endmsg; } } @@ -155,8 +155,8 @@ CaloTowerContainer* CaloTowerContainerCnv::createTransient() { } CaloTowerContainerPERS* CaloTowerContainerCnv::createPersistent(CaloTowerContainer* trans) { - MsgStream log(messageService(), "CaloTowerContainerCnv::createPersistent"); - if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloTowerContainer_p1" << endreq; + MsgStream log(msgSvc(), "CaloTowerContainerCnv::createPersistent"); + if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Writing CaloTowerContainer_p1" << endmsg; CaloTowerContainerPERS* pers=new CaloTowerContainerPERS(); m_converter.transToPers(trans,pers); return pers; @@ -174,7 +174,7 @@ const std::string& type, const std::string& nm) { log << MSG::ERROR << "Tool Service not found" - << endreq; + << endmsg; return 0 ; } @@ -191,7 +191,7 @@ const std::string& type, const std::string& nm) << "Cannot find tool named <" << type << "/" << nm << ">" - << endreq; + << endmsg; return 0; } return dynamic_cast<CaloTowerBuilderToolBase*>(algToolPtr); diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.h b/Calorimeter/CaloCnv/CaloAthenaPool/src/CaloTowerContainerCnv.h old mode 100755 new mode 100644 diff --git a/Calorimeter/CaloCnv/CaloAthenaPool/test/CaloAthenaPool.xml b/Calorimeter/CaloCnv/CaloAthenaPool/test/CaloAthenaPool.xml old mode 100755 new mode 100644 -- GitLab