diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/cmt/requirements b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/cmt/requirements new file mode 100755 index 0000000000000000000000000000000000000000..cacef6dada7da15fce9043d17c8c593d62ed2d93 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/cmt/requirements @@ -0,0 +1,18 @@ +package ZdcEventAthenaPool + +author Peter Steinberg <Peter.Alan.Steinberg@cern.ch> + +use AtlasPolicy AtlasPolicy-* + +private +use AthenaPoolUtilities AthenaPoolUtilities-* Database/AthenaPOOL +use GaudiInterface GaudiInterface-* External +use AthenaPoolCnvSvc AthenaPoolCnvSvc-* Database/AthenaPOOL +use ZdcEvent ZdcEvent-* ForwardDetectors/ZDC +use ZDC_SimEvent ZDC_SimEvent-* ForwardDetectors/ZDC +use ZdcEventTPCnv ZdcEventTPCnv-* ForwardDetectors/ZDC/ZdcCnv + +apply_pattern poolcnv files="-s=${ZdcEvent_root}/ZdcEvent ZdcDigitsCollection.h ZdcRawChannelCollection.h -s=${ZDC_SimEvent_root}/ZDC_SimEvent ZDC_SimStripHit_Collection.h ZDC_SimPixelHit_Collection.h" + +macro_append ZdcEventAthenaPoolPoolCnv_shlibflags "$(ZdcEventAthenaPool_dict_linkopts)" + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..02fc990bcefcb037810e7eadf75e199b78df608a --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.cxx @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ZDC_SimPixelHit_CollectionCnv.cxx + * @brief Generated implementation file which includes header files needed by ZDC_SimPixelHit_CollectionCnv + * @author RD Schaffer <R.D.Schaffer@cern.ch> + */ + +#include "ZDC_SimPixelHit_CollectionCnv.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_CollectionCnv_p1.h" + +#include "GaudiKernel/MsgStream.h" + +ZDC_SimPixelHit_Collection_PERS* ZDC_SimPixelHit_CollectionCnv::createPersistent(ZDC_SimPixelHit_Collection* transCont) { + + MsgStream mlog(messageService(), "ZDC_SimPixelHit_CollectionConverter" ); + ZDC_SimPixelHit_CollectionCnv_p1 converter; + ZDC_SimPixelHit_Collection_PERS *persObj = converter.createPersistent( transCont, mlog ); + + + return persObj; +} + +ZDC_SimPixelHit_Collection* ZDC_SimPixelHit_CollectionCnv::createTransient() { + + + MsgStream mlog(messageService(), "ZDC_SimPixelHit_CollectionConverter" ); + ZDC_SimPixelHit_CollectionCnv_p1 converter_p1; + + ZDC_SimPixelHit_Collection *trans_cont(0); + + static const pool::Guid p1_guid("EBCA37BF-38FF-4F19-B577-E5D0EFFA51D0"); + if( this->compareClassGuid(p1_guid)) { + std::auto_ptr< ZDC_SimPixelHit_Collection_PERS > col_vect( this->poolReadObject< ZDC_SimPixelHit_Collection_PERS >() ); + trans_cont = converter_p1.createTransient(col_vect.get(), mlog ); + } + else { + throw std::runtime_error("Unsupported persistent version of Data collection"); + } + + + return trans_cont; +} + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..55375548307d8e79490b8b0c29bde21ebc50db8f --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimPixelHit_CollectionCnv.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ZDC_SimPixelHit_CollectionCnv.h + * @brief Generated header file which defines a typedef for templated converter class + * @author RD Schaffer <R.D. Schaffer@cern.ch> + */ + +#ifndef ZDC_SimPixelHit_CollectionCnv_H +#define ZDC_SimPixelHit_CollectionCnv_H + +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +#include "ZDC_SimEvent/ZDC_SimPixelHit_Collection.h" +#include "ZdcEventTPCnv/ZDC_SimPixelHit_Collection_p1.h" + +typedef ZDC_SimPixelHit_Collection_p1 ZDC_SimPixelHit_Collection_PERS; + +typedef T_AthenaPoolCustomCnv<ZDC_SimPixelHit_Collection, ZDC_SimPixelHit_Collection_PERS> ZDC_SimPixelHit_CollectionCnvBase; + +class ZDC_SimPixelHit_CollectionCnv : public ZDC_SimPixelHit_CollectionCnvBase { + + friend class CnvFactory<ZDC_SimPixelHit_CollectionCnv>; + +protected: + + ZDC_SimPixelHit_CollectionCnv(ISvcLocator* svcloc) : ZDC_SimPixelHit_CollectionCnvBase ( svcloc) {} + virtual ZDC_SimPixelHit_Collection_PERS* createPersistent(ZDC_SimPixelHit_Collection* transCont); + virtual ZDC_SimPixelHit_Collection* createTransient (); + +}; + +#endif + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.cxx new file mode 100644 index 0000000000000000000000000000000000000000..034d55f9d5528366503f3d7c7733a3fb0e299992 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.cxx @@ -0,0 +1,46 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ZDC_SimStripHit_CollectionCnv.cxx + * @brief Generated implementation file which includes header files needed by ZDC_SimStripHit_CollectionCnv + * @author RD Schaffer <R.D.Schaffer@cern.ch> + */ + +#include "ZDC_SimStripHit_CollectionCnv.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_CollectionCnv_p1.h" + +#include "GaudiKernel/MsgStream.h" + +ZDC_SimStripHit_Collection_PERS* ZDC_SimStripHit_CollectionCnv::createPersistent(ZDC_SimStripHit_Collection* transCont) { + + MsgStream mlog(messageService(), "ZDC_SimStripHit_CollectionConverter" ); + ZDC_SimStripHit_CollectionCnv_p1 converter; + ZDC_SimStripHit_Collection_PERS *persObj = converter.createPersistent( transCont, mlog ); + + + return persObj; +} + +ZDC_SimStripHit_Collection* ZDC_SimStripHit_CollectionCnv::createTransient() { + + + MsgStream mlog(messageService(), "ZDC_SimStripHit_CollectionConverter" ); + ZDC_SimStripHit_CollectionCnv_p1 converter_p1; + + ZDC_SimStripHit_Collection *trans_cont(0); + + static const pool::Guid p1_guid("1082F8C1-BA19-47AF-83D7-4669BD12E9AC"); + if( this->compareClassGuid(p1_guid)) { + std::auto_ptr< ZDC_SimStripHit_Collection_PERS > col_vect( this->poolReadObject< ZDC_SimStripHit_Collection_PERS >() ); + trans_cont = converter_p1.createTransient(col_vect.get(), mlog ); + } + else { + throw std::runtime_error("Unsupported persistent version of Data collection"); + } + + + return trans_cont; +} + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.h new file mode 100644 index 0000000000000000000000000000000000000000..dc947998b26b5335de6f65b25486e74527d111fa --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZDC_SimStripHit_CollectionCnv.h @@ -0,0 +1,35 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +/** + * @file ZDC_SimStripHit_CollectionCnv.h + * @brief Generated header file which defines a typedef for templated converter class + * @author RD Schaffer <R.D. Schaffer@cern.ch> + */ + +#ifndef ZDC_SimStripHit_CollectionCnv_H +#define ZDC_SimStripHit_CollectionCnv_H + +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +#include "ZDC_SimEvent/ZDC_SimStripHit_Collection.h" +#include "ZdcEventTPCnv/ZDC_SimStripHit_Collection_p1.h" + +typedef ZDC_SimStripHit_Collection_p1 ZDC_SimStripHit_Collection_PERS; + +typedef T_AthenaPoolCustomCnv<ZDC_SimStripHit_Collection, ZDC_SimStripHit_Collection_PERS> ZDC_SimStripHit_CollectionCnvBase; + +class ZDC_SimStripHit_CollectionCnv : public ZDC_SimStripHit_CollectionCnvBase { + + friend class CnvFactory<ZDC_SimStripHit_CollectionCnv>; + +protected: + + ZDC_SimStripHit_CollectionCnv(ISvcLocator* svcloc) : ZDC_SimStripHit_CollectionCnvBase ( svcloc) {} + virtual ZDC_SimStripHit_Collection_PERS* createPersistent(ZDC_SimStripHit_Collection* transCont); + virtual ZDC_SimStripHit_Collection* createTransient (); + +}; + +#endif + diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.cxx new file mode 100755 index 0000000000000000000000000000000000000000..dd532c7eeb3b2893f14a55b30de8e06123d455fc --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.cxx @@ -0,0 +1,39 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#include "ZdcEventTPCnv/ZdcDigitsCollectionCnv_p1.h" +#include "ZdcDigitsCollectionCnv.h" +// Gaudi +#include "GaudiKernel/MsgStream.h" + +ZdcDigitsCollection_PERS* ZdcDigitsCollectionCnv::createPersistent(ZdcDigitsCollection* transCont) { + + MsgStream mlog(messageService(), "ZdcDigitsCollectionConverter" ); + ZdcDigitsCollectionCnv_p1 converter; + ZdcDigitsCollection_PERS *persObj = converter.createPersistent( transCont, mlog ); + + + return persObj; +} + +ZdcDigitsCollection* ZdcDigitsCollectionCnv::createTransient() { + + + MsgStream mlog(messageService(), "ZdcDigitsCollectionConverter" ); + ZdcDigitsCollectionCnv_p1 converter_p1; + + ZdcDigitsCollection *trans_cont(0); + + static const pool::Guid p1_guid("B77B5F9A-1C29-4D74-A107-B3C71680C029"); + if( this->compareClassGuid(p1_guid)) { + std::auto_ptr< ZdcDigitsCollection_p1 > col_vect( this->poolReadObject< ZdcDigitsCollection_p1 >() ); + trans_cont = converter_p1.createTransient(col_vect.get(), mlog ); + } + else { + throw std::runtime_error("Unsupported persistent version of Data collection"); + } + + + return trans_cont; +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.h new file mode 100755 index 0000000000000000000000000000000000000000..cdcde47b6a4e4f4f7ff43cfa72c4229396beba31 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcDigitsCollectionCnv.h @@ -0,0 +1,25 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDCDIGITSCOLLECTIONCNV +#define ZDCDIGITSCOLLECTIONCNV + +#include "ZdcEvent/ZdcDigitsCollection.h" +#include "ZdcEventTPCnv/ZdcDigitsCollection_p1.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +// typedef to the latest persistent version +typedef ZdcDigitsCollection_p1 ZdcDigitsCollection_PERS; + +typedef T_AthenaPoolCustomCnv<ZdcDigitsCollection, ZdcDigitsCollection_PERS > ZdcDigitsCollectionCnvBase; + +class ZdcDigitsCollectionCnv : public ZdcDigitsCollectionCnvBase { + friend class CnvFactory<ZdcDigitsCollectionCnv>; +protected: + ZdcDigitsCollectionCnv(ISvcLocator* svcloc) : ZdcDigitsCollectionCnvBase ( svcloc) {} + virtual ZdcDigitsCollection_PERS* createPersistent(ZdcDigitsCollection* transCont); + virtual ZdcDigitsCollection* createTransient (); +}; + + +#endif diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.cxx b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.cxx new file mode 100755 index 0000000000000000000000000000000000000000..4706fc02125a5003cf82c2ed30219cd4b4e18fcb --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.cxx @@ -0,0 +1,33 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + + +#include "ZdcEventTPCnv/ZdcRawChannelCollectionCnv_p1.h" +#include "ZdcRawChannelCollectionCnv.h" +// Gaudi +#include "GaudiKernel/MsgStream.h" + +ZdcRawChannelCollection_PERS* ZdcRawChannelCollectionCnv::createPersistent(ZdcRawChannelCollection* transCont) { + MsgStream mlog(messageService(), "ZdcRawChannelCollectionConverter" ); + ZdcRawChannelCollectionCnv_p1 converter; + ZdcRawChannelCollection_PERS *persObj = converter.createPersistent( transCont, mlog ); + return persObj; +} + +ZdcRawChannelCollection* ZdcRawChannelCollectionCnv::createTransient() { + MsgStream mlog(messageService(), "ZdcRawChannelCollectionConverter" ); + ZdcRawChannelCollectionCnv_p1 converter_p1; + + ZdcRawChannelCollection *trans_cont(0); + + static const pool::Guid p1_guid("A2BDA733-7A0A-459D-9237-33DFF3DC9982"); + if( this->compareClassGuid(p1_guid)) { + std::auto_ptr< ZdcRawChannelCollection_p1 > cont( this->poolReadObject< ZdcRawChannelCollection_p1 >() ); + trans_cont = converter_p1.createTransient( cont.get(), mlog ); + } + else { + throw std::runtime_error("Unsupported persistent version of Data collection"); + } + return trans_cont; +} diff --git a/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.h b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.h new file mode 100755 index 0000000000000000000000000000000000000000..c7a7a1989e84ada2ef718c1eb02d8e6605192a83 --- /dev/null +++ b/ForwardDetectors/ZDC/ZdcCnv/ZdcEventAthenaPool/src/ZdcRawChannelCollectionCnv.h @@ -0,0 +1,24 @@ +/* + Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +*/ + +#ifndef ZDCRAWCHANNELCOLLECTIONCNV +#define ZDCRAWCHANNELCOLLECTIONCNV + +#include "ZdcEvent/ZdcRawChannelCollection.h" +#include "ZdcEventTPCnv/ZdcRawChannelCollection_p1.h" +#include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h" +// typedef to the latest persistent version +typedef ZdcRawChannelCollection_p1 ZdcRawChannelCollection_PERS; + +class ZdcRawChannelCollectionCnv : public T_AthenaPoolCustomCnv<ZdcRawChannelCollection, ZdcRawChannelCollection_PERS > { + friend class CnvFactory<ZdcRawChannelCollectionCnv>; +protected: + ZdcRawChannelCollectionCnv(ISvcLocator* svcloc) : + T_AthenaPoolCustomCnv<ZdcRawChannelCollection, ZdcRawChannelCollection_PERS >( svcloc) {} + ZdcRawChannelCollection_PERS* createPersistent(ZdcRawChannelCollection* transCont); + ZdcRawChannelCollection* createTransient (); +}; + + +#endif