ATLAS Offline Software
Loading...
Searching...
No Matches
LArTTL1ContainerCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// LArTPCnv includes
7
8// LArEventAthenaPool includes
10
13{
15 LArTTL1Container_PERS *persObj = cnv.createPersistent( transCont, msg() );
16
17 return persObj;
18}
19
21
22 LArTTL1Container *transObj = 0;
23
24 static const pool::Guid tr_guid("38FAECC7-D0C5-4DD8-8FAE-8D35F0542ECD");
25 static const pool::Guid p1_guid("B859A463-2EA4-4902-B46A-89E5FBC20132");
26
27 if ( compareClassGuid(tr_guid) ) {
28
29 // regular object from before the T/P separation
31
32 } else if ( compareClassGuid(p1_guid) ) {
33
34 // using unique_ptr ensures deletion of the persistent object
35 std::unique_ptr<LArTTL1Container_p1> persObj( poolReadObject<LArTTL1Container_p1>() );
37 transObj = cnv.createTransient( persObj.get(), msg() );
38 } else {
39 throw std::runtime_error("Unsupported persistent version of LArTTL1Container");
40 }
41
42 return transObj;
43}
LArTTL1Container_p1 LArTTL1Container_PERS
T_AthenaPoolTPCnvVector< LArTTL1Container, LArTTL1Container_p1, LArTTL1Cnv_p1 > LArTTL1ContainerCnv_p1
virtual LArTTL1Container_PERS * createPersistent(LArTTL1Container *transCont)
Build the persistent representation from the transient one.
virtual LArTTL1Container * createTransient()
Build the transient representation from a persistent one.
Container class for LArTTL1.
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.