ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
EventCommonAthenaPool
src
IParticleLinkContainerCnv.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
11
12
#include "
DataModelAthenaPool/VectorElementLinkCnv_p1.h
"
13
#include "
DataModelAthenaPool/ElementLinkCnv_p3.h
"
14
#include "
DataModelAthenaPool/VectorElementLink_p1.h
"
15
#include "
DataModelAthenaPool/ElementLink_p3.h
"
16
17
// This classes header
18
#include "
IParticleLinkContainerCnv.h
"
19
20
// This is here as a checkreq workaround.
21
// The generated pool files depend on EventKernel, but nothing in src does
22
// directly. So checkreq was fiving different errors before and after pool
23
// generation. By adding an explicit dependency here, those are made
24
// consistent.
25
#include "
EventKernel/IParticle.h
"
26
27
28
// Create the persistent object from the transient one
29
IParticleLinkContainer_PERS
*
IParticleLinkContainerCnv::createPersistent
(
IParticleLinkContainer
* transCont )
30
{
31
// Create the message service for this class
32
MsgStream log( msgSvc(),
"IParticleLinkContainerConverter"
);
33
34
// Do the actual creation of the persistent object
35
IParticleLinkContainer_PERS
*persObj =
m_TPConverter
.createPersistent( transCont, log );
36
37
// Write a debug message out
38
log << MSG::DEBUG <<
"Success"
<<
endmsg
;
39
40
return
persObj;
41
}
42
43
44
// Create the transient object from the persistent one
45
IParticleLinkContainer
*
IParticleLinkContainerCnv::createTransient
(
const
Token
* token)
46
{
47
// Create the message service for this class
48
MsgStream log( msgSvc(),
"IParticleLinkContainerConverter"
);
49
50
// Define the pool IDs
51
static
const
Guid
p1_guid(
"E82C71AF-AC5C-453B-9A35-FA45A849838E"
);
52
53
if
(
compareClassGuid
(token, p1_guid) )
54
{
55
// using unique_ptr ensures deletion of the persistent object
56
std::unique_ptr< IParticleLinkContainer_PERS > col_vect(
poolReadObject< IParticleLinkContainer_PERS >
(token) );
57
return
m_TPConverter
.createTransient( col_vect.get(), log );
58
}
59
else
60
{
61
throw
std::runtime_error(
"Unsupported persistent version of Data Collection"
);
62
}
63
}
64
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
ElementLinkCnv_p3.h
This file contains the class definition for the ElementLinkCnv_p3 class.
ElementLink_p3.h
This file contains the class definition for the ElementLink_p3 class.
IParticle.h
IParticleLinkContainerCnv.h
IParticleLinkContainer_PERS
IParticleLinkContainer_p1 IParticleLinkContainer_PERS
IParticleLinkContainerCnv.h.
Definition
IParticleLinkContainerCnv.h:31
VectorElementLinkCnv_p1.h
VectorElementLink_p1.h
This file contains the class definition for theVector ElementLink_p1 class.
Guid
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition
Guid.h:25
IParticleLinkContainerCnv::m_TPConverter
IParticleLinkContainerCnv_p1 m_TPConverter
Create the t/p converter.
Definition
IParticleLinkContainerCnv.h:57
IParticleLinkContainerCnv::createTransient
virtual IParticleLinkContainer * createTransient(const Token *token)
Member method to create the transient version.
Definition
IParticleLinkContainerCnv.cxx:45
IParticleLinkContainerCnv::createPersistent
virtual IParticleLinkContainer_PERS * createPersistent(IParticleLinkContainer *transCont)
Member method to create the persistent version.
Definition
IParticleLinkContainerCnv.cxx:29
IParticleLinkContainer
IParticleLinkContainer.h.
Definition
NavFourMom/NavFourMom/IParticleLinkContainer.h:27
T_AthenaPoolCustomCnv< IParticleLinkContainer, IParticleLinkContainer_PERS >::compareClassGuid
virtual bool compareClassGuid(const Token *token, const Guid &clid) const
T_AthenaPoolCustomCnv< IParticleLinkContainer, IParticleLinkContainer_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