ATLAS Offline Software
Loading...
Searching...
No Matches
EventBookkeeperCollectionCnv.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6// File for class EventBookkeeperCollectionCnv
7// Author: David Cote, September 2008. <david.cote@cern.ch>
9
12
13
15 MsgStream log(msgSvc(), "EventBookkeeperCollectionConverter" );
16 EventBookkeeperCollection_PERS * persObj = m_TPConverter.createPersistent( transCont, log );
17 return persObj;
18}
19
21 MsgStream log(msgSvc(), "EventBookkeeperCollectionConverter" );
22 //p1_guid matches the number in EventBookkeeperTPCnv/selection.xtml and is generated with uuidgen | tr "[:lower:]" "[:upper:]"
23 static const pool::Guid p1_guid("461506EA-7376-448C-A4AF-640654D313C3");
24 static const pool::Guid p2_guid("4CB34AE0-ECE5-404B-8CB7-B2E20F509DBE");
25 if( compareClassGuid(p1_guid) ) {
26 // using unique_ptr ensures deletion of the persistent object
27 std::unique_ptr< EventBookkeeperCollection_p1 > col_vect( poolReadObject< EventBookkeeperCollection_p1 >() );
28 return m_TPConverterP1.createTransient( col_vect.get(), log );
29 }
30 else if( compareClassGuid(p2_guid) ) {
31 // using unique_ptr ensures deletion of the persistent object
32 std::unique_ptr< EventBookkeeperCollection_p2 > col_vect( poolReadObject< EventBookkeeperCollection_p2 >() );
33 return m_TPConverter.createTransient( col_vect.get(), log );
34 }
35 else {
36 throw std::runtime_error("Unsupported persistent version of EventBookkeeperCollection");
37 }
38}
39
EventBookkeeperCollection_p2 EventBookkeeperCollection_PERS
EventBookkeeperCollectionCnv_p1 m_TPConverterP1
virtual EventBookkeeperCollection * createTransient()
virtual EventBookkeeperCollection_PERS * createPersistent(EventBookkeeperCollection *transCont)
EventBookkeeperCollectionCnv_p2 m_TPConverter