ATLAS Offline Software
Classes | Public Types | Public Member Functions | List of all members
Trk::IPRD_AssociationTool Class Referenceabstract

Interface for handling the mapping between Trk::Track and Trk::PrepRawData. More...

#include <IPRD_AssociationTool.h>

Inheritance diagram for Trk::IPRD_AssociationTool:
Collaboration diagram for Trk::IPRD_AssociationTool:

Classes

struct  Maps
 The mutable state of the tool. More...
 

Public Types

using PrepRawDataTrackMap = PRDtoTrackMap::PrepRawDataTrackMap
 
using PRD_MapIt = PrepRawDataTrackMap::iterator
 
using ConstPRD_MapIt = PrepRawDataTrackMap::const_iterator
 
using PrepRawDataTrackMapRange = std::pair< ConstPRD_MapIt, ConstPRD_MapIt >
 the first element is the beginning iterator of the range, the second is the end More...
 
using TrackPrepRawDataMap = PRDtoTrackMap::TrackPrepRawDataMap
 
typedef std::set< const Track * > TrackSet
 

Public Member Functions

 DeclareInterfaceID (IPRD_AssociationTool, 1, 0)
 
virtual StatusCode addPRDs (Maps &maps, const Track &track) const =0
 add the PRDs from this track to maps More...
 
virtual StatusCode addPRDs (const Track &track)=0
 add the PRDs from this track to the store More...
 
virtual StatusCode removePRDs (Maps &maps, const Track &track) const =0
 remove the PRDs from this track from the maps More...
 
virtual StatusCode removePRDs (const Track &track)=0
 remove the PRDs from this track from the store More...
 
virtual bool isUsed (const Maps &maps, const PrepRawData &prd) const =0
 does this PRD belong to at least one track in maps? More...
 
virtual bool isUsed (const PrepRawData &prd) const =0
 does this PRD belong to at least one track? More...
 
virtual bool isShared (const Maps &maps, const PrepRawData &prd) const =0
 does this PRD belong to more than one track in maps? More...
 
virtual bool isShared (const PrepRawData &prd) const =0
 does this PRD belong to more than one track? More...
 
virtual std::vector< const PrepRawData * > getPrdsOnTrack (const Track &track) const =0
 returns a vector of PRDs belonging to the passed track. More...
 
virtual std::vector< const PrepRawData * > getPrdsOnTrack (const Maps &maps, const Track &track) const =0
 
virtual TrackSet findConnectedTracks (const Track &track) const =0
 Return transient sets of connected and disconnected tracks, AND remove disconnected tracks from this tool. More...
 
virtual TrackSet findConnectedTracks (const Maps &maps, const Track &track) const =0
 
virtual PrepRawDataTrackMapRange onTracks (const PrepRawData &prd) const =0
 get the Tracks associated with this PrepRawData. More...
 
virtual PrepRawDataTrackMapRange onTracks (const Maps &maps, const PrepRawData &prd) const =0
 
virtual void reset ()=0
 this may well go, but at the moment it resets the tool More...
 

Detailed Description

Interface for handling the mapping between Trk::Track and Trk::PrepRawData.

The tool is used to keep track of a collection of PrepRawData belonging to Tracks. The user is responsible for informing the tool about the Tracks in question, by using :

Once the information is in the store, various methods can be used to query the relationship between tracks and the prep raw data - for example, isShared().

Currently, reset() should be used to clear the tool before use.

Author
Edwar.nosp@m.d.Mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch

Definition at line 36 of file IPRD_AssociationTool.h.

Member Typedef Documentation

◆ ConstPRD_MapIt

using Trk::IPRD_AssociationTool::ConstPRD_MapIt = PrepRawDataTrackMap::const_iterator

Definition at line 45 of file IPRD_AssociationTool.h.

◆ PRD_MapIt

using Trk::IPRD_AssociationTool::PRD_MapIt = PrepRawDataTrackMap::iterator

Definition at line 44 of file IPRD_AssociationTool.h.

◆ PrepRawDataTrackMap

Definition at line 43 of file IPRD_AssociationTool.h.

◆ PrepRawDataTrackMapRange

the first element is the beginning iterator of the range, the second is the end

Definition at line 48 of file IPRD_AssociationTool.h.

◆ TrackPrepRawDataMap

Definition at line 49 of file IPRD_AssociationTool.h.

◆ TrackSet

Definition at line 52 of file IPRD_AssociationTool.h.

Member Function Documentation

◆ addPRDs() [1/2]

virtual StatusCode Trk::IPRD_AssociationTool::addPRDs ( const Track track)
pure virtual

add the PRDs from this track to the store

◆ addPRDs() [2/2]

virtual StatusCode Trk::IPRD_AssociationTool::addPRDs ( Maps maps,
const Track track 
) const
pure virtual

add the PRDs from this track to maps

◆ DeclareInterfaceID()

Trk::IPRD_AssociationTool::DeclareInterfaceID ( IPRD_AssociationTool  ,
,
 
)

◆ findConnectedTracks() [1/2]

virtual TrackSet Trk::IPRD_AssociationTool::findConnectedTracks ( const Maps maps,
const Track track 
) const
pure virtual

◆ findConnectedTracks() [2/2]

virtual TrackSet Trk::IPRD_AssociationTool::findConnectedTracks ( const Track track) const
pure virtual

Return transient sets of connected and disconnected tracks, AND remove disconnected tracks from this tool.

i.e. get (transient) set of tracks which share/don't share PrepRawData, and remove those tracks that are disconnected from this tool's caches.

Returns
transient set of connected and disconnected tracks. NB the sets are returned by reference for speed, but they will be reset each time this method is called (whether in your algorithm or that of another), hence they are transient. You MUST** copy them if you need them to have an extended lifetime.

◆ getPrdsOnTrack() [1/2]

virtual std::vector<const PrepRawData*> Trk::IPRD_AssociationTool::getPrdsOnTrack ( const Maps maps,
const Track track 
) const
pure virtual

◆ getPrdsOnTrack() [2/2]

virtual std::vector<const PrepRawData*> Trk::IPRD_AssociationTool::getPrdsOnTrack ( const Track track) const
pure virtual

returns a vector of PRDs belonging to the passed track.

It's basically for the convenience of users and is created purely from the passed track. i.e. there is no caching if you do it multiple times on the same track, you're being inefficient!!

Parameters
trackwill be iterated through and all PrepRawData added to a vector
Returns
vector of PrepRawData* belonging to 'track'. The PrepRawData must NOT be deleted - they belong to the Track (and thus the event).

◆ isShared() [1/2]

virtual bool Trk::IPRD_AssociationTool::isShared ( const Maps maps,
const PrepRawData prd 
) const
pure virtual

does this PRD belong to more than one track in maps?

Parameters
prdthe PrepRawData in question
Returns
true if 'prd' exists on more than one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added to maps with addPRDs()

◆ isShared() [2/2]

virtual bool Trk::IPRD_AssociationTool::isShared ( const PrepRawData prd) const
pure virtual

does this PRD belong to more than one track?

Parameters
prdthe PrepRawData in question
Returns
true if 'prd' exists on more than one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added with addPRDs()

◆ isUsed() [1/2]

virtual bool Trk::IPRD_AssociationTool::isUsed ( const Maps maps,
const PrepRawData prd 
) const
pure virtual

does this PRD belong to at least one track in maps?

Parameters
prdthe PrepRawData in question
Returns
true if 'prd' exists in at least one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added to maps with addPRDs()

◆ isUsed() [2/2]

virtual bool Trk::IPRD_AssociationTool::isUsed ( const PrepRawData prd) const
pure virtual

does this PRD belong to at least one track?

Parameters
prdthe PrepRawData in question
Returns
true if 'prd' exists in at least one track (of course PRD_AssociationTool can only give information about tracks it knows about i.e. that were added with addPRDs()

◆ onTracks() [1/2]

virtual PrepRawDataTrackMapRange Trk::IPRD_AssociationTool::onTracks ( const Maps maps,
const PrepRawData prd 
) const
pure virtual

◆ onTracks() [2/2]

virtual PrepRawDataTrackMapRange Trk::IPRD_AssociationTool::onTracks ( const PrepRawData prd) const
pure virtual

get the Tracks associated with this PrepRawData.

IMPORTANT: Please use the typedefs IPRD_AssociationTool::PrepRawDataTrackMapRange and IPRD_AssociationTool::ConstPRD_MapIt to access the tracks, as the internal representation may change.

◆ removePRDs() [1/2]

virtual StatusCode Trk::IPRD_AssociationTool::removePRDs ( const Track track)
pure virtual

remove the PRDs from this track from the store

Parameters
trackall PRDs from 'track' will be removed from the PRD_AssociationTool's internal store.

◆ removePRDs() [2/2]

virtual StatusCode Trk::IPRD_AssociationTool::removePRDs ( Maps maps,
const Track track 
) const
pure virtual

remove the PRDs from this track from the maps

Parameters
trackall PRDs from 'track' will be removed from maps

◆ reset()

virtual void Trk::IPRD_AssociationTool::reset ( )
pure virtual

this may well go, but at the moment it resets the tool


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