ATLAS Offline Software
Loading...
Searching...
No Matches
TgcRdoContainerCnv.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONEVENTATHENAPOOL_TGCRDOCONTAINERCNV_H
6#define MUONEVENTATHENAPOOL_TGCRDOCONTAINERCNV_H
7
8/*
9 custom POOL TP converter for TGC RDO
10 @author Marcin Nowak
11 CERN, February 2006
12*/
13
14
25
26
29
30
31template < >
32inline
35{
36 MsgStream log(msgSvc(), "TgcRdoContainerCnv" );
37 log << MSG::DEBUG << " **** Entered createTransient() "
38 << endmsg;
39
40 // the use of auto pointers ensures that the persistent object is deleted
41 // using the correct persistent type pointer
42
43 TgcRdoContainer *trans_cont = 0;
44 static const pool::Guid p4_guid("176667F0-DEC8-42A4-94AF-B4750829671A");
45 static const pool::Guid p3_guid("E7D45D90-CB92-4A7D-B5FE-2791CE34FFEE");
46 static const pool::Guid p2_guid("3DA250DA-321C-4DD3-996A-BB0E67A6034D");
47 static const pool::Guid p1_guid("BF9D17EA-AC87-4243-9126-8FC86DDCDAA3");
48 static const pool::Guid p0_guid("FBF8D72D-A6B9-4689-8E02-BB0F435BF2F7");
49
50 if( compareClassGuid(p4_guid) ) {
51 std::unique_ptr< TgcRdoContainer_p4 > col_vect( this->poolReadObject<TgcRdoContainer_p4>() );
52 trans_cont = m_TPconverter.createTransient( col_vect.get(), log );
53 }
54 else if( compareClassGuid(p3_guid) ) {
55 std::unique_ptr< TgcRdoContainer_p3 > col_vect( this->poolReadObject<TgcRdoContainer_p3>() );
57 trans_cont = cnv.createTransient( col_vect.get(), log );
58 }
59 else if( compareClassGuid(p2_guid) ) {
60 std::unique_ptr< TgcRdoContainer_p2 > col_vect( this->poolReadObject<TgcRdoContainer_p2>() );
62 trans_cont = cnv.createTransient( col_vect.get(), log );
63 }
64 else if( compareClassGuid(p1_guid) ) {
65 std::unique_ptr< TgcRdoContainer_p1 > col_vect( this->poolReadObject<TgcRdoContainer_p1>() );
67 trans_cont = cnv.createTransient( col_vect.get(), log );
68 }
69 else if(compareClassGuid(p0_guid) ) {
70 // old version from before TP separation
71 std::unique_ptr< COLL_vector > col_vect( this->poolReadObject< COLL_vector >() );
72 trans_cont = createTransientFrom_p0( col_vect.get(), log );
73 }
74 else {
75 throw std::runtime_error("Unsupported persistent version of TGC RDO container");
76 }
77 return trans_cont;
78}
79
80
81#endif
82
83
#define endmsg
MuonRdoContainerTPCnv< TgcRdoContainer, TgcRdoContainer_p4, TgcRdoContainerCnv_p4 > TgcRdoContainerCnv
T_AthenaPoolTPCnvIDCont< TgcRdoContainer, TgcRdoContainer_p1, TgcRdoCnv_p1 > TgcRdoContainerCnv_p1
T_AthenaPoolTPCnvIDCont< TgcRdoContainer, TgcRdoContainer_p2, TgcRdoCnv_p2 > TgcRdoContainerCnv_p2
T_AthenaPoolTPCnvIDCont< TgcRdoContainer, TgcRdoContainer_p3, TgcRdoCnv_p3 > TgcRdoContainerCnv_p3
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
virtual bool compareClassGuid(const Guid &clid) const