ATLAS Offline Software
Loading...
Searching...
No Matches
RpcPadContainerCnv.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/*
6 custom POOL converter for RPC PAD
7
8 @author Tadashi Maeno
9 based on SCT_RDO_ContainerCnv by RD Schaffer
10*/
11
12#ifndef MUONEVENTATHENAPOOL_RPCPADCONTAINERCNV_H
13#define MUONEVENTATHENAPOOL_RPCPADCONTAINERCNV_H
14
21
22
25
26template < >
27inline
30{
31 MsgStream log(msgSvc(), "RpcPadContainerCnv" );
32 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " **** Entered createTransient() "<< endmsg;
33
34 // the use of auto pointers ensures that the persistent object is deleted
35 // using the correct persistent type pointer
36
37 RpcPadContainer *trans_cont = 0;
38 static const pool::Guid p2_guid("3B29433B-015F-4664-AB3F-A6B2FAA8C97F");
39 static const pool::Guid p1_guid("60A912DD-7920-4DCE-986E-6CD5644835BD");
40 static const pool::Guid p0_guid("85B897F6-E15D-4215-9DAC-EA2828BCEEC9");
41 if( compareClassGuid(p2_guid) ) {
42 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " **** createTransient - p2 " << endmsg;
43
44 std::unique_ptr< RpcPadContainer_p2 > col_vect( poolReadObject< RpcPadContainer_p2 >() );
45 trans_cont = m_TPconverter.createTransient( col_vect.get(), log );
46 } else if( compareClassGuid(p1_guid) ) {
47 if (log.level() <= MSG::DEBUG)log << MSG::DEBUG << " **** createTransient - p1 "
48 << endmsg;
49
50 std::unique_ptr< RpcPadContainer_p1 > col_vect( poolReadObject< RpcPadContainer_p1 >() );
52 trans_cont = cnv.createTransient( col_vect.get(), log );
53 } else if( compareClassGuid(p0_guid) ) {
54 if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << " **** createTransient - p0 "
55 << endmsg;
56
57 // old version from before TP separation
58 std::unique_ptr< COLL_vector > col_vect( this->poolReadObject< COLL_vector >() );
59 trans_cont = createTransientFrom_p0( col_vect.get(), log );
60 }
61 else {
62 throw std::runtime_error("Unsupported persistent version of RPC RDO container");
63 }
64 return trans_cont;
65}
66
67#endif
68
69
70
71
#define endmsg
MuonRdoContainerTPCnv< RpcPadContainer, RpcPadContainer_p2, RpcPadContainerCnv_p2 > RpcPadContainerCnv
virtual T * createTransientFrom_p0(COLL_vector *persObj, MsgStream &log)
virtual RpcPadContainer * createTransient(const RpcPadContainer_p1 *persObj, MsgStream &log) override
Use IdentifiableContainer with RpcPad.
virtual bool compareClassGuid(const Guid &clid) const