ATLAS Offline Software
ZdcRawChannelCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
8 // Gaudi
9 #include "GaudiKernel/MsgStream.h"
10 
12  MsgStream mlog(msgSvc(), "ZdcRawChannelCollectionConverter" );
14  ZdcRawChannelCollection_PERS *persObj = converter.createPersistent( transCont, mlog );
15  return persObj;
16 }
17 
19  MsgStream mlog(msgSvc(), "ZdcRawChannelCollectionConverter" );
20  ZdcRawChannelCollectionCnv_p1 converter_p1;
21 
22  ZdcRawChannelCollection *trans_cont(nullptr);
23 
24  static const pool::Guid p1_guid("A2BDA733-7A0A-459D-9237-33DFF3DC9982");
25  if( this->compareClassGuid(p1_guid)) {
26  std::unique_ptr< ZdcRawChannelCollection_p1 > cont( this->poolReadObject< ZdcRawChannelCollection_p1 >() );
27  trans_cont = converter_p1.createTransient( cont.get(), mlog );
28  }
29  else {
30  throw std::runtime_error("Unsupported persistent version of Data collection");
31  }
32  return trans_cont;
33 }
ZdcRawChannelCollectionCnv::createTransient
ZdcRawChannelCollection * createTransient()
Definition: ZdcRawChannelCollectionCnv.cxx:18
ZdcRawChannelCollection_p1
Definition: ZdcRawChannelCollection_p1.h:19
ZdcRawChannelCollectionCnv_p1.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
ZdcRawChannelCollectionCnv.h
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
ZdcRawChannelCollectionCnv_p1
Definition: ZdcRawChannelCollectionCnv_p1.h:25
ZdcRawChannelCollectionCnv::createPersistent
ZdcRawChannelCollection_PERS * createPersistent(ZdcRawChannelCollection *transCont)
Definition: ZdcRawChannelCollectionCnv.cxx:11
ZdcRawChannelCollection
Definition: ZdcRawChannelCollection.h:20
T_AthenaPoolCustCnv< ZdcRawChannelCollection, ZdcRawChannelCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.