ATLAS Offline Software
Loading...
Searching...
No Matches
TrigT2MbtsBitsCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "TrigT2MbtsBitsCnv.h"
10
13
15 MsgStream mlog(msgSvc(), "TrigT2MbtsBitsConverter" );
16 mlog << MSG::DEBUG << "TrigT2MbtsBitsCnv::createPersistent" << endmsg;
17
18 TrigT2MbtsBitsCnv_p2 converter;
19 TrigT2MbtsBits_PERS *persObj = converter.createPersistent( transObj, mlog );
20
21 return persObj;
22}
23
25 MsgStream mlog(msgSvc(), "TrigT2MbtsBitsConverter" );
26 mlog << MSG::DEBUG << "TrigT2MbtsBitsCnv::createTransient " << endmsg;
27
28 static const pool::Guid p2_guid("6D130C0D-20A2-4304-8E70-6775892217A6");
29 static const pool::Guid p1_guid("32E86328-15EB-42F5-A93F-6F891220A626");
30
31
32 TrigT2MbtsBits *transObj = 0;
33
34 if( compareClassGuid(p2_guid) ) {
35 mlog << MSG::DEBUG << "TrigT2MbtsBitsCnv::reading p2 persistent object" << endmsg;
36 std::unique_ptr< TrigT2MbtsBits_p2 > pers_ptr( poolReadObject< TrigT2MbtsBits_p2 >() );
37 TrigT2MbtsBitsCnv_p2 converter;
38 transObj = converter.createTransient(pers_ptr.get(), mlog);
39 }
40 else if( compareClassGuid(p1_guid) ) {
41 mlog << MSG::DEBUG << "TrigT2MbtsBitsCnv::reading p1 persistent object" << endmsg;
42 std::unique_ptr< TrigT2MbtsBits_p1 > pers_ptr( poolReadObject< TrigT2MbtsBits_p1 >() );
43 TrigT2MbtsBitsCnv_p1 converter;
44 transObj = converter.createTransient(pers_ptr.get(), mlog);
45 }
46 else {
47 throw std::runtime_error("Unsupported persistent version of Data container");
48 }
49
50 return transObj;
51}
#define endmsg
TrigT2MbtsBits_p2 TrigT2MbtsBits_PERS
T_AthenaPoolCustomCnv< TrigT2MbtsBits, TrigT2MbtsBits_PERS > TrigT2MbtsBitsCnvBase
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
TrigT2MbtsBits * createTransient()
TrigT2MbtsBitsCnv(ISvcLocator *svcloc)
TrigT2MbtsBits_PERS * createPersistent(TrigT2MbtsBits *transObj)