ATLAS Offline Software
TrigVertexCollectionCnv.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
11 
14  m_msgSvc( msgSvc() ),
15  m_log( m_msgSvc, "TrigVertexCollectionCnv" ),
16  m_TPConverter (new TrigVertexCollectionCnv_tlp2)
17 {}
18 
20 {
21  delete m_TPConverter;
22 }
23 
24 //createPersistent
26 {
27  MsgStream mlog(msgSvc(), "TrigVertexCollectionConverter" );
28 
29  mlog << MSG::DEBUG << "TrigVertexCollectionCnv::createPersistent called" << endmsg;
30 
32 
33  return p_VtxColl;
34 
35 }//end of create persistent method
36 
37 
38 //createTransient
40 {
41  MsgStream mlog(msgSvc(), "TrigVertexCollectionConverter" );
42 
43  mlog << MSG::DEBUG << "TrigVertexCollectionCnv::createTransient called" << endmsg;
44 
45  static const pool::Guid tlp2_guid( "438C9232-0F3E-4A8B-A16E-6F6275388DE4" );
46  static const pool::Guid tlp1_guid( "10E18C4E-9BCA-4F25-993C-EBDF0642C119" );
47  static const pool::Guid p0_guid( "0974DF97-5B51-4416-8FBE-42BAE0C54010" );
48  static const pool::Guid p0_guid2( "E2C600D6-CD4B-4B7B-9C09-93CE9FF435A1" );
49 
50  TrigVertexCollection *p_collection = 0;
51  if( compareClassGuid( tlp2_guid ) )
52  {
53  mlog << MSG::DEBUG << "TrigVertexCollectionCnv::createPersistent tlp2 called" << endmsg;
54  poolReadObject< TrigVertexCollection_PERS >(*m_TPConverter);
55  p_collection = m_TPConverter->createTransient( m_log );
56 
57  } else if( compareClassGuid( tlp1_guid ) ) {
58 
59  mlog << MSG::DEBUG << "TrigVertexCollectionCnv::createPersistent tlp1 called" << endmsg;
60  TrigVertexCollectionCnv_tlp1 tlp1_Converter;
61  poolReadObject< TrigVertexCollection_tlp1 >(tlp1_Converter);
62  p_collection = tlp1_Converter.createTransient( m_log );
63 
64  } else if( compareClassGuid( p0_guid ) || compareClassGuid( p0_guid2 ) ){
65  mlog << MSG::DEBUG << "TrigVertexCollectionCnv::createPersistent p0 called" << endmsg;
66  p_collection = poolReadObject< TrigVertexCollection >();
67 
68  }else throw std::runtime_error( "Unsupported persistent version of TrigVertexCollection" );
69 
70  return p_collection;
71 
72 }//end of create transient method
73 
TrigVertexCollection_tlp2
Definition: TrigVertexCollection_tlp2.h:23
TrigVertexCollectionCnv.h
TrigVertexCollectionCnv_tlp1.h
TrigVertexCollectionCnv_tlp1
Definition: TrigVertexCollectionCnv_tlp1.h:31
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
TrigVertexCollectionCnv_tlp2.h
TrigVertexCollectionCnv::createPersistent
virtual TrigVertexCollection_PERS * createPersistent(TrigVertexCollection *transObj)
Definition: TrigVertexCollectionCnv.cxx:25
TrigVertexCollection_tlp1.h
pool::Guid
::Guid Guid
Definition: T_AthenaPoolCustCnv.h:19
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
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition: T_AthenaPoolCustomCnv.h:132
TrigVertexCollectionCnv::TrigVertexCollectionCnv
TrigVertexCollectionCnv(ISvcLocator *svcloc)
Definition: TrigVertexCollectionCnv.cxx:12
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TrigVertexCollection_tlp2.h
TrigVertexCollectionCnv::m_TPConverter
TrigVertexCollectionCnv_tlp2 * m_TPConverter
Definition: TrigVertexCollectionCnv.h:60
TrigVertexCollectionCnv::m_log
MsgStream m_log
Definition: TrigVertexCollectionCnv.h:58
TrigVertexCollection
Definition: TrigVertexCollection.h:13
TrigVertexCollectionCnv::createTransient
virtual TrigVertexCollection * createTransient()
Definition: TrigVertexCollectionCnv.cxx:39
DEBUG
#define DEBUG
Definition: page_access.h:11
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.
TrigVertexCollectionCnv::~TrigVertexCollectionCnv
~TrigVertexCollectionCnv()
Definition: TrigVertexCollectionCnv.cxx:19
TrigVertexCollectionCnv_tlp2
Definition: TrigVertexCollectionCnv_tlp2.h:26