ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
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
28 INav4MomLinkContainer_PERS *persObj = m_TPConverter.createPersistent( transCont, log );
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
#define endmsg
This file contains the class definition for the ElementLinkCnv_p3 class.
INav4MomLinkContainer_p1 INav4MomLinkContainer_PERS
INav4MomLinkContainerCnv.h.
virtual INav4MomLinkContainer_PERS * createPersistent(INav4MomLinkContainer *transCont)
Member method to create the persistent version.
virtual INav4MomLinkContainer * createTransient()
Member method to create the transient version.
INav4MomLinkContainerCnv_p1 m_TPConverter
Create the t/p converter.