ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMissingETCnv.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 "TrigMissingETCnv.h"
10
13
14
15
17 MsgStream mlog(msgSvc(), "TrigMissingETConverter" );
18
19 mlog << MSG::DEBUG << "TrigMissingETCnv::createPersistent" << endmsg;
20
21// TrigMissingETCnv_p1 converter;
22 TrigMissingETCnv_p2 converter;
23
24 TrigMissingET_PERS *persObj = converter.createPersistent( transObj, mlog );
25
26 return persObj;
27}
28
29
31 MsgStream mlog(msgSvc(), "TrigMissingETConverter" );
32
33 mlog << MSG::DEBUG << "TrigMissingETCnv::createTransient " << endmsg;
34
35 static const pool::Guid p2_guid("9972F10B-2B6A-42A7-AF71-D8FB60F07C6D");
36 static const pool::Guid p1_guid("A65F0499-A789-4D66-9930-E8651FE91F8A");
37 static const pool::Guid p0_guid("1403772C-7444-4340-930B-ABD51C243A09");
38
39 if( compareClassGuid(p2_guid) ) {
40
41 std::unique_ptr< TrigMissingET_p2 > col_vect( poolReadObject< TrigMissingET_p2 >() );
42 TrigMissingETCnv_p2 converter;
43 return converter.createTransient( col_vect.get(), mlog );
44
45 }
46 else if( compareClassGuid(p1_guid) ) {
47
48 std::unique_ptr< TrigMissingET_p1 > col_vect( poolReadObject< TrigMissingET_p1 >() );
49 TrigMissingETCnv_p1 converter;
50 return converter.createTransient( col_vect.get(), mlog );
51
52 }
53 else if( compareClassGuid(p0_guid) ) {
54 // old version from before TP separation, just return it
55 return this->poolReadObject<TrigMissingET>();
56 }
57 else {
58 throw std::runtime_error("Unsupported persistent version");
59 }
60
61}
#define endmsg
T_AthenaPoolCustomCnv< TrigMissingET, TrigMissingET_PERS > TrigMissingETCnvBase
TrigMissingET_p2 TrigMissingET_PERS
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
TrigMissingETCnv(ISvcLocator *svcloc)
virtual TrigMissingET_PERS * createPersistent(TrigMissingET *transObj)
virtual TrigMissingET * createTransient()