FairRoot/PandaRoot
RhoCandListIterator.cxx
Go to the documentation of this file.
1 // //
3 // RhoCandListIterator //
4 // //
5 // Iterator class for RhoCandList //
6 // //
7 // Author List: //
8 // Marcel Kunze, RUB, Feb. 99 //
9 // Copyright (C) 1999-2001, Ruhr-University Bochum. //
10 // Ralf Kliemt, HIM/GSI Feb.2013 (Cleanup & Restructuring) //
11 // //
13 
15 #include "RhoBase/RhoCandList.h"
16 #include "RhoBase/RhoCandidate.h"
17 
19 
20 using namespace std;
21 
23  fList ( &li ), fCurrentIndex ( 0 ) {}
24 
26  TObject(li), fList ( li.fList ), fCurrentIndex ( li.fCurrentIndex ) {}
27 
29 
31 {
32  if ( fList==0 ) { return 0; }
34 }
35 
37 {
39 }
40 
42 {
44  return fCurrentIndex ? fList->Get ( --fCurrentIndex ) : 0;
45 }
46 
48 {
49  fCurrentIndex = 0;
50 }
51 
53 {
55 }
56 
58 {
59  return fCurrentIndex;
60 }
61 
63 {
64  if ( si + int ( fCurrentIndex ) < 0 ) {
65  Rewind();
66  } else {
67  fCurrentIndex += si;
68  }
69 }
RhoCandListIterator(RhoCandList &)
int fCurrentIndex
Pointer to the associated list.
RhoCandidate * Current()
Int_t GetNumberOfTracks() const
Definition: RhoCandList.cxx:72
ClassImp(PndAnaContFact)
RhoCandidate * Get(Int_t)
Definition: RhoCandList.cxx:94
RhoCandidate * Previous()