ATLAS Offline Software
Loading...
Searching...
No Matches
TrackCollectionCnv_tlp6 Class Referenceabstract

#include <TrackCollectionCnv_tlp6.h>

Inheritance diagram for TrackCollectionCnv_tlp6:

Public Types

typedef TrackCollectionCnv_p4::Trans_t TRANS
typedef Trk::TrackCollection_tlp6 PERS
typedef Gaudi::PluginService::Factory< ITPCnvBase *()> Factory

Public Member Functions

 TrackCollectionCnv_tlp6 ()
virtual void setPStorage (PERS *storage) override
virtual PERScreatePersistentWithKey (const TRANS *transObj, const std::string &key, MsgStream &log) override
virtual void setPStorage (Trk::TrackCollection_tlp6 *persObj) override=0
 A stub for a method that should be provided by the converter creator.
virtual void setPStorage (TL_PERS *persObj)=0
 A stub for a method that should be provided by the converter creator.
TRANScreateTransient (MsgStream &log)
 Create transient representation of the persistent object known to this converter.
virtual TRANScreateTransient (const Trk::TrackCollection_tlp6 *persObj, MsgStream &log)
 Create transient representation of persObj.
TRANScreateTransientWithKey (const std::string &key, MsgStream &log)
 Create transient representation of the persistent object known to this converter.
virtual Trk::TrackCollection_tlp6createPersistent (const TRANS *transObj, MsgStream &log)
 Create persistent representation of transObj.
virtual Trk::TrackCollection_tlp6createPersistentWithKey (const TRANS *transObj, const std::string &key, MsgStream &log)
 Create persistent representation of transObj.
void addMainTPConverter ()
 Add the main TP converter to the internal list - should be called from user-defined constructor.
void setMainCnvPStorage (STORAGE *storage)
 Set the persistent storage space for the main TP converter.
virtual unsigned short getConverterID () override
 Returns this converter's ID.
virtual const std::type_info & transientTInfo () const override
 return C++ type id of the transient class this converter is for
virtual const std::type_info & persistentTInfo () const override
 return C++ type id of the persistent class this converter is for
virtual void persToTransUntyped (const void *pers, void *trans, MsgStream &log) override
 Convert persistent object representation to transient.
virtual void transToPersUntyped (const void *trans, void *pers, MsgStream &log) override
 Convert transient object representation to persistent.
virtual void persToTransWithKeyUntyped (const void *pers, void *trans, const std::string &, MsgStream &log) override
 Convert persistent object representation to transient.
virtual void transToPersWithKeyUntyped (const void *trans, void *pers, const std::string &, MsgStream &log) override
 Convert transient object representation to persistent.
virtual void persToTrans (const PERS *pers, TRANS *trans, MsgStream &msg)
virtual void transToPers (const TRANS *trans, PERS *pers, MsgStream &msg)
virtual bool hasTLPersObject () const override
 Returns true if the converter has a persistent object.
virtual void createTLPersObject () override
 Create persistent object - the converter keeps it.
virtual void deleteTLPersObject () override
 Delete the persistent object owned by the converter.
Trk::TrackCollection_tlp6getTLPersObject ()
const Trk::TrackCollection_tlp6getTLPersObject () const
Trk::TrackCollection_tlp6releaseTLPersObject ()
 @release the persistent object from this converter
virtual void * getTLPersObjectAsVoid () override
virtual const void * getTLPersObjectAsVoid () const override
virtual void clearTLPersObject () override
 Discard the persistent object.
virtual void setTLPersObject (void *persObj) override
 Take ownership of the persistent object.
virtual TPCnvTokenList_p1getTokenListVar () override
 Return the list of tokens to the objects extending the object owned by this converter.
virtual TPCnvTokenList_p1getTokenListVarFrom (void *persObj) override
 Return the list of tokens to the objects extending the object NOT owned by this converter.
virtual void addTPConverter (ITPConverter *cnv)
 Add a TP converter to this top level converter.
virtual void addTPConverterForReading (ITPConverter *cnv)
 Add a TP converter to this top level converter but only for reading.
virtual void addExtTPConverterForReading (ITPConverter *cnv)
 add extending TP converter to this top level converter - to the list consulted when reading only.
virtual void addTPConvertersTo (TopLevelTPCnvBase *dest)
 copy all extending converters from this top level converter to "dest" top level converter
virtual void addTPConvertersForReadingTo (TopLevelTPCnvBase *dest)
 copy all extending converters from this top level converter to "dest" top level converter - for reading
ITPConverterconverterForType (const std::type_info &info) const
 Find and return a TP converter for a given C++ type info.
ITPConverterconverterForRef (const TPObjRef &ref) const
 Find and return a TP converter for persistent type referenced by ref.

Protected Types

typedef std::map< unsigned, ITPConverter * > convIdMap_t

Protected Member Functions

void rememberConverter (TopLevelTPCnvBase *cnv)
 Remember that elemental TP converters from the given top-level converter are already registered.
bool hasConvertersFrom (TopLevelTPCnvBase *cnv)
 Check if TP converters from a given top-level converter were already registered in this converter.

Protected Attributes

TrackCnv_p4 m_tracksCnv
TrackStateOnSurfaceCnv_p3 m_trackStatesCnv
ErrorMatrixCnv_p1 m_errorMatricesCnv
PseudoMeasurementOnTrackCnv_p2 m_pseudoMeasurementOnTrackCnv
VertexOnTrackCnv_p1 m_vertexOnTrackCnv
CompetingRIOsOnTrackCnv_p1 m_crotCnv
TrackParametersCnv_p2 m_parametersCnv
ConeSurfaceCnv_p2 m_coneSurfacesCnv
CylinderSurfaceCnv_p2 m_cylSurfacesCnv
DiscSurfaceCnv_p2 m_discSurfacesCnv
PerigeeSurfaceCnv_p2 m_perigeeSurfacesCnv
PlaneSurfaceCnv_p2 m_planeSurfacesCnv
StraightLineSurfaceCnv_p2 m_lineSurfacesCnv
SaggedLineSurfaceCnv_p2 m_saggedLineSurfacesCnv
FitQualityCnv_p1 m_fitQualitiesCnv
MaterialEffectsBaseCnv_p2 m_matEffectsBaseCnv
EnergyLossCnv_p1 m_energyLossCnv
MaterialEffectsOnTrackCnv_p2 m_materialEffectsCnv
EstimatedBremOnTrackCnv_p1 m_estimatedBremCnv
LocalDirectionCnv_p1 m_localDirectionsCnv
LocalPositionCnv_p1 m_localPositionsCnv
LocalParametersCnv_p1 m_localParametersCnv
MuonMeasurementsCnv_tlp2 m_muonMeasurementsCnv
InDetTrackCnv_tlp2 m_inDetTrackCnv
MuonCaloEnergyContainerCnv_tlp1 m_muonCaloEnergiesCnv
TrackCollectionCnv_p4 m_mainConverter
Trk::TrackCollection_tlp6m_tlPersObject
 The persistent object this conveter is working on.
convIdMap_t m_convIdMap
 Map of elemental TP converters indexed by their ID - used for reading.
TPConverterTypeMap< ITPConverterm_converters
 Map of elemental TP converters indexed by transient typeid - used for writing.
std::set< TopLevelTPCnvBase * > m_registeredTLConverters
 Set top-level converters from which elemental TP converters were registered.
unsigned m_typeIDCount
 Counter used to create typed IDs used in the transient Ref.

Private Member Functions

virtual void addTPConverterForWriting (ITPConverter *cnv)
 add TP converter to the list of converters consulted when writing - internal method.

Detailed Description

Definition at line 42 of file TrackCollectionCnv_tlp6.h.

Member Typedef Documentation

◆ convIdMap_t

typedef std::map<unsigned, ITPConverter*> TopLevelTPCnvBase::convIdMap_t
protectedinherited

Definition at line 174 of file TopLevelTPCnvBase.h.

◆ Factory

typedef Gaudi::PluginService::Factory<ITPCnvBase*()> ITPCnvBase::Factory
inherited

Definition at line 26 of file ITPCnvBase.h.

◆ PERS

◆ TRANS

Constructor & Destructor Documentation

◆ TrackCollectionCnv_tlp6()

TrackCollectionCnv_tlp6::TrackCollectionCnv_tlp6 ( )

Definition at line 13 of file TrackCollectionCnv_tlp6.cxx.

14{
15// Add all converters defined in this top level converter:
16// never change the order of adding converters!
17
19
22
24
25 // Measurements
29 // Other measurements are stored in the other tlp objects, i.e. the InDetTrack, and MuonMeasurements
30
31 // Parameters
33
34 // Surfaces
42
47
52
53 // adding extending TLP converters,
54 // they don't interfere with the order of adding regular converters (above)
55 m_muonMeasurementsCnv.addTPConvertersTo( this );
56 m_inDetTrackCnv .addTPConvertersTo( this );
57 m_muonCaloEnergiesCnv.addTPConvertersTo( this );
58}
MuonMeasurementsCnv_tlp2 m_muonMeasurementsCnv
CompetingRIOsOnTrackCnv_p1 m_crotCnv
PerigeeSurfaceCnv_p2 m_perigeeSurfacesCnv
TrackStateOnSurfaceCnv_p3 m_trackStatesCnv
EstimatedBremOnTrackCnv_p1 m_estimatedBremCnv
LocalPositionCnv_p1 m_localPositionsCnv
StraightLineSurfaceCnv_p2 m_lineSurfacesCnv
MaterialEffectsOnTrackCnv_p2 m_materialEffectsCnv
LocalDirectionCnv_p1 m_localDirectionsCnv
SaggedLineSurfaceCnv_p2 m_saggedLineSurfacesCnv
TrackParametersCnv_p2 m_parametersCnv
PseudoMeasurementOnTrackCnv_p2 m_pseudoMeasurementOnTrackCnv
VertexOnTrackCnv_p1 m_vertexOnTrackCnv
CylinderSurfaceCnv_p2 m_cylSurfacesCnv
MuonCaloEnergyContainerCnv_tlp1 m_muonCaloEnergiesCnv
LocalParametersCnv_p1 m_localParametersCnv
MaterialEffectsBaseCnv_p2 m_matEffectsBaseCnv
PlaneSurfaceCnv_p2 m_planeSurfacesCnv

Member Function Documentation

◆ addExtTPConverterForReading()

void TopLevelTPCnvBase::addExtTPConverterForReading ( ITPConverter * cnv)
virtualinherited

add extending TP converter to this top level converter - to the list consulted when reading only.

Parameters
cnv[IN] the TP converter to be added

Definition at line 60 of file TopLevelTPCnvBase.cxx.

48{
49 // for reading, converters are selected based on our own typeID value
50 // which comes from the Ref
51 // Ref contains top level converter ID + local type ID
52 m_convIdMap[ converter->typeID().value() ] = converter;
53
54// std::cout << " **addExtTPConverterForReading - adding converter for " << converter->transientTInfo().name() << " CnvID=" << converter->typeID().value() << std::endl;
55 converter->setRuntimeTopConverter( this );
56}
TopLevelTPConverter is the final and most specialized template for all top-level TP converters.

◆ addMainTPConverter()

void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::addMainTPConverter ( )
inlineinherited

Add the main TP converter to the internal list - should be called from user-defined constructor.

Definition at line 146 of file TopLevelTPConverter.h.

◆ addTPConverter()

void TopLevelTPCnvBase::addTPConverter ( ITPConverter * cnv)
virtualinherited

Add a TP converter to this top level converter.

Parameters
cnv[IN] the TP converter to be added

Definition at line 42 of file TopLevelTPCnvBase.cxx.

◆ addTPConverterForReading()

void TopLevelTPCnvBase::addTPConverterForReading ( ITPConverter * cnv)
virtualinherited

Add a TP converter to this top level converter but only for reading.

Old converters that read schema evolved objects should be added only for reading.

Parameters
cnv[IN] the TP converter to be added

Definition at line 48 of file TopLevelTPCnvBase.cxx.

20{
21 // for reading, converters are selected based on their typeID value
22 // which comes from the Ref
23 // Ref contains top level converter ID + local type ID
26
27// std::cout << " **addTPConverter - adding converter for " << converter->transientTInfo().name() << " CnvID=" << full_typeID.value() << std::endl;
28 converter->setTopConverter( this, full_typeID );
29}

◆ addTPConverterForWriting()

void TopLevelTPCnvBase::addTPConverterForWriting ( ITPConverter * cnv)
privatevirtualinherited

add TP converter to the list of converters consulted when writing - internal method.

Parameters
cnv[IN] the TP converter to be added

Definition at line 54 of file TopLevelTPCnvBase.cxx.

34{
35 // add converter to the map keyed by type_info
36 // this map is used to find a converter when writing
38 if( m_converters.findConverter( info ) ) {
39 // adding a second converter for the same type will mess up things
40 const std::string error("Duplicate TP converter for class ");
41 throw std::runtime_error( error + info.name() );
42 }
43 m_converters.addConverter( converter, info );
44}
virtual const std::type_info & transientTInfo() const override
return C++ type id of the transient class this converter is for

◆ addTPConvertersForReadingTo()

void TopLevelTPCnvBase::addTPConvertersForReadingTo ( TopLevelTPCnvBase * dest)
virtualinherited

copy all extending converters from this top level converter to "dest" top level converter - for reading

Parameters
dest[IN] destination converter which will receive all elemental TP converters that this one has

Definition at line 74 of file TopLevelTPCnvBase.cxx.

79{
80 // check if we have done this already, and if so then exit
81 if( cnv->hasConvertersFrom( this ) ) {
82 return;
83 }
84 // copy all TP converters to another topLevel conveter
85 for( convIdMap_t::const_iterator itr = m_convIdMap.begin();
86 itr != m_convIdMap.end(); ++itr ) {
88 }
89 // prevent attempts to add the same converters again
90 cnv->rememberConverter( this );
91}
virtual void addExtTPConverterForReading(ITPConverter *cnv)
add extending TP converter to this top level converter - to the list consulted when reading only.
void rememberConverter(TopLevelTPCnvBase *cnv)
Remember that elemental TP converters from the given top-level converter are already registered.
bool hasConvertersFrom(TopLevelTPCnvBase *cnv)
Check if TP converters from a given top-level converter were already registered in this converter.

◆ addTPConvertersTo()

void TopLevelTPCnvBase::addTPConvertersTo ( TopLevelTPCnvBase * dest)
virtualinherited

copy all extending converters from this top level converter to "dest" top level converter

copy all TP converters to another topLevel conveter

Parameters
dest[IN] destination converter which will receive all elemental TP converters that this one has

Definition at line 67 of file TopLevelTPCnvBase.cxx.

61{
62 // loop over all registered converters
63 for( convIdMap_t::const_iterator itr = m_convIdMap.begin();
64 itr != m_convIdMap.end(); ++itr ) {
65 // check if the converter is in the list of R/W converters
66 if( m_converters.findConverter( itr->second->transientTInfo() ) == itr->second ) {
67 // this is a R/W converter, add it for writing too
69 }
70 // add the convterter for reading
72 }
73 // prevent adding of the same converter again
74 cnv->rememberConverter( this );
75}

◆ clearTLPersObject()

virtual void TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::clearTLPersObject ( )
inlineoverridevirtualinherited

Discard the persistent object.

Definition at line 99 of file TopLevelTPCnvBaseP.h.

◆ converterForRef()

ITPConverter * TopLevelTPCnvBase::converterForRef ( const TPObjRef & ref) const
inlineinherited

Find and return a TP converter for persistent type referenced by ref.

Parameters
ref[IN] TP reference of a persistent object
Returns
ITPConverter* pointer to the TP converter for ref

Definition at line 89 of file TopLevelTPCnvBase.h.

89 {
90 convIdMap_t::const_iterator iter = m_convIdMap.find( ref.typeID() );
91 return (iter == m_convIdMap.end())?
92 0 : iter->second;
93 }

◆ converterForType()

ITPConverter * TopLevelTPCnvBase::converterForType ( const std::type_info & info) const
inlineinherited

Find and return a TP converter for a given C++ type info.

Parameters
info[IN] C++ type info reference to the transient type
Returns
ITPConverter* pointer to the TP converter for type info

Definition at line 80 of file TopLevelTPCnvBase.h.

80 {
81 return m_converters.findConverter( info );
82 }

◆ createPersistent()

virtual Trk::TrackCollection_tlp6 * TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::createPersistent ( const TRANS * transObj,
MsgStream & log )
inlinevirtualinherited

Create persistent representation of transObj.

Parameters
transObj[IN] pointer to the transient representation
log[IN] message stream for output
Returns
TL_PRES* persistent object passed by a pointer

Definition at line 110 of file TopLevelTPConverter.h.

111 {
112 // create a new persistent object (empty)
113 this->createTLPersObject();
114 // do transToPers conversion, fill in the persistent object
115 m_mainConverter.virt_toPersistent(transObj, log);
116 // take the persistent object away from the TL converter
117 TL_PERS *ret = this->getTLPersObject();
118 // important to clear so createTransient() will not try to delete it (and crash)
119 this->clearTLPersObject();
120 return ret;
121 }

◆ createPersistentWithKey() [1/2]

virtual Trk::TrackCollection_tlp6 * TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::createPersistentWithKey ( const TRANS * transObj,
const std::string & key,
MsgStream & log )
inlinevirtualinherited

Create persistent representation of transObj.

Parameters
transObj[IN] pointer to the transient representation
key[IN] SG key of the object being converted.
log[IN] message stream for output
Returns
TL_PRES* persistent object passed by a pointer

Definition at line 129 of file TopLevelTPConverter.h.

132 {
133 // create a new persistent object (empty)
134 this->createTLPersObject();
135 // do transToPers conversion, fill in the persistent object
136 m_mainConverter.virt_toPersistentWithKey(transObj, key, log);
137 // take the persistent object away from the TL converter
138 TL_PERS *ret = this->getTLPersObject();
139 // important to clear so createTransient() will not try to delete it (and crash)
140 this->clearTLPersObject();
141 return ret;
142 }

◆ createPersistentWithKey() [2/2]

BaseTrackCollectionCnv_tlp6::PERS * TrackCollectionCnv_tlp6::createPersistentWithKey ( const TRANS * transObj,
const std::string & key,
MsgStream & log )
overridevirtual

Definition at line 104 of file TrackCollectionCnv_tlp6.cxx.

107{
109
110 // get extending objects (nullptr if there was no extending data types)
111 pers->m_muonMeasurementsExt = m_muonMeasurementsCnv.releaseTLPersObject();
112 pers->m_inDetTrackExt = m_inDetTrackCnv.releaseTLPersObject();
113 pers->m_muonCaloEnergiesExt = m_muonCaloEnergiesCnv.releaseTLPersObject();
114
115 return pers;
116}
virtual Trk::TrackCollection_tlp6 * createPersistentWithKey(const TRANS *transObj, const std::string &key, MsgStream &log)

◆ createTLPersObject()

virtual void TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::createTLPersObject ( )
inlineoverridevirtualinherited

Create persistent object - the converter keeps it.

Definition at line 57 of file TopLevelTPCnvBaseP.h.

57 {
58 m_tlPersObject = new TL_PERS();
60 }
virtual void setPStorage(Trk::TrackCollection_tlp6 *persObj) override=0

◆ createTransient() [1/2]

virtual TRANS * TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::createTransient ( const Trk::TrackCollection_tlp6 * persObj,
MsgStream & log )
inlinevirtualinherited

Create transient representation of persObj.

NOTE: usually this method will not delete persObj and the user needs to do it himself. However, if ownership was somehow passed to the converter earlier, then the object will be deleted.

Parameters
persObj[IN] pointer to the persistent representation
log[IN] message stream for output
Returns
TRANS* transient object passed by a pointer

Definition at line 96 of file TopLevelTPConverter.h.

96 {
97 // FIXME: TPConverter uses the same non-const member m_pStorage
98 // for both reading and writing, but we want it to be const
99 // in the former case.
102 return createTransient( log );
103 }

◆ createTransient() [2/2]

TRANS * TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::createTransient ( MsgStream & log)
inlineinherited

Create transient representation of the persistent object known to this converter.

NOTE: If the persistent object is owned by the converter, it will be deleted

Parameters
log[IN] message stream for output
Returns
TRANS* transient object passed by a pointer

Definition at line 62 of file TopLevelTPConverter.h.

62 {
63 // 0 is the index of the main and only one top level object
64 TRANS *transObj = m_mainConverter.virt_createTransFromPStore( 0, log );
65 this->deleteTLPersObject();
66 return transObj;
67 }

◆ createTransientWithKey()

TRANS * TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::createTransientWithKey ( const std::string & key,
MsgStream & log )
inlineinherited

Create transient representation of the persistent object known to this converter.

NOTE: If the persistent object is owned by the converter, it will be deleted

Parameters
key[IN] SG key of the object being converted
log[IN] message stream for output
Returns
TRANS* transient object passed by a pointer

Definition at line 78 of file TopLevelTPConverter.h.

80 {
81 // 0 is the index of the main and only one top level object
82 TRANS *transObj = m_mainConverter.virt_createTransFromPStoreWithKey( 0, key, log );
83 this->deleteTLPersObject();
84 return transObj;
85 }

◆ deleteTLPersObject()

virtual void TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::deleteTLPersObject ( )
inlineoverridevirtualinherited

Delete the persistent object owned by the converter.

Definition at line 64 of file TopLevelTPCnvBaseP.h.

64 {
65 if( m_tlPersObject ) {
66 delete m_tlPersObject;
68 }
69 }

◆ getConverterID()

virtual unsigned short TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::getConverterID ( void )
inlineoverridevirtualinherited

Returns this converter's ID.

By default it is 0. Should be overwritten in extending converters

Returns
this converter's ID

Implements TopLevelTPCnvBase.

Definition at line 159 of file TopLevelTPConverter.h.

159{ return 0; }

◆ getTLPersObject() [1/2]

Trk::TrackCollection_tlp6 * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTLPersObject ( )
inlineinherited
Returns
pointer to the persistent object owned by this converter

Definition at line 72 of file TopLevelTPCnvBaseP.h.

72 {
73 return m_tlPersObject;
74 }

◆ getTLPersObject() [2/2]

const Trk::TrackCollection_tlp6 * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTLPersObject ( ) const
inlineinherited
Returns
pointer to the persistent object owned by this converter

Definition at line 77 of file TopLevelTPCnvBaseP.h.

77 {
78 return m_tlPersObject;
79 }

◆ getTLPersObjectAsVoid() [1/2]

virtual const void * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTLPersObjectAsVoid ( ) const
inlineoverridevirtualinherited

Returns
pointer to the persistent object owned by this converter as void*

Definition at line 94 of file TopLevelTPCnvBaseP.h.

94 {
95 return getTLPersObject();
96 }

◆ getTLPersObjectAsVoid() [2/2]

virtual void * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTLPersObjectAsVoid ( )
inlineoverridevirtualinherited

Returns
pointer to the persistent object owned by this converter as void*

Definition at line 89 of file TopLevelTPCnvBaseP.h.

89 {
90 return getTLPersObject();
91 }

◆ getTokenListVar()

virtual TPCnvTokenList_p1 * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTokenListVar ( )
inlineoverridevirtualinherited

Return the list of tokens to the objects extending the object owned by this converter.

This method is needed only in a conveter which has extensions. It needs to be implemented in the top-level converter by the user

Returns
pointer to the token list from the persistent object

Definition at line 112 of file TopLevelTPCnvBaseP.h.

112{ return 0; }

◆ getTokenListVarFrom()

virtual TPCnvTokenList_p1 * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::getTokenListVarFrom ( void * persObj)
inlineoverridevirtualinherited

Return the list of tokens to the objects extending the object NOT owned by this converter.

Parameters
persObj[IN] persistent object from which contains list of tokens. Passes as void* - if the type is wrong, it may crash
Returns
pointer to the token list from persObj

Definition at line 115 of file TopLevelTPCnvBaseP.h.

115 {
116 // avoid setting up the pointer to persistent object
117 // (can lead to deleting it twice, if the user deletes too)
119 m_tlPersObject = reinterpret_cast<TL_PERS*>( persObj );
122 return toklist;
123 }

◆ hasConvertersFrom()

bool TopLevelTPCnvBase::hasConvertersFrom ( TopLevelTPCnvBase * cnv)
inlineprotectedinherited

Check if TP converters from a given top-level converter were already registered in this converter.

Parameters
cnv[IN] top-level converter to check
Returns
true if TP converters from cnv were already registered

Definition at line 166 of file TopLevelTPCnvBase.h.

◆ hasTLPersObject()

virtual bool TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::hasTLPersObject ( ) const
inlineoverridevirtualinherited

Returns true if the converter has a persistent object.

Definition at line 52 of file TopLevelTPCnvBaseP.h.

52 {
53 return m_tlPersObject;
54 }

◆ persistentTInfo()

virtual const std::type_info & TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::persistentTInfo ( ) const
inlineoverridevirtualinherited

return C++ type id of the persistent class this converter is for

Returns
std::type_info&

Implements ITPCnvBase.

Definition at line 169 of file TopLevelTPConverter.h.

169{ return typeid(PERS); }

◆ persToTrans()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::persToTrans ( const PERS * pers,
TRANS * trans,
MsgStream & msg )
inlinevirtualinherited

Definition at line 201 of file TopLevelTPConverter.h.

201 {
202 // FIXME: TPConverter uses the same non-const member m_pStorage
203 // for both reading and writing, but we want it to be const
204 // in the former case.
207 m_mainConverter.pstoreToTrans (0, trans, msg);
208 }

◆ persToTransUntyped()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::persToTransUntyped ( const void * pers,
void * trans,
MsgStream & log )
inlineoverridevirtualinherited

Convert persistent object representation to transient.

Parameters
pers[IN] void* pointer to the persistent object
trans[OUT] void* pointer to the empty transient object
log[IN] output message stream

Implements ITPCnvBase.

Definition at line 173 of file TopLevelTPConverter.h.

173 {
174 persToTrans( reinterpret_cast<const PERS*>(pers), reinterpret_cast<TRANS*>(trans), log );
175 }
virtual void persToTrans(const PERS *pers, TRANS *trans, MsgStream &msg)

◆ persToTransWithKeyUntyped()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::persToTransWithKeyUntyped ( const void * pers,
void * trans,
const std::string & ,
MsgStream & log )
inlineoverridevirtualinherited

Convert persistent object representation to transient.

Parameters
pers[IN] void* pointer to the persistent object
trans[OUT] void* pointer to the empty transient object
key[IN] SG key of object being read.
log[IN] output message stream

Reimplemented from ITPCnvBase.

Definition at line 183 of file TopLevelTPConverter.h.

187 {
188 persToTrans( reinterpret_cast<const PERS*>(pers), reinterpret_cast<TRANS*>(trans), log );
189 }

◆ releaseTLPersObject()

Trk::TrackCollection_tlp6 * TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::releaseTLPersObject ( )
inlineinherited

@release the persistent object from this converter

Definition at line 82 of file TopLevelTPCnvBaseP.h.

82 {
85 return tmp;
86 }

◆ rememberConverter()

void TopLevelTPCnvBase::rememberConverter ( TopLevelTPCnvBase * cnv)
inlineprotectedinherited

Remember that elemental TP converters from the given top-level converter are already registered.

Parameters
cnv[IN] top-level TP converter - source of the elemental TP converters

Definition at line 156 of file TopLevelTPCnvBase.h.

157 {
159 }

◆ setMainCnvPStorage()

void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::setMainCnvPStorage ( STORAGE * storage)
inlineinherited

Set the persistent storage space for the main TP converter.

Definition at line 152 of file TopLevelTPConverter.h.

152 {
153 m_mainConverter.setPStorage( storage );
154 }

◆ setPStorage() [1/3]

template<class TL_PERS>
virtual void TopLevelTPCnvBaseP< TL_PERS >::setPStorage ( TL_PERS * persObj)
pure virtualinherited

A stub for a method that should be provided by the converter creator.

In that methods all elemental TP converters that belong to this top-level converter need to be assigned to storage vectors in the persistent object.

Parameters
persObj[IN] persistent object

Implemented in TopLevelTPConverter< MAIN_CNV, TL_PERS >.

◆ setPStorage() [2/3]

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::setPStorage ( Trk::TrackCollection_tlp6 * persObj)
overridepure virtualinherited

A stub for a method that should be provided by the converter creator.

In that methods all elemental TP converters that belong to this top-level converter need to be assigned to storage vectors in the persistent object.

Parameters
persObj[IN] persistent object

◆ setPStorage() [3/3]

void TrackCollectionCnv_tlp6::setPStorage ( PERS * storage)
overridevirtual

Definition at line 61 of file TrackCollectionCnv_tlp6.cxx.

62{
63 setMainCnvPStorage( &storage->m_trackCollections );
64
65// for all converters defined in this top level converter
66 m_tracksCnv. setPStorage( &storage->m_tracks );
67 m_trackStatesCnv. setPStorage( &storage->m_trackStates );
68
69 m_errorMatricesCnv. setPStorage( &storage->m_hepSymMatrices );
70
71 m_pseudoMeasurementOnTrackCnv.setPStorage( &storage->m_pseudoMeasurementOnTrack );
72 m_crotCnv. setPStorage( &storage->m_competingRotsOnTrack );
73 m_vertexOnTrackCnv. setPStorage( &storage->m_vertexOnTrack );
74
75 m_parametersCnv. setPStorage( &storage->m_parameters );
76
77 m_coneSurfacesCnv .setPStorage( &storage->m_surfaces );
78 m_cylSurfacesCnv .setPStorage( &storage->m_surfaces );
79 m_discSurfacesCnv .setPStorage( &storage->m_surfaces );
80 m_perigeeSurfacesCnv .setPStorage( &storage->m_surfaces );
81 m_planeSurfacesCnv .setPStorage( &storage->m_surfaces );
82 m_lineSurfacesCnv .setPStorage( &storage->m_surfaces );
83 m_saggedLineSurfacesCnv .setPStorage( &storage->m_surfaces );
84
85 m_matEffectsBaseCnv. setPStorage( &storage->m_matEffectsBases );
86 m_energyLossCnv. setPStorage( &storage->m_energyLosses );
87 m_materialEffectsCnv. setPStorage( &storage->m_materialEffects );
88 m_estimatedBremCnv. setPStorage( &storage->m_estimatedBrems );
89
90 m_fitQualitiesCnv. setPStorage( &storage->m_fitQualities );
91 m_localDirectionsCnv. setPStorage( &storage->m_localDirections );
92 m_localPositionsCnv. setPStorage( &storage->m_localPositions );
93 m_localParametersCnv. setPStorage( &storage->m_localParameters );
94
95 // when reading (createTrans) these will be non-null if extension is present
96 // when writing, they will be null at first end set afterwards in createPersistentWithKey()
97 if( storage->m_inDetTrackExt ) m_inDetTrackCnv .setPStorage( storage->m_inDetTrackExt );
98 if( storage->m_muonMeasurementsExt ) m_muonMeasurementsCnv.setPStorage( storage->m_muonMeasurementsExt );
99 if( storage->m_muonCaloEnergiesExt ) m_muonCaloEnergiesCnv.setPStorage( storage->m_muonCaloEnergiesExt );
100}
virtual void setPStorage(PERS *storage) override

◆ setTLPersObject()

virtual void TopLevelTPCnvBaseP< Trk::TrackCollection_tlp6 >::setTLPersObject ( void * persObj)
inlineoverridevirtualinherited

Take ownership of the persistent object.

Also initialize all elemental TP converters to use that object.

Parameters
persObj[IN] the persistent object passed as void*

Definition at line 104 of file TopLevelTPCnvBaseP.h.

104 {
105 if( m_tlPersObject ) delete m_tlPersObject;
106 m_tlPersObject = reinterpret_cast<TL_PERS*>( persObj );
108 }

◆ transientTInfo()

virtual const std::type_info & TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::transientTInfo ( ) const
inlineoverridevirtualinherited

return C++ type id of the transient class this converter is for

Returns
std::type_info&

Implements ITPCnvBase.

Definition at line 166 of file TopLevelTPConverter.h.

166{ return typeid(TRANS); }

◆ transToPers()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::transToPers ( const TRANS * trans,
PERS * pers,
MsgStream & msg )
inlinevirtualinherited

Definition at line 210 of file TopLevelTPConverter.h.

210 {
211 this->setTLPersObject( pers );
212 m_mainConverter.virt_toPersistent(trans, msg);
213 this->clearTLPersObject();
214 }

◆ transToPersUntyped()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::transToPersUntyped ( const void * trans,
void * pers,
MsgStream & log )
inlineoverridevirtualinherited

Convert transient object representation to persistent.

Parameters
trans[IN] void* pointer to the transient object
pers[OUT] void* pointer to the empty persistent object
log[IN] output message stream

Implements ITPCnvBase.

Definition at line 178 of file TopLevelTPConverter.h.

178 {
179 transToPers( reinterpret_cast<const TRANS*>(trans), reinterpret_cast<PERS*>(pers), log );
180 }
virtual void transToPers(const TRANS *trans, PERS *pers, MsgStream &msg)

◆ transToPersWithKeyUntyped()

virtual void TopLevelTPConverter< TrackCollectionCnv_p4, Trk::TrackCollection_tlp6 >::transToPersWithKeyUntyped ( const void * trans,
void * pers,
const std::string & ,
MsgStream & log )
inlineoverridevirtualinherited

Convert transient object representation to persistent.

Parameters
trans[IN] void* pointer to the transient object
pers[OUT] void* pointer to the empty persistent object
key[IN] SG key of object being written.
log[IN] output message stream

Reimplemented from ITPCnvBase.

Definition at line 192 of file TopLevelTPConverter.h.

196 {
197 transToPers( reinterpret_cast<const TRANS*>(trans), reinterpret_cast<PERS*>(pers), log );
198 }

Member Data Documentation

◆ m_coneSurfacesCnv

ConeSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_coneSurfacesCnv
protected

Definition at line 66 of file TrackCollectionCnv_tlp6.h.

◆ m_converters

TPConverterTypeMap< ITPConverter > TopLevelTPCnvBase::m_converters
protectedinherited

Map of elemental TP converters indexed by transient typeid - used for writing.

Definition at line 180 of file TopLevelTPCnvBase.h.

◆ m_convIdMap

convIdMap_t TopLevelTPCnvBase::m_convIdMap
protectedinherited

Map of elemental TP converters indexed by their ID - used for reading.

Definition at line 177 of file TopLevelTPCnvBase.h.

◆ m_crotCnv

CompetingRIOsOnTrackCnv_p1 TrackCollectionCnv_tlp6::m_crotCnv
protected

Definition at line 62 of file TrackCollectionCnv_tlp6.h.

◆ m_cylSurfacesCnv

CylinderSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_cylSurfacesCnv
protected

Definition at line 67 of file TrackCollectionCnv_tlp6.h.

◆ m_discSurfacesCnv

DiscSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_discSurfacesCnv
protected

Definition at line 68 of file TrackCollectionCnv_tlp6.h.

◆ m_energyLossCnv

EnergyLossCnv_p1 TrackCollectionCnv_tlp6::m_energyLossCnv
protected

Definition at line 76 of file TrackCollectionCnv_tlp6.h.

◆ m_errorMatricesCnv

ErrorMatrixCnv_p1 TrackCollectionCnv_tlp6::m_errorMatricesCnv
protected

Definition at line 58 of file TrackCollectionCnv_tlp6.h.

◆ m_estimatedBremCnv

EstimatedBremOnTrackCnv_p1 TrackCollectionCnv_tlp6::m_estimatedBremCnv
protected

Definition at line 78 of file TrackCollectionCnv_tlp6.h.

◆ m_fitQualitiesCnv

FitQualityCnv_p1 TrackCollectionCnv_tlp6::m_fitQualitiesCnv
protected

Definition at line 74 of file TrackCollectionCnv_tlp6.h.

◆ m_inDetTrackCnv

InDetTrackCnv_tlp2 TrackCollectionCnv_tlp6::m_inDetTrackCnv
protected

Definition at line 86 of file TrackCollectionCnv_tlp6.h.

◆ m_lineSurfacesCnv

StraightLineSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_lineSurfacesCnv
protected

Definition at line 71 of file TrackCollectionCnv_tlp6.h.

◆ m_localDirectionsCnv

LocalDirectionCnv_p1 TrackCollectionCnv_tlp6::m_localDirectionsCnv
protected

Definition at line 80 of file TrackCollectionCnv_tlp6.h.

◆ m_localParametersCnv

LocalParametersCnv_p1 TrackCollectionCnv_tlp6::m_localParametersCnv
protected

Definition at line 82 of file TrackCollectionCnv_tlp6.h.

◆ m_localPositionsCnv

LocalPositionCnv_p1 TrackCollectionCnv_tlp6::m_localPositionsCnv
protected

Definition at line 81 of file TrackCollectionCnv_tlp6.h.

◆ m_mainConverter

Definition at line 217 of file TopLevelTPConverter.h.

◆ m_matEffectsBaseCnv

MaterialEffectsBaseCnv_p2 TrackCollectionCnv_tlp6::m_matEffectsBaseCnv
protected

Definition at line 75 of file TrackCollectionCnv_tlp6.h.

◆ m_materialEffectsCnv

MaterialEffectsOnTrackCnv_p2 TrackCollectionCnv_tlp6::m_materialEffectsCnv
protected

Definition at line 77 of file TrackCollectionCnv_tlp6.h.

◆ m_muonCaloEnergiesCnv

MuonCaloEnergyContainerCnv_tlp1 TrackCollectionCnv_tlp6::m_muonCaloEnergiesCnv
protected

Definition at line 87 of file TrackCollectionCnv_tlp6.h.

◆ m_muonMeasurementsCnv

MuonMeasurementsCnv_tlp2 TrackCollectionCnv_tlp6::m_muonMeasurementsCnv
protected

Definition at line 85 of file TrackCollectionCnv_tlp6.h.

◆ m_parametersCnv

TrackParametersCnv_p2 TrackCollectionCnv_tlp6::m_parametersCnv
protected

Definition at line 64 of file TrackCollectionCnv_tlp6.h.

◆ m_perigeeSurfacesCnv

PerigeeSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_perigeeSurfacesCnv
protected

Definition at line 69 of file TrackCollectionCnv_tlp6.h.

◆ m_planeSurfacesCnv

PlaneSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_planeSurfacesCnv
protected

Definition at line 70 of file TrackCollectionCnv_tlp6.h.

◆ m_pseudoMeasurementOnTrackCnv

PseudoMeasurementOnTrackCnv_p2 TrackCollectionCnv_tlp6::m_pseudoMeasurementOnTrackCnv
protected

Definition at line 60 of file TrackCollectionCnv_tlp6.h.

◆ m_registeredTLConverters

std::set<TopLevelTPCnvBase*> TopLevelTPCnvBase::m_registeredTLConverters
protectedinherited

Set top-level converters from which elemental TP converters were registered.

Definition at line 184 of file TopLevelTPCnvBase.h.

◆ m_saggedLineSurfacesCnv

SaggedLineSurfaceCnv_p2 TrackCollectionCnv_tlp6::m_saggedLineSurfacesCnv
protected

Definition at line 72 of file TrackCollectionCnv_tlp6.h.

◆ m_tlPersObject

The persistent object this conveter is working on.

Definition at line 128 of file TopLevelTPCnvBaseP.h.

◆ m_tracksCnv

TrackCnv_p4 TrackCollectionCnv_tlp6::m_tracksCnv
protected

Definition at line 55 of file TrackCollectionCnv_tlp6.h.

◆ m_trackStatesCnv

TrackStateOnSurfaceCnv_p3 TrackCollectionCnv_tlp6::m_trackStatesCnv
protected

Definition at line 56 of file TrackCollectionCnv_tlp6.h.

◆ m_typeIDCount

unsigned TopLevelTPCnvBase::m_typeIDCount
protectedinherited

Counter used to create typed IDs used in the transient Ref.

Definition at line 187 of file TopLevelTPCnvBase.h.

◆ m_vertexOnTrackCnv

VertexOnTrackCnv_p1 TrackCollectionCnv_tlp6::m_vertexOnTrackCnv
protected

Definition at line 61 of file TrackCollectionCnv_tlp6.h.


The documentation for this class was generated from the following files: