ATLAS Offline Software
Loading...
Searching...
No Matches
AthenaConverterTLPExtension.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENACONVERTER_TP_EXT_H
6#define ATHENACONVERTER_TP_EXT_H
7
12
15class IConverter;
16#include <vector>
17#include <string>
18#include <map>
19
41
43{
44public:
47
50
51
52 // ---- empty method stubs, implemented only in EXTENDED Athena converters
53
60 virtual std::unique_ptr<const Token> writeObject( const std::string& /*key*/, const std::string& /*output*/ ) { return 0; }
61
65 virtual void readObject( const std::string& ) { }
66
70 virtual AthenaConverterTLPExtension* clone() { return 0; }
71
76
80 virtual bool needsCloning() const { return false; }
81
85 virtual const std::string name() const { return "Extended Athena TP Converter"; }
86
87
91
92
93// --------------------------------------------------------------------------------
94
96 unsigned short getTPCnvID();
97
101
105
112
113
117 virtual void readExtendingObjects( void *baseObj );
118
121 virtual void deletePersistentObjects();
122
127
128protected:
129 // typeless invocation to handle types #defined in AthenaPoolCnv
130 void usingTPCnvForReading( void *cnv );
131
132protected:
133 typedef std::map<unsigned, AthenaConverterTLPExtension*> extCnvMap_t;
134
137
138 typedef std::map<TopLevelTPCnvBase*, extCnvMap_t*> extCnvMapMap_t;
139
140 // map of different extCnvMap_t for each of the old version of the TLP converter
142
148
151 std::vector< AthenaConverterTLPExtension* > m_clonedExtendingCnvs;
152};
153
154#endif
155
156
157
158
159
160
161
This file contains the class definition for the Token class (migrated from POOL).
This class is used to add functionality to a standard AthenaConverter.
virtual const std::string name() const
Get name of this converter (anything that identifies it)
virtual void readObject(const std::string &)
Read the extending object.
virtual void readExtendingObjects(void *baseObj)
Read all component persistent objects.
std::vector< AthenaConverterTLPExtension * > m_clonedExtendingCnvs
list of duplicated converters to delete at the end held in the original converter
virtual AthenaConverterTLPExtension * clone()
Clone this Athena Converter.
void resetTPCnvForReading()
Reset to 0 the TL TP converter for reading.
virtual void wasClonedFrom(AthenaConverterTLPExtension *)
Remember the original converter that this one was cloned from.
void usingTPCnvForReading(TopLevelTPCnvBase &cnv)
Sets top-level TP converter to be used for reading the next object.
virtual TopLevelTPCnvBase * getTopLevelTPCnv()=0
returns the main top-level TP converter
virtual bool registerExtendingCnv(AthenaConverterTLPExtension *cnv)
Register extending converter (that is, another converter that will extent this converter) and all his...
TopLevelTPCnvBase * m_TLCnvForReading
additional Top Level TP converter used only for reading tells which converter is used in case of read...
extCnvMap_t m_extendingConverters
map of Athena converters extending this one
virtual void deletePersistentObjects()
Delete persistent objects held by attached extending converters (used mainly in case of abort)
virtual bool needsCloning() const
Find out if this converter needs to be cloned Returns true if this converter was already registered o...
unsigned short getTPCnvID()
Returns the ID of the main top-level TP converter.
std::map< TopLevelTPCnvBase *, extCnvMap_t * > extCnvMapMap_t
TopLevelTPCnvBase * getTopLevelTPCnvForReading()
returns the current top-level TP converter.
std::map< unsigned, AthenaConverterTLPExtension * > extCnvMap_t
virtual std::unique_ptr< const Token > writeObject(const std::string &, const std::string &)
Writes the extending persistent object created by this converter Called from the EXTENDED (principal)...
Base class for top-level TP converters.