102 if (
this == &other)
return *
this;
115 while( __stackedTrack && __stackedTrack != &(fBoundary) )
117 __nextStackedTrack = __stackedTrack->
GetNext();
120 delete __stackedTrack;
131 __stackedTrack = __nextStackedTrack;
147 if(__trackListNode != 0)
153 exceptionDescription <<
"This track "<< __iTrack->
GetName() ;
154 exceptionDescription <<
" is already attached to a TrackList ";
166 __trackListNode->
fListRef = fListRef;
167 return __trackListNode;
173 return __trackListNode;
189 else if( __position == &fBoundary)
201 else if( __position == fpStart )
240 if(__toUnHook == fpFinish)
242 fpFinish = __previous;
244 if(__toUnHook == fpStart)
261 Hook(__position.fpNode, __node);
271 if(__trackListNode -> fListRef->
fpTrackList !=
this)
278 <<
" is not correctly linked to a TrackList."
280 <<
"You are probably trying to withdraw this track "
281 <<
"from the list but it probably does not belong to "
282 <<
"this track list." <<
G4endl;
283 G4Exception(
"G4TrackList::CheckFlag",
"G4TrackList002",
293 if(__trackListNode == 0)
296 exceptionDescription <<
"This track "<<
GetIT(__track)->
GetName() ;
297 exceptionDescription <<
" was not connected to any trackList ";
298 G4Exception(
"G4TrackList::Unflag",
"G4TrackList003",
305 return __trackListNode;
310 if( fNbTracks == 0 )
return 0;
312 Unhook( __aStackedTrack );
359 this->
erase(__track);
365 if(fNbTracks == 0)
return iterator(&fBoundary);
367 while (__first != __last)
370 __first =
pop(*__first);
379 if(fNbTracks == 0)
return iterator(&fBoundary);
381 while (__first != __last)
384 __first =
erase(*__first);
391 if(fNbTracks==0)
return;
393 if(__destination->fNbTracks == 0)
395 __destination->fpStart = this->fpStart ;
396 __destination->fpFinish = this->fpFinish ;
397 __destination->fNbTracks = this->fNbTracks;
399 __destination->fBoundary.
SetNext(fpStart);
402 __destination->fpFinish->
SetNext(&__destination->fBoundary);
403 __destination->fpStart->
SetPrevious(&__destination->fBoundary);
407 this->fpStart->
SetPrevious(__destination->fpFinish);
408 __destination->fpFinish->
SetNext(this->fpStart);
409 __destination->fBoundary.
SetPrevious(this->fpFinish);
410 this->fpFinish->
SetNext(&__destination->fBoundary);
412 __destination->fpFinish = this->fpFinish;
413 __destination->fNbTracks += this->fNbTracks;
420 this->fBoundary.
SetNext(&this->fBoundary);
G4IT * GetIT(const G4Track *track)
void SetTrackListNode(G4TrackListNode *node)
virtual const G4String & GetName() const =0
G4TrackListNode * GetTrackListNode()
void DeleteSecondaryVector()
G4TrackVector * GetfSecondary()
void SetNext(G4TrackListNode *node)
G4TrackListNode(G4Track *track=0)
void SetPrevious(G4TrackListNode *node)
G4ReferenceCountedHandle< _ListRef > fListRef
G4TrackListNode * GetPrevious()
G4TrackListNode * GetNext()
G4TrackListNode * CreateNode(G4Track *)
void Unhook(G4TrackListNode *)
void CheckFlag(G4TrackListNode *)
bool Holds(const G4Track *) const
void transferTo(G4TrackList *)
void Hook(G4TrackListNode *, G4TrackListNode *)
iterator insert(iterator, G4Track *)
G4TrackList_iterator iterator
void DeleteTrack(G4Track *)
G4TrackListNode * Flag(G4Track *)
G4TrackListNode * EraseTrackListNode(G4Track *)
iterator erase(G4Track *)
G4TrackListNode * Unflag(G4Track *)
const G4Step * GetStep() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription
G4TrackList * fpTrackList