ATLAS Offline Software
Loading...
Searching...
No Matches
TileL2ContainerCnv.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5*/
6
7// TileL2ContainerCnv.cxx
8// Implementation file for class TileL2ContainerCnv
9// Author: Aranzazu Ruiz <aranzazu.ruiz.martinez@cern.ch>
10// Date: July 2008
12
13// Framework includes
14#include "GaudiKernel/MsgStream.h"
15
16// TileTPCnv includes
19
20// TileEventAthenaPool includes
21#include "TileL2ContainerCnv.h"
22
25{
26 MsgStream msg( msgSvc(), "TileL2ContainerCnv" );
27
29 TileL2Container_PERS *persObj = cnv.createPersistent( transCont, msg );
30
31 if (msg.level()<=MSG::DEBUG)
32 msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
33 return persObj;
34}
35
37
38 MsgStream msg( msgSvc(), "TileL2ContainerCnv" );
39
40 TileL2Container *transObj = 0;
41
42 static const pool::Guid tr_guid("E9BB4497-FF43-4D70-8A64-B509081DAD88");
43 static const pool::Guid p1_guid("FE877FF9-475D-42D9-8DC3-CABD220BFD27");
44 static const pool::Guid p2_guid("3283BF32-0B18-408F-9B46-6A1B26B37D5C");
45
46 if ( compareClassGuid(tr_guid) ) {
47
48 // regular object from before the T/P separation
50
51 } else if ( compareClassGuid(p1_guid) ) {
52
53 // using unique_ptr ensures deletion of the persistent object
54 std::unique_ptr<TileL2Container_p1> persObj( poolReadObject<TileL2Container_p1>() );
56 transObj = cnv.createTransient( persObj.get(), msg );
57 } else if ( compareClassGuid(p2_guid) ) {
58
59 // using unique_ptr ensures deletion of the persistent object
60 std::unique_ptr<TileL2Container_p2> persObj( poolReadObject<TileL2Container_p2>() );
62 transObj = cnv.createTransient( persObj.get(), msg );
63 } else {
64 throw std::runtime_error("Unsupported persistent version of TileL2Container");
65 }
66
67 return transObj;
68}
#define endmsg
TileContainer< TileL2 > TileL2Container
TileL2Container_p2 TileL2Container_PERS
T_AthenaPoolTPCnvVector< TileL2Container, TileL2Container_p1, TileL2Cnv_p1 > TileL2ContainerCnv_p1
T_AthenaPoolTPCnvVector< TileL2Container, TileL2Container_p2, TileL2Cnv_p2 > TileL2ContainerCnv_p2
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
virtual TileL2Container * createTransient()
Build the transient representation from a persistent one.
virtual TileL2Container_PERS * createPersistent(TileL2Container *transCont)
Build the persistent representation from the transient one.