ATLAS Offline Software
Loading...
Searching...
No Matches
EventBookkeeperCnv.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 EventBookkeeperCnv
7// Author: David Cote, September 2008. <david.cote@cern.ch>
9
10#include "EventBookkeeperCnv.h"
12
14 MsgStream log(msgSvc(), "EventBookkeeperConverter" );
15 EventBookkeeper_PERS * persObj = m_TPConverter.createPersistent( transCont, log );
16 return persObj;
17}
18
20 MsgStream log(msgSvc(), "EventBookkeeperConverter" );
21 //p1_guid matches the number in EventBookkeeperTPCnv/selection.xtml and is generated with uuidgen | tr "[:lower:]" "[:upper:]"
22 static const pool::Guid p1_guid("A1550FE9-B52A-451D-A2B8-3B09E046A481");
23 static const pool::Guid p2_guid("EACBE9F1-84F1-4A51-9303-A39619FE965A");
24 if( compareClassGuid(p1_guid) ) {
25 // using unique_ptr ensures deletion of the persistent object
26 std::unique_ptr< EventBookkeeper_p1 > col_vect( poolReadObject< EventBookkeeper_p1 >() );
27 return m_TPConverterP1.createTransient( col_vect.get(), log );
28 }
29 else if( compareClassGuid(p2_guid) ) {
30 // using unique_ptr ensures deletion of the persistent object
31 std::unique_ptr< EventBookkeeper_p2 > col_vect( poolReadObject< EventBookkeeper_p2 >() );
32 return m_TPConverter.createTransient( col_vect.get(), log );
33 }
34 else {
35 throw std::runtime_error("Unsupported persistent version of EventBookkeeper. Please use a more recent software release.");
36 }
37}
38
EventBookkeeper_p2 EventBookkeeper_PERS
EventBookkeeperCnv_p1 m_TPConverterP1
EventBookkeeperCnv_p2 m_TPConverter
virtual EventBookkeeper_PERS * createPersistent(EventBookkeeper *transCont)
virtual EventBookkeeper * createTransient()