ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
EventBookkeeperAthenaPool
src
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
"
11
#include "
EventBookkeeperTPCnv/EventBookkeeper_p1.h
"
12
13
EventBookkeeper_PERS
*
EventBookkeeperCnv::createPersistent
(
EventBookkeeper
* transCont) {
14
MsgStream log(msgSvc(),
"EventBookkeeperConverter"
);
15
EventBookkeeper_PERS
* persObj =
m_TPConverter
.createPersistent( transCont, log );
16
return
persObj;
17
}
18
19
EventBookkeeper
*
EventBookkeeperCnv::createTransient
(
const
Token
* token) {
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
(token, p1_guid) ) {
25
// using unique_ptr ensures deletion of the persistent object
26
std::unique_ptr< EventBookkeeper_p1 > col_vect(
poolReadObject< EventBookkeeper_p1 >
(token) );
27
return
m_TPConverterP1
.createTransient( col_vect.get(), log );
28
}
29
else
if
(
compareClassGuid
(token, p2_guid) ) {
30
// using unique_ptr ensures deletion of the persistent object
31
std::unique_ptr< EventBookkeeper_p2 > col_vect(
poolReadObject< EventBookkeeper_p2 >
(token) );
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
EventBookkeeperCnv.h
EventBookkeeper_PERS
EventBookkeeper_p2 EventBookkeeper_PERS
Definition
EventBookkeeperCnv.h:21
EventBookkeeper_p1.h
EventBookkeeperCnv::createTransient
virtual EventBookkeeper * createTransient(const Token *token)
Definition
EventBookkeeperCnv.cxx:19
EventBookkeeperCnv::m_TPConverterP1
EventBookkeeperCnv_p1 m_TPConverterP1
Definition
EventBookkeeperCnv.h:35
EventBookkeeperCnv::m_TPConverter
EventBookkeeperCnv_p2 m_TPConverter
Definition
EventBookkeeperCnv.h:36
EventBookkeeperCnv::createPersistent
virtual EventBookkeeper_PERS * createPersistent(EventBookkeeper *transCont)
Definition
EventBookkeeperCnv.cxx:13
EventBookkeeper
Definition
EventBookkeeper.h:24
T_AthenaPoolCustomCnv< EventBookkeeper, EventBookkeeper_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< EventBookkeeper, EventBookkeeper_PERS >::poolReadObject
P * poolReadObject(const Token *token)
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
pool::Guid
::Guid Guid
Definition
T_AthenaPoolCustCnv.h:19
Generated on
for ATLAS Offline Software by
1.17.0