ATLAS Offline Software
Loading...
Searching...
No Matches
TrigTrackCountsCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
10
13
14
16 MsgStream mlog(msgSvc(), "TrigTrackCountsConverter" );
17
18 mlog << MSG::DEBUG << "TrigTrackCountsCnv::createPersistent" << endmsg;
19
20 TrigTrackCountsCnv_p2 converter;
21
22 TrigTrackCounts_PERS *persObj = converter.createPersistent( transObj, mlog );
23
24 return persObj;
25}
26
27
29 MsgStream mlog(msgSvc(), "TrigTrackCountsConverter" );
30
31 mlog << MSG::DEBUG << "TrigTrackCountsCnv::createTransient " << endmsg;
32
33 static const pool::Guid p2_guid("BD8BB599-AE38-45CC-93DB-27F67C23DB62");
34 static const pool::Guid p1_guid("2DCA396C-5CC1-4B6A-8B76-E3EBA4F81A61");
35 static const pool::Guid p0_guid("6277C97C-0EAA-4922-892E-E88C1FA01BA0");
36
37 if(compareClassGuid(p2_guid)) {
38 std::unique_ptr< TrigTrackCounts_p2 > pers_ptr( poolReadObject< TrigTrackCounts_p2 >() );
39 TrigTrackCountsCnv_p2 converter;
40 return converter.createTransient( pers_ptr.get(), mlog );
41 }
42 else if(compareClassGuid(p1_guid)) {
43 std::unique_ptr< TrigTrackCounts_p1 > pers_ptr( poolReadObject< TrigTrackCounts_p1 >() );
44 TrigTrackCountsCnv_p1 converter;
45 return converter.createTransient( pers_ptr.get(), mlog );
46 }
47 else if(compareClassGuid(p0_guid)) {
48 // old version from before TP separation, just return it
50 }
51 else {
52 throw std::runtime_error("Unsupported persistent version");
53 }
54
55}
#define endmsg
TrigTrackCounts_p2 TrigTrackCounts_PERS
T_AthenaPoolCustomCnv< TrigTrackCounts, TrigTrackCounts_PERS > TrigTrackCountsCnvBase
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 TrigTrackCounts_PERS * createPersistent(TrigTrackCounts *transObj)
virtual TrigTrackCounts * createTransient()
TrigTrackCountsCnv(ISvcLocator *svcloc)