ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuonReceiverContainerCnv.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// TileMuonReceveirContainerCnv.cxx
8// Implementation file for class TileMuonReceiverContainerCnv
9// Author: Joao Gentil Saraiva <joao.gentil.saraiva@cern.ch>
10// Date: March 2014
12
13// Framework includes
14#include "GaudiKernel/MsgStream.h"
15
16// TileTPCnv includes
18
19// TileEventAthenaPool includes
21
24{
25 MsgStream msg( msgSvc(), "TileMuonReceiverContainerCnv" );
26
28 TileMuonReceiverContainer_PERS *persObj = cnv.createPersistent( transCont, msg );
29
30 if (msg.level()<=MSG::DEBUG)
31 msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
32 return persObj;
33}
34
36
37 MsgStream msg( msgSvc(), "TileMuonReceiverContainerCnv" );
38
39 TileMuonReceiverContainer *transObj = 0;
40
41 static const pool::Guid tr_guid("A01F819F-4F0B-4713-A275-7DA5F47F77E5");
42 static const pool::Guid p1_guid("7F0DA5A3-7773-4852-AE55-A9920FEB31AB");
43
44 if ( compareClassGuid(tr_guid) ) {
45
46 // regular object from before the T/P separation
48
49 } else if ( compareClassGuid(p1_guid) ) {
50 // using unique_ptr ensures deletion of the persistent object
51 std::unique_ptr<TileMuonReceiverContainer_p1> persObj( poolReadObject<TileMuonReceiverContainer_p1>() );
53 transObj = cnv.createTransient( persObj.get(), msg );
54 } else {
55 throw std::runtime_error("Unsupported persistent version of TileMuonReceiverContainer");
56 }
57
58 return transObj;
59}
#define endmsg
TileContainer< TileMuonReceiverObj > TileMuonReceiverContainer
TileMuonReceiverContainer_p1 TileMuonReceiverContainer_PERS
T_AthenaPoolTPCnvVector< TileMuonReceiverContainer, TileMuonReceiverContainer_p1, TileMuonReceiverObjCnv_p1 > TileMuonReceiverContainerCnv_p1
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 TileMuonReceiverContainer * createTransient()
Build the transient representation from a persistent one.
virtual TileMuonReceiverContainer_PERS * createPersistent(TileMuonReceiverContainer *transCont)
Build the persistent representation from the transient one.