ATLAS Offline Software
Loading...
Searching...
No Matches
CMMCPHitsCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
10
12
13//createPersistent
15{
16
17 MsgStream mlog(msgSvc(), "CMMCPHitsCollectionConverter" );
18
19 //mlog << MSG::DEBUG << "CMMCPHitsCollectionCnv::createPersistent called" << endmsg;
20
21 CMMCPHitsCollection_PERS * p_TTColl = m_TPConverter_tlp1.createPersistent( transObj, mlog );
22
23 return p_TTColl;
24
25}//end of create persistent method
26
27
28//createTransient
30{
31 MsgStream mlog(msgSvc(), "CMMCPHitsCollectionConverter" );
32
33 //mlog << MSG::DEBUG << "CMMCPHitsCollectionCnv::createTransient called" << endmsg;
34
35 static const pool::Guid tlp1_guid( "8C6E0191-FAE9-4C2E-BD0A-E6A5518145E2" );
36
37 CMMCPHitsCollection *p_collection = 0;
38 if( compareClassGuid( tlp1_guid ) )
39 {
40 // using unique_ptr ensures deletion of the persistent object
41 std::unique_ptr< CMMCPHitsCollection_PERS > pers_ref( poolReadObject< CMMCPHitsCollection_PERS >() );
42 p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
43
44 }else throw std::runtime_error( "Unsupported persistent version of CMMCPHitsCollection" );
45
46 return p_collection;
47
48}//end of create transient method
49
Generated header file which defines a typedef for templated converter class.
CMMCPHitsCollection_tlp1 CMMCPHitsCollection_PERS
DataVector< LVL1::CMMCPHits > CMMCPHitsCollection
Container class for CMMCPHits objects.
virtual CMMCPHitsCollection * createTransient()
virtual CMMCPHitsCollection_PERS * createPersistent(CMMCPHitsCollection *transCont)
CMMCPHitsCollectionCnv_tlp1 m_TPConverter_tlp1