ATLAS Offline Software
JetElementCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 
13 //createPersistent
15 {
16 
17  MsgStream mlog(msgSvc(), "JetElementCollectionConverter" );
18 
19  //mlog << MSG::DEBUG << "JetElementCollectionCnv::createPersistent called" << endmsg;
20 
22 
23  return p_TTColl;
24 
25 }//end of create persistent method
26 
27 
28 //createTransient
30 {
31  MsgStream mlog(msgSvc(), "JetElementCollectionConverter" );
32 
33  //mlog << MSG::DEBUG << "JetElementCollectionCnv::createTransient called" << endmsg;
34 
35  static const pool::Guid tlp1_guid( "132ABB53-1F89-4E0E-83A3-382338B278F3" );
36  static const pool::Guid p0_guid( "48B92167-4892-4694-9E9E-E201F1E1FFFE" );
37 
38  JetElementCollection *p_collection = 0;
39  if( compareClassGuid( tlp1_guid ) )
40  {
41  // using unique_ptr ensures deletion of the persistent object
42  std::unique_ptr< JetElementCollection_PERS > pers_ref( poolReadObject< JetElementCollection_PERS >() );
43  p_collection = m_TPConverter_tlp1.createTransient( pers_ref.get(), mlog );
44 
45  }else if( compareClassGuid( p0_guid ) ){
46 
47  p_collection = poolReadObject< JetElementCollection >();
48 
49  }else throw std::runtime_error( "Unsupported persistent version of JetElementCollection" );
50 
51  return p_collection;
52 
53 }//end of create transient method
54 
JetElementCollectionCnv::m_TPConverter_tlp1
JetElementCollectionCnv_tlp1 m_TPConverter_tlp1
Definition: JetElementCollectionCnv.h:45
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
JetElementCollectionCnv::createTransient
virtual JetElementCollection * createTransient()
Definition: JetElementCollectionCnv.cxx:29
TopLevelTPConverter::createTransient
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
Definition: TopLevelTPConverter.h:62
python.InDetPriVxFinderConfig.mlog
mlog
Definition: InDetPriVxFinderConfig.py:134
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
JetElementCollectionCnv.h
Generated header file which defines a typedef for templated converter class.
JetElementCollectionCnv::createPersistent
virtual JetElementCollection_PERS * createPersistent(JetElementCollection *transCont)
Definition: JetElementCollectionCnv.cxx:14
DataVector< LVL1::JetElement >
TopLevelTPConverter::createPersistent
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
Definition: TopLevelTPConverter.h:110
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
JetElementCollection_tlp1
Definition: JetElementCollection_tlp1.h:11