ATLAS Offline Software
Loading...
Searching...
No Matches
ElementTableCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ElementTableCnv.cxx, (c) ATLAS Detector software
8
9#include "ElementTableCnv.h"
10#include "GaudiKernel/MsgStream.h"
11
12
13//-----------------------------------------------------------------------------
14// Constructor
15//-----------------------------------------------------------------------------
16
17ElementTableCnv::ElementTableCnv( ISvcLocator *svcloc ) :
18 ElementTableCnvBase(svcloc),
19 m_msgSvc( msgSvc() )
20 {}
21
22
25 const std::string& key)
26{
27 MsgStream log (m_msgSvc, "ElementTableCnv: " + key);
28
29 // call to the converter
30 ElementTable_PERS * etPers = m_TPConverter.createPersistent(etTrans, log );
31
32 return etPers;
33
34}//end of create persistent method
35
36
39{
40 MsgStream log (m_msgSvc, "ElementTableCnv: " + key);
41
42 static const pool::Guid p1_guid( "B157B642-94C0-11E3-B1C2-02163E00A511" );
43
44 Trk::ElementTable* tCollection = nullptr;
45 if( compareClassGuid( p1_guid ) ) {
46
47 std::unique_ptr< ElementTable_PERS > p_coll( poolReadObject< ElementTable_PERS >() );
48 tCollection = m_TPConverter.createTransient( p_coll.get(), log );
49 }
50
51 return tCollection;
52
53}
T_AthenaPoolCustomCnvWithKey< Trk::ElementTable, ElementTable_PERS > ElementTableCnvBase
Trk::ElementTable_p1 ElementTable_PERS
virtual ElementTable_PERS * createPersistentWithKey(Trk::ElementTable *transCont, const std::string &key) override
method to be implemented by the developer.
ElementTableCnv_p1 m_TPConverter
IMessageSvc * m_msgSvc
MsgStream svc.
virtual Trk::ElementTable * createTransientWithKey(const std::string &key) override
method to be implemented by the developer.
ElementTableCnv(ISvcLocator *svcloc)