ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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
(
const
Token
* token) {
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
Guid
p1_guid(
"461506EA-7376-448C-A4AF-640654D313C3"
);
24
static
const
Guid
p2_guid(
"4CB34AE0-ECE5-404B-8CB7-B2E20F509DBE"
);
25
if
(
compareClassGuid
(token, p1_guid) ) {
26
// using unique_ptr ensures deletion of the persistent object
27
std::unique_ptr< EventBookkeeperCollection_p1 > col_vect(
poolReadObject< EventBookkeeperCollection_p1 >
(token) );
28
return
m_TPConverterP1
.createTransient( col_vect.get(), log );
29
}
30
else
if
(
compareClassGuid
(token, p2_guid) ) {
31
// using unique_ptr ensures deletion of the persistent object
32
std::unique_ptr< EventBookkeeperCollection_p2 > col_vect(
poolReadObject< EventBookkeeperCollection_p2 >
(token) );
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.h
EventBookkeeperCollection_PERS
EventBookkeeperCollection_p2 EventBookkeeperCollection_PERS
Definition
EventBookkeeperCollectionCnv.h:21
EventBookkeeperCollection_p1.h
EventBookkeeperCollectionCnv::m_TPConverterP1
EventBookkeeperCollectionCnv_p1 m_TPConverterP1
Definition
EventBookkeeperCollectionCnv.h:37
EventBookkeeperCollectionCnv::createPersistent
virtual EventBookkeeperCollection_PERS * createPersistent(EventBookkeeperCollection *transCont)
Definition
EventBookkeeperCollectionCnv.cxx:14
EventBookkeeperCollectionCnv::createTransient
virtual EventBookkeeperCollection * createTransient(const Token *token)
Definition
EventBookkeeperCollectionCnv.cxx:20
EventBookkeeperCollectionCnv::m_TPConverter
EventBookkeeperCollectionCnv_p2 m_TPConverter
Definition
EventBookkeeperCollectionCnv.h:38
EventBookkeeperCollection
Definition
EventBookkeeperCollection.h:21
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
T_AthenaPoolCustomCnv< EventBookkeeperCollection, EventBookkeeperCollection_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< EventBookkeeperCollection, EventBookkeeperCollection_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
Generated on
for ATLAS Offline Software by
1.17.0