FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
RhoCandListIterator Class Reference

#include <RhoCandListIterator.h>

Inheritance diagram for RhoCandListIterator:

Public Member Functions

 RhoCandListIterator (RhoCandList &)
 
 RhoCandListIterator (const RhoCandListIterator &)
 
 ~RhoCandListIterator ()
 
RhoCandidateNext ()
 
RhoCandidatePrevious ()
 
RhoCandidateCurrent ()
 
int Index () const
 
void Rewind ()
 
void Skip (int)
 
void SkipAll ()
 

Private Attributes

RhoCandListfList
 
int fCurrentIndex
 Pointer to the associated list. More...
 

Detailed Description

Definition at line 21 of file RhoCandListIterator.h.

Constructor & Destructor Documentation

RhoCandListIterator::RhoCandListIterator ( RhoCandList li)

Definition at line 22 of file RhoCandListIterator.cxx.

22  :
23  fList ( &li ), fCurrentIndex ( 0 ) {}
int fCurrentIndex
Pointer to the associated list.
RhoCandListIterator::RhoCandListIterator ( const RhoCandListIterator li)

Definition at line 25 of file RhoCandListIterator.cxx.

25  :
26  TObject(li), fList ( li.fList ), fCurrentIndex ( li.fCurrentIndex ) {}
int fCurrentIndex
Pointer to the associated list.
RhoCandListIterator::~RhoCandListIterator ( )

Definition at line 28 of file RhoCandListIterator.cxx.

28 {}

Member Function Documentation

RhoCandidate * RhoCandListIterator::Current ( )

Definition at line 36 of file RhoCandListIterator.cxx.

References fCurrentIndex, fList, RhoCandList::Get(), and RhoCandList::GetNumberOfTracks().

37 {
39 }
int fCurrentIndex
Pointer to the associated list.
Int_t GetNumberOfTracks() const
Definition: RhoCandList.cxx:72
RhoCandidate * Get(Int_t)
Definition: RhoCandList.cxx:94
int RhoCandListIterator::Index ( ) const

Definition at line 57 of file RhoCandListIterator.cxx.

References fCurrentIndex.

58 {
59  return fCurrentIndex;
60 }
int fCurrentIndex
Pointer to the associated list.
RhoCandidate * RhoCandListIterator::Next ( )
RhoCandidate * RhoCandListIterator::Previous ( )

Definition at line 41 of file RhoCandListIterator.cxx.

References fCurrentIndex, fList, RhoCandList::Get(), and RhoCandList::GetNumberOfTracks().

42 {
44  return fCurrentIndex ? fList->Get ( --fCurrentIndex ) : 0;
45 }
int fCurrentIndex
Pointer to the associated list.
Int_t GetNumberOfTracks() const
Definition: RhoCandList.cxx:72
RhoCandidate * Get(Int_t)
Definition: RhoCandList.cxx:94
void RhoCandListIterator::Rewind ( )

Definition at line 47 of file RhoCandListIterator.cxx.

References fCurrentIndex.

Referenced by Skip().

48 {
49  fCurrentIndex = 0;
50 }
int fCurrentIndex
Pointer to the associated list.
void RhoCandListIterator::Skip ( int  si)

Definition at line 62 of file RhoCandListIterator.cxx.

References fCurrentIndex, and Rewind().

63 {
64  if ( si + int ( fCurrentIndex ) < 0 ) {
65  Rewind();
66  } else {
67  fCurrentIndex += si;
68  }
69 }
int fCurrentIndex
Pointer to the associated list.
void RhoCandListIterator::SkipAll ( )

Definition at line 52 of file RhoCandListIterator.cxx.

References fCurrentIndex, fList, and RhoCandList::GetNumberOfTracks().

53 {
55 }
int fCurrentIndex
Pointer to the associated list.
Int_t GetNumberOfTracks() const
Definition: RhoCandList.cxx:72

Member Data Documentation

int RhoCandListIterator::fCurrentIndex
private

Pointer to the associated list.

Definition at line 65 of file RhoCandListIterator.h.

Referenced by Current(), Index(), Next(), Previous(), Rewind(), Skip(), and SkipAll().

RhoCandList* RhoCandListIterator::fList
private

Definition at line 63 of file RhoCandListIterator.h.

Referenced by Current(), Next(), Previous(), and SkipAll().


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