ATLAS Offline Software
Loading...
Searching...
No Matches
TileCosmicMuonContainerCnv.cxx
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7// TileCosmicMuonContainerCnv.cxx
8// Implementation file for class TileCosmicMuonContainerCnv
9// Author: Aranzazu Ruiz <aranzazu.ruiz.martinez@cern.ch>
10// Date: July 2008
11// Revised: July 2009 maneira@lip.pt
13
14// Framework includes
15#include "GaudiKernel/MsgStream.h"
16
17// TileTPCnv includes
20
21// TileEventAthenaPool includes
23
26{
27 MsgStream msg( msgSvc(), "TileCosmicMuonContainerCnv" );
28
30 TileCosmicMuonContainer_PERS *persObj = cnv.createPersistent( transCont, msg );
31
32 if (msg.level()<=MSG::DEBUG)
33 msg << MSG::DEBUG << "::createPersistent [Success]" << endmsg;
34 return persObj;
35}
36
38
39 MsgStream msg( msgSvc(), "TileCosmicMuonContainerCnv" );
40
41 TileCosmicMuonContainer *transObj = 0;
42
43 static const pool::Guid tr_guid("81711CFC-C75C-49F4-BA12-31D6FAA2D903");
44 static const pool::Guid p1_guid("716F406D-8F59-4879-AA07-C28BA374E6EF");
45 static const pool::Guid p2_guid("8957FF04-12E8-43BA-A0C8-D7D9638E242E");
46
47 if ( compareClassGuid(tr_guid) ) {
48
49 // regular object from before the T/P separation
51
52 } else if ( compareClassGuid(p1_guid) ) {
53
54 // using unique_ptr ensures deletion of the persistent object
55 std::unique_ptr<TileCosmicMuonContainer_p1> persObj( poolReadObject<TileCosmicMuonContainer_p1>() );
57 transObj = cnv.createTransient( persObj.get(), msg );
58 } else if ( compareClassGuid(p2_guid) ) {
59
60 // using unique_ptr ensures deletion of the persistent object
61 std::unique_ptr<TileCosmicMuonContainer_p2> persObj( poolReadObject<TileCosmicMuonContainer_p2>() );
63 transObj = cnv.createTransient( persObj.get(), msg );
64 } else {
65 throw std::runtime_error("Unsupported persistent version of TileCosmicMuonContainer");
66 }
67
68 return transObj;
69}
#define endmsg
TileContainer< TileCosmicMuon > TileCosmicMuonContainer
TileCosmicMuonContainer_p2 TileCosmicMuonContainer_PERS
T_AthenaPoolTPCnvVector< TileCosmicMuonContainer, TileCosmicMuonContainer_p1, TileCosmicMuonCnv_p1 > TileCosmicMuonContainerCnv_p1
T_AthenaPoolTPCnvVector< TileCosmicMuonContainer, TileCosmicMuonContainer_p2, TileCosmicMuonCnv_p2 > TileCosmicMuonContainerCnv_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 TileCosmicMuonContainer_PERS * createPersistent(TileCosmicMuonContainer *transCont)
Build the persistent representation from the transient one.
virtual TileCosmicMuonContainer * createTransient()
Build the transient representation from a persistent one.