ATLAS Offline Software
Loading...
Searching...
No Matches
TileMuFeatureCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
11
12#include "TileMuFeatureCnv.h"
14
17
18//createPersistent
20 MsgStream mlog(msgSvc(), "TileMuFeatureConverter" );
21
22 mlog << MSG::DEBUG << "TileMuFeatureCnv::createPersistent" << endmsg;
23
24 TileMuFeatureCnv_p1 converter;
25 TileMuFeature_PERS *persObj = converter.createPersistent( transObj, mlog );
26 return persObj;
27}
28
29//createTransient
31 MsgStream mlog(msgSvc(), "TileMuFeatureConverter" );
32
33 mlog << MSG::DEBUG << "TileMuFeatureCnv::createTransient " << endmsg;
34
35 static const pool::Guid p1_guid("F853E605-AFD5-44F9-98BC-4D777CBCBEE4");
36 // from "TrigEvent/TrigMuonEventTPCnv/TrigMuonEventTPCnv/selection.xml"
37
38 static const pool::Guid p0_guid("526B0709-442D-4D2C-8C1F-8C3922149656");
39 // from "TrigEvent/TrigMuonEvent/TrigMuonEvent/selection.xml"
40
41 if( compareClassGuid(p1_guid) ) {
42 std::unique_ptr< TileMuFeature_p1 > col_vect( poolReadObject< TileMuFeature_p1 >() );
43 TileMuFeatureCnv_p1 converter;
44 return converter.createTransient( col_vect.get(), mlog );
45
46 }
47 else if( compareClassGuid(p0_guid) ) {
48 // old version from before TP separation, just return it
49 return this->poolReadObject<TileMuFeature>();
50 }
51 else {
52 throw std::runtime_error("Unsupported persistent version");
53 }
54
55}
56
#define endmsg
TileMuFeature_p1 TileMuFeature_PERS
T_AthenaPoolCustomCnv< TileMuFeature, TileMuFeature_PERS > TileMuFeatureCnvBase
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 bool compareClassGuid(const Guid &clid) const
virtual TileMuFeature_PERS * createPersistent(TileMuFeature *transObj)
virtual TileMuFeature * createTransient()
TileMuFeatureCnv(ISvcLocator *svcloc)