ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolCnvSvc
AthenaPoolCnvSvc
T_AthenaPoolExtendingCnv.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAPOOLCNVSVC_T_ATHENAPOOLEXTENDCNV_H
6
#define ATHENAPOOLCNVSVC_T_ATHENAPOOLEXTENDCNV_H
7
12
13
#include "
T_AthenaPoolCustomCnv.h
"
14
//#include "TPTools/AthenaConverterTLPExtension.h"
15
#include "
AthenaPoolCnvTPExtension.h
"
16
20
21
template
<
class
TRANS,
class
PERS>
22
class
T_AthenaPoolExtendingCnv
23
:
public
T_AthenaPoolCustomCnv
<TRANS, PERS>,
24
public
AthenaPoolCnvTPExtension
25
{
26
friend
class
CnvFactory
<
T_AthenaPoolExtendingCnv
<TRANS,
PERS
> >;
27
28
public
:
29
typedef
T_AthenaPoolCustomCnv<TRANS, PERS>
BaseType
;
30
31
public
:
32
// -------------------------------------------------------------
34
T_AthenaPoolExtendingCnv
(ISvcLocator* svcloc);
35
36
protected
:
37
// Methods to be implemented in the derived converter class
38
// ##########################################################
39
41
virtual
TopLevelTPCnvBase
*
getTopLevelTPCnv
()
override
= 0;
42
45
virtual
void
readObjectFromPool
(
const
Token
* token )
override
= 0 ;
46
47
protected
:
50
virtual
std::unique_ptr<const Token>
writeObject
(
const
std::string& key,
const
std::string& output)
override
;
51
55
virtual
BaseType
*
baseAthenaPoolCnv
() {
return
m_originalExtendingCnv
; }
56
58
virtual
void
wasClonedFrom
(
AthenaConverterTLPExtension
*orig_converter )
override
;
59
62
virtual
bool
needsCloning
()
const override
{
return
m_originalExtendingCnv
!= 0; }
63
66
template
<
class
P>
67
P
*
poolReadObject
(
const
Token
* token );
68
70
template
<
class
P>
71
void
poolReadObject
(
TopLevelTPCnvBase
& tlp_converter,
const
Token
* token );
72
73
74
protected
:
75
//-------------------------------------------------------------------
76
// Internal methods
77
80
virtual
const
std::string
name
()
const override
;
81
82
83
// hidden away, as they don't make sense for this converter
85
virtual
PERS
*
createPersistent
( TRANS *)
override
{
return
0; }
86
virtual
TRANS *
createTransient
(
const
Token
*)
override
{
return
0; }
87
89
BaseType
*
m_originalExtendingCnv
;
90
};
91
92
93
#include "
AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.icc
"
94
95
96
#endif
AthenaPoolCnvTPExtension.h
P
static Double_t P(Double_t *tt, Double_t *par)
Definition
LArPhysWaveHECTool.cxx:280
PERS
RpcSectorLogicContainer_p1 PERS
Definition
RpcSectorLogicContainerCnv.h:13
T_AthenaPoolCustomCnv.h
his file contains the class definition for the templated T_AthenaPoolCustomCnv class.
T_AthenaPoolExtendingCnv.icc
AthenaConverterTLPExtension
This class is used to add functionality to a standard AthenaConverter.
Definition
AthenaConverterTLPExtension.h:45
AthenaPoolCnvTPExtension::AthenaPoolCnvTPExtension
AthenaPoolCnvTPExtension()
Definition
AthenaPoolCnvTPExtension.h:17
CnvFactory
Abstract factory to create the converter.
Definition
ToyConverter.h:16
T_AthenaPoolCustomCnv
Compatibility for old converter classes that don't get passed the key.
Definition
T_AthenaPoolCustomCnv.h:129
T_AthenaPoolExtendingCnv::poolReadObject
P * poolReadObject(const Token *token)
Read object of type P.
T_AthenaPoolExtendingCnv::name
virtual const std::string name() const override
Get the name of this converter (anything that identifies it).
T_AthenaPoolExtendingCnv::needsCloning
virtual bool needsCloning() const override
tells if this converter needs to be cloned (true after the converter has been registered once already...
Definition
T_AthenaPoolExtendingCnv.h:62
T_AthenaPoolExtendingCnv::baseAthenaPoolCnv
virtual BaseType * baseAthenaPoolCnv()
return the original AthenaPool converter this one was cloned from if not cloned this returns self if ...
Definition
T_AthenaPoolExtendingCnv.h:55
T_AthenaPoolExtendingCnv::readObjectFromPool
virtual void readObjectFromPool(const Token *token) override=0
Read the persistent object from POOL.
T_AthenaPoolExtendingCnv::wasClonedFrom
virtual void wasClonedFrom(AthenaConverterTLPExtension *orig_converter) override
remember the original converter this one was cloned from
T_AthenaPoolExtendingCnv::createPersistent
virtual PERS * createPersistent(TRANS *) override
no-op
Definition
T_AthenaPoolExtendingCnv.h:85
T_AthenaPoolExtendingCnv::BaseType
T_AthenaPoolCustomCnv< TRANS, PERS > BaseType
Definition
T_AthenaPoolExtendingCnv.h:29
T_AthenaPoolExtendingCnv::getTopLevelTPCnv
virtual TopLevelTPCnvBase * getTopLevelTPCnv() override=0
Return the top level TP converter (which is always used for writing).
T_AthenaPoolExtendingCnv::writeObject
virtual std::unique_ptr< const Token > writeObject(const std::string &key, const std::string &output) override
Write the persistent object to POOL.
T_AthenaPoolExtendingCnv::poolReadObject
void poolReadObject(TopLevelTPCnvBase &tlp_converter, const Token *token)
T_AthenaPoolExtendingCnv< InDetTrack, InDetTrack_PERS >::m_originalExtendingCnv
BaseType * m_originalExtendingCnv
Definition
T_AthenaPoolExtendingCnv.h:89
T_AthenaPoolExtendingCnv::createTransient
virtual TRANS * createTransient(const Token *) override
Definition
T_AthenaPoolExtendingCnv.h:86
T_AthenaPoolExtendingCnv::T_AthenaPoolExtendingCnv
T_AthenaPoolExtendingCnv(ISvcLocator *svcloc)
Constructor.
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition
Token.h:22
TopLevelTPCnvBase
Base class for top-level TP converters.
Definition
TopLevelTPCnvBase.h:32
Generated on
for ATLAS Offline Software by
1.17.0