ATLAS Offline Software
Loading...
Searching...
No Matches
InDetSimDataCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
10
11
13 MsgStream mlog(msgSvc(), "InDetSimDataCollectionCnv" );
15 InDetSimDataCollection_PERS *persObj = converter.createPersistent( transCont, mlog );
16 return persObj;
17}
18
19
21 MsgStream mlog(msgSvc(), "InDetSimDataCollection" );
26
27 InDetSimDataCollection *trans_cont(nullptr);
28 static const pool::Guid p4_guid("018E50BB-B807-75F9-828A-890C9AD1F7CB");
29 static const pool::Guid p3_guid("1430AA7B-EE92-5A41-92F3-5DD5367D6BAA");
30 static const pool::Guid p2_guid("C648CA66-013D-44AC-B0D9-99BFB0060E84");
31 static const pool::Guid p1_guid("333EF996-1672-4AB8-917D-187F908F1EDE");
32 static const pool::Guid old_guid("5A50C32E-C036-4A49-AE97-716D53210BE1");
33
34 if( this->compareClassGuid(p4_guid)) {
35 std::unique_ptr< InDetSimDataCollection_p4 > col_vect( this->poolReadObject< InDetSimDataCollection_p4 >() );
36 trans_cont = converter_p4.createTransient( col_vect.get(), mlog );
37 }
38 else if( this->compareClassGuid(p3_guid)) {
39 std::unique_ptr< InDetSimDataCollection_p3 > col_vect( this->poolReadObject< InDetSimDataCollection_p3 >() );
40 trans_cont = converter_p3.createTransient( col_vect.get(), mlog );
41 }
42 else if( this->compareClassGuid(p2_guid)) {
43 std::unique_ptr< InDetSimDataCollection_p2 > col_vect( this->poolReadObject< InDetSimDataCollection_p2 >() );
44 trans_cont = converter_p2.createTransient( col_vect.get(), mlog );
45 }
46 else if( this->compareClassGuid(p1_guid)) {
47 std::unique_ptr< InDetSimDataCollection_p1 > col_vect( this->poolReadObject< InDetSimDataCollection_p1 >() );
48 trans_cont = converter_p1.createTransient( col_vect.get(), mlog );
49 }
50 else if( this->compareClassGuid(old_guid)) {
51 // old version from before TP separation, just return it
52 trans_cont = this->poolReadObject<InDetSimDataCollection>();
53 } else {
54 throw std::runtime_error("Unsupported persistent version of Data container");
55 }
56 return trans_cont;
57}
InDetSimDataCollectionCnv_p3 InDetSimDataCollectionCnv_PERS
InDetSimDataCollection_p3 InDetSimDataCollection_PERS
virtual InDetSimDataCollection * createTransient()
virtual InDetSimDataCollection_PERS * createPersistent(InDetSimDataCollection *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.