ATLAS Offline Software
Loading...
Searching...
No Matches
LUCID_SimHitCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
12
13
15 MsgStream mlog(msgSvc(), "LUCID_SimHitCollectionCnv");
16 mlog << MSG::DEBUG << "In LUCID_SimHitCollectionCnv::createPersistent " << endmsg;
18 LUCID_SimHitCollection_PERS* persObj = converter.createPersistent(transCont, mlog);
19 return persObj;
20}
21
22
24 MsgStream mlog(msgSvc(), "LUCID_SimHitCollectionCnv");
25 mlog << MSG::DEBUG << "In LUCID_SimHitCollectionCnv::createTransient " << endmsg;
29 static const pool::Guid p3_guid ("018E3850-0AAE-776B-9BDE-69C14B881C19");
30 static const pool::Guid p2_guid ("149F1834-1D98-4F35-A1B3-C9AA083D6838");
31 static const pool::Guid p1_guid ("9ACC906C-74CA-4F77-AC16-2A503358C2D1");
32 static const pool::Guid old_guid("7BCDF079-FD96-4B18-B1E7-FA5EDDB026F2");
33
34 LUCID_SimHitCollection* trans_cont{};
35 if (this->compareClassGuid(p3_guid)) {
36 std::unique_ptr< LUCID_SimHitCollection_p3 > col_vect( this->poolReadObject< LUCID_SimHitCollection_p3 >());
37 trans_cont = converter_p3.createTransient(col_vect.get(), mlog);
38 }
39 else if (this->compareClassGuid(p2_guid)) {
40 std::unique_ptr< LUCID_SimHitCollection_p2 > col_vect( this->poolReadObject< LUCID_SimHitCollection_p2 >());
41 trans_cont = converter_p2.createTransient(col_vect.get(), mlog);
42 }
43 else if(this->compareClassGuid(p1_guid)) {
44 std::unique_ptr< LUCID_SimHitCollection_p1 > col_vect( this->poolReadObject< LUCID_SimHitCollection_p1 >());
45 trans_cont = converter_p1.createTransient(col_vect.get(), mlog);
46 }
47 else if(this->compareClassGuid(old_guid)) {
48 trans_cont = this->poolReadObject<LUCID_SimHitCollection>();
49 }
50 else {
51 mlog << MSG::ERROR << "BAD GUID: " << m_i_poolToken->toString() << endmsg;
52 throw std::runtime_error("Unsupported persistent version of Data container");
53 }
54 return trans_cont;
55}
#define endmsg
LUCID_SimHitCollection_p2 LUCID_SimHitCollection_PERS
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p1, LUCID_SimHitCnv_p1 > LUCID_SimHitCollectionCnv_p1
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p2, LUCID_SimHitCnv_p2 > LUCID_SimHitCollectionCnv_p2
T_AtlasHitsVectorCnv< LUCID_SimHitCollection, LUCID_SimHitCollection_p3, LUCID_SimHitCnv_p3 > LUCID_SimHitCollectionCnv_p3
AtlasHitsVector< LUCID_SimHit > LUCID_SimHitCollection
virtual LUCID_SimHitCollection_PERS * createPersistent(LUCID_SimHitCollection *transCont)
virtual LUCID_SimHitCollection * createTransient()
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)