ATLAS Offline Software
INav4MomLinkContainerCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 
17 // This classes header
19 
20 
21 // Create the persistent object from the transient one
23 {
24  // Create the message service for this class
25  MsgStream log( msgSvc(), "INav4MomLinkContainerConverter" );
26 
27  // Do the actual creation of the persistent object
29 
30  // Write a debug message out
31  log << MSG::DEBUG << "Success" << endmsg;
32 
33  return persObj;
34 }
35 
36 
37 // Create the transient object from the persistent one
39 {
40  // Create the message service for this class
41  MsgStream log( msgSvc(), "INav4MomLinkContainerConverter" );
42 
43  // Define the pool IDs
44  static const pool::Guid p1_guid("A7F0A4C5-F343-4724-B317-FB5A890355FA");
45 
46  if( compareClassGuid(p1_guid) )
47  {
48  // using unique_ptr ensures deletion of the persistent object
49  std::unique_ptr< INav4MomLinkContainer_PERS > col_vect( poolReadObject< INav4MomLinkContainer_PERS >() );
50  return m_TPConverter.createTransient( col_vect.get(), log );
51  }
52  else
53  {
54  throw std::runtime_error("Unsupported persistent version of Data Collection");
55  }
56 }
57 
INav4MomLinkContainerCnv.h
ElementLinkCnv_p3.h
This file contains the class definition for the ElementLinkCnv_p3 class.
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
INav4MomLinkContainerCnv::m_TPConverter
INav4MomLinkContainerCnv_p1 m_TPConverter
Create the t/p converter.
Definition: INav4MomLinkContainerCnv.h:57
INav4MomLinkContainerCnv::createTransient
virtual INav4MomLinkContainer * createTransient()
Member method to create the transient version.
Definition: INav4MomLinkContainerCnv.cxx:38
VectorElementLinkCnv_p1.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
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
T_AthenaPoolCustCnv< INav4MomLinkContainer, INav4MomLinkContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
INav4MomLinkContainerCnv::createPersistent
virtual INav4MomLinkContainer_PERS * createPersistent(INav4MomLinkContainer *transCont)
Member method to create the persistent version.
Definition: INav4MomLinkContainerCnv.cxx:22