Geant4  10.00.p03
G4TrackList Class Reference

G4TrackList is used by G4ITStepManager to save G4IT tracks only. More...

#include <G4TrackList.hh>

+ Collaboration diagram for G4TrackList:

Public Types

typedef G4TrackList_iterator iterator
 

Public Member Functions

 G4TrackList ()
 
 ~G4TrackList ()
 
G4Trackback ()
 
G4int size () const
 
bool empty () const
 
iterator insert (iterator, G4Track *)
 
iterator begin ()
 
iterator end ()
 
bool Holds (const G4Track *) const
 return an iterator that contains an empty node use for boundary checking only More...
 
void push_front (G4Track *__track)
 
void push_back (G4Track *__track)
 
G4Trackpop_back ()
 
void remove (G4Track *)
 
iterator pop (G4Track *)
 
iterator pop (iterator __first, iterator __last)
 
iterator erase (G4Track *)
 
iterator erase (iterator __first, iterator __last)
 Complexity = constant By storing the node inside the object, we avoid searching through all the container. More...
 
void transferTo (G4TrackList *)
 Complexity = linear in size between __first and __last. More...
 

Protected Member Functions

G4TrackListNodeCreateNode (G4Track *)
 Complexity = constant. More...
 
G4TrackListNodeFlag (G4Track *)
 
G4TrackListNodeUnflag (G4Track *)
 
void CheckFlag (G4TrackListNode *)
 
void DeleteTrack (G4Track *)
 
void Hook (G4TrackListNode *, G4TrackListNode *)
 
void Unhook (G4TrackListNode *)
 
G4TrackListNodeEraseTrackListNode (G4Track *)
 

Private Member Functions

 G4TrackList (const G4TrackList &other)
 
G4TrackListoperator= (const G4TrackList &right)
 
G4int operator== (const G4TrackList &right) const
 
G4int operator!= (const G4TrackList &right) const
 

Private Attributes

G4int fNbTracks
 
G4TrackListNodefpStart
 
G4TrackListNodefpFinish
 
G4ReferenceCountedHandle
< _ListRef
fListRef
 
G4TrackListNode fBoundary
 

Detailed Description

G4TrackList is used by G4ITStepManager to save G4IT tracks only.

Its advantage lies to a fast search of a track in this list.

Definition at line 106 of file G4TrackList.hh.

Member Typedef Documentation

Definition at line 120 of file G4TrackList.hh.

Constructor & Destructor Documentation

G4TrackList::G4TrackList ( )

Definition at line 77 of file G4TrackList.cc.

References G4TrackListNode::fAttachedToList, fBoundary, fListRef, fNbTracks, fpFinish, fpStart, G4TrackListNode::SetNext(), and G4TrackListNode::SetPrevious().

+ Here is the call graph for this function:

G4TrackList::~G4TrackList ( )

Definition at line 107 of file G4TrackList.cc.

References DeleteTrack(), fBoundary, fNbTracks, fpStart, G4TrackListNode::GetNext(), and G4TrackListNode::GetTrack().

+ Here is the call graph for this function:

G4TrackList::G4TrackList ( const G4TrackList other)
private

Definition at line 89 of file G4TrackList.cc.

References fListRef, fNbTracks, fpFinish, and fpStart.

Member Function Documentation

G4Track* G4TrackList::back ( )
inline

Definition at line 125 of file G4TrackList.hh.

References G4TrackListNode::GetTrack().

+ Here is the call graph for this function:

G4TrackList::iterator G4TrackList::begin ( )
inline

Definition at line 271 of file G4TrackList.hh.

References fpStart.

Referenced by push_front().

+ Here is the caller graph for this function:

void G4TrackList::CheckFlag ( G4TrackListNode __trackListNode)
protected

Definition at line 269 of file G4TrackList.cc.

References FatalErrorInArgument, fListRef, _ListRef::fpTrackList, G4endl, G4Exception(), GetIT(), G4IT::GetName(), G4TrackListNode::GetTrack(), and G4Track::GetTrackID().

Referenced by Unflag().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4TrackListNode * G4TrackList::CreateNode ( G4Track __track)
protected

Complexity = constant.

Definition at line 170 of file G4TrackList.cc.

References Flag().

Referenced by insert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4TrackList::DeleteTrack ( G4Track __track)
protected

Definition at line 335 of file G4TrackList.cc.

References G4Step::DeleteSecondaryVector(), G4Step::GetfSecondary(), and G4Track::GetStep().

Referenced by erase(), and ~G4TrackList().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G4TrackList::empty ( ) const
inline

Definition at line 267 of file G4TrackList.hh.

References fNbTracks.

G4TrackList::iterator G4TrackList::end ( )
inline

Definition at line 274 of file G4TrackList.hh.

References fBoundary.

Referenced by push_back().

+ Here is the caller graph for this function:

G4TrackList::iterator G4TrackList::erase ( G4Track __track)

Definition at line 346 of file G4TrackList.cc.

References DeleteTrack(), and EraseTrackListNode().

Referenced by erase(), and remove().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4TrackList::iterator G4TrackList::erase ( iterator  __first,
iterator  __last 
)

Complexity = constant By storing the node inside the object, we avoid searching through all the container.

Definition at line 377 of file G4TrackList.cc.

References erase(), fBoundary, and fNbTracks.

+ Here is the call graph for this function:

G4TrackListNode * G4TrackList::EraseTrackListNode ( G4Track __track)
protected

Definition at line 325 of file G4TrackList.cc.

References GetIT(), G4TrackListNode::GetNext(), G4IT::SetTrackListNode(), Unflag(), and Unhook().

Referenced by erase().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4TrackListNode * G4TrackList::Flag ( G4Track __track)
protected

Definition at line 142 of file G4TrackList.cc.

References FatalErrorInArgument, G4TrackListNode::fAttachedToList, G4TrackListNode::fListRef, fListRef, G4Exception(), GetIT(), G4IT::GetName(), G4IT::GetTrackListNode(), and G4IT::SetTrackListNode().

Referenced by CreateNode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool G4TrackList::Holds ( const G4Track track) const

return an iterator that contains an empty node use for boundary checking only

Definition at line 137 of file G4TrackList.cc.

References fListRef, _ListRef::fpTrackList, and GetIT().

+ Here is the call graph for this function:

void G4TrackList::Hook ( G4TrackListNode __position,
G4TrackListNode __toHook 
)
protected

Definition at line 176 of file G4TrackList.cc.

References fBoundary, fNbTracks, fpFinish, fpStart, G4TrackListNode::GetPrevious(), G4TrackListNode::SetNext(), and G4TrackListNode::SetPrevious().

Referenced by insert().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4TrackList::iterator G4TrackList::insert ( G4TrackList::iterator  __position,
G4Track __track 
)

Definition at line 258 of file G4TrackList.cc.

References CreateNode(), G4TrackList_iterator::fpNode, and Hook().

Referenced by push_back(), and push_front().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4int G4TrackList::operator!= ( const G4TrackList right) const
private
G4TrackList & G4TrackList::operator= ( const G4TrackList right)
private

Definition at line 99 of file G4TrackList.cc.

G4int G4TrackList::operator== ( const G4TrackList right) const
private
G4TrackList::iterator G4TrackList::pop ( G4Track __track)

Definition at line 317 of file G4TrackList.cc.

References G4TrackListNode::GetNext(), Unflag(), and Unhook().

Referenced by pop().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4TrackList::iterator G4TrackList::pop ( iterator  __first,
iterator  __last 
)

Definition at line 363 of file G4TrackList.cc.

References fBoundary, fNbTracks, and pop().

+ Here is the call graph for this function:

G4Track * G4TrackList::pop_back ( )

Definition at line 308 of file G4TrackList.cc.

References fNbTracks, fpFinish, G4TrackListNode::GetTrack(), Unflag(), and Unhook().

+ Here is the call graph for this function:

void G4TrackList::push_back ( G4Track __track)
inline

Definition at line 284 of file G4TrackList.hh.

References end(), and insert().

+ Here is the call graph for this function:

void G4TrackList::push_front ( G4Track __track)
inline

Definition at line 279 of file G4TrackList.hh.

References begin(), and insert().

+ Here is the call graph for this function:

void G4TrackList::remove ( G4Track __track)

Definition at line 357 of file G4TrackList.cc.

References erase().

+ Here is the call graph for this function:

G4int G4TrackList::size ( ) const
inline

Definition at line 131 of file G4TrackList.hh.

References fNbTracks.

void G4TrackList::transferTo ( G4TrackList __destination)

Complexity = linear in size between __first and __last.

Definition at line 389 of file G4TrackList.cc.

References fBoundary, fListRef, fNbTracks, fpFinish, fpStart, _ListRef::fpTrackList, G4TrackListNode::SetNext(), and G4TrackListNode::SetPrevious().

+ Here is the call graph for this function:

G4TrackListNode * G4TrackList::Unflag ( G4Track __track)
protected

Definition at line 288 of file G4TrackList.cc.

References CheckFlag(), FatalErrorInArgument, G4TrackListNode::fAttachedToList, G4TrackListNode::fListRef, G4Exception(), GetIT(), G4IT::GetName(), and G4IT::GetTrackListNode().

Referenced by EraseTrackListNode(), pop(), and pop_back().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4TrackList::Unhook ( G4TrackListNode __toUnHook)
protected

Definition at line 225 of file G4TrackList.cc.

References fNbTracks, fpFinish, fpStart, G4TrackListNode::GetNext(), G4TrackListNode::GetPrevious(), G4TrackListNode::SetNext(), and G4TrackListNode::SetPrevious().

Referenced by EraseTrackListNode(), pop(), and pop_back().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

G4TrackListNode G4TrackList::fBoundary
private

Definition at line 114 of file G4TrackList.hh.

Referenced by end(), erase(), G4TrackList(), Hook(), pop(), transferTo(), and ~G4TrackList().

G4ReferenceCountedHandle<_ListRef> G4TrackList::fListRef
private

Definition at line 112 of file G4TrackList.hh.

Referenced by CheckFlag(), Flag(), G4TrackList(), Holds(), and transferTo().

G4int G4TrackList::fNbTracks
private
G4TrackListNode* G4TrackList::fpFinish
private

Definition at line 111 of file G4TrackList.hh.

Referenced by G4TrackList(), Hook(), pop_back(), transferTo(), and Unhook().

G4TrackListNode* G4TrackList::fpStart
private

Definition at line 110 of file G4TrackList.hh.

Referenced by begin(), G4TrackList(), Hook(), transferTo(), Unhook(), and ~G4TrackList().


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