ATLAS Offline Software
Loading...
Searching...
No Matches
LUCID_DigitContainerCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
9 MsgStream mlog(msgSvc(), "LUCID_DigitContainerCnv");
10
11 mlog << MSG::DEBUG << "In LUCID_DigitContainerCnv::createPersistent " << endmsg;
12
14 LUCID_DigitContainer_PERS* persObj = converter.createPersistent(transCont, mlog);
15
16 return persObj;
17}
18
20
21 MsgStream mlog(msgSvc(), "LUCID_DigitContainer");
22
23 mlog << MSG::DEBUG << "In LUCID_DigitContainerCnv::createTransient " << endmsg;
24
25 LUCID_DigitContainerCnv_p2 converter_p2;
26
27 LUCID_DigitContainer* trans_cont(nullptr);
28
29 static const pool::Guid p2_guid ("08BBB3C5-BCAE-4540-8F3A-76D873045585");
30 static const pool::Guid p1_guid ("681CDB46-D6D0-4C59-98C9-398B43873B50");
31 static const pool::Guid old_guid("49672224-A5AB-4D4C-802E-CA0749038ECC");
32
33 if (this->compareClassGuid(p2_guid)) {
34
35 std::unique_ptr< LUCID_DigitContainer_p2 > col_vect( this->poolReadObject< LUCID_DigitContainer_p2 >());
36
37 trans_cont = converter_p2.createTransient(col_vect.get(), mlog);
38 }
39 else if(this->compareClassGuid(p1_guid)) {
40
41 trans_cont = this->poolReadObject<LUCID_DigitContainer>();
42 }
43 else if(this->compareClassGuid(old_guid)) {
44
45 trans_cont = this->poolReadObject<LUCID_DigitContainer>();
46 }
47 else throw std::runtime_error("Unsupported persistent version of Data container");
48
49 return trans_cont;
50}
51
52
53
#define endmsg
LUCID_DigitContainer_p2 LUCID_DigitContainer_PERS
virtual LUCID_DigitContainer * createTransient()
virtual LUCID_DigitContainer_PERS * createPersistent(LUCID_DigitContainer *transCont)
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.