ATLAS Offline Software
Event
EventBookkeeperAthenaPool
src
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
10
#include "
EventBookkeeperCollectionCnv.h
"
11
#include "
EventBookkeeperTPCnv/EventBookkeeperCollection_p1.h
"
12
13
14
EventBookkeeperCollection_PERS
*
EventBookkeeperCollectionCnv::createPersistent
(
EventBookkeeperCollection
* transCont) {
15
MsgStream
log
(
msgSvc
(),
"EventBookkeeperCollectionConverter"
);
16
EventBookkeeperCollection_PERS
* persObj =
m_TPConverter
.
createPersistent
( transCont,
log
);
17
return
persObj;
18
}
19
20
EventBookkeeperCollection
*
EventBookkeeperCollectionCnv::createTransient
() {
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
EventBookkeeperCollectionCnv::createPersistent
virtual EventBookkeeperCollection_PERS * createPersistent(EventBookkeeperCollection *transCont)
Definition:
EventBookkeeperCollectionCnv.cxx:14
EventBookkeeperCollectionCnv::createTransient
virtual EventBookkeeperCollection * createTransient()
Definition:
EventBookkeeperCollectionCnv.cxx:20
EventBookkeeperCollection_p1.h
TPPolyCnvBase::createTransient
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
Create transient representation of a persistent object.
EventBookkeeperCollection
Definition:
EventBookkeeperCollection.h:21
TPAbstractPolyCnvBase::createPersistent
virtual PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of a transient object.
pool::Guid
::Guid Guid
Definition:
T_AthenaPoolCustCnv.h:19
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition:
StdJOSetup.py:36
EventBookkeeperCollectionCnv::m_TPConverter
EventBookkeeperCollectionCnv_p2 m_TPConverter
Definition:
EventBookkeeperCollectionCnv.h:38
EventBookkeeperCollectionCnv.h
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
EventBookkeeperCollection_p2
Definition:
EventBookkeeperCollection_p2.h:12
T_AthenaPoolCustCnv::compareClassGuid
virtual bool compareClassGuid(const Guid &clid) const
Compare POOL class GUID with the one of the object being read.
EventBookkeeperCollectionCnv::m_TPConverterP1
EventBookkeeperCollectionCnv_p1 m_TPConverterP1
Definition:
EventBookkeeperCollectionCnv.h:37
Generated on Wed Jan 8 2025 21:09:46 for ATLAS Offline Software by
1.8.18