Logo ROOT   6.16/01
Reference Guide
TTableIter.h
Go to the documentation of this file.
1// @(#)root/table:$Id$
2// Author: Valery Fine(fine@bnl.gov) 03/12/99
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11#ifndef ROOT_TTableIter
12#define ROOT_TTableIter
13
14//////////////////////////////////////////////////////////////////////////
15// //
16// TTableIter - class iterator to loop over sorted TTable's //
17// //
18//////////////////////////////////////////////////////////////////////////
19
20#include "TObject.h"
21
22class TTableSorter;
23
24class TTableIter : public TObject {
25private:
30 TTableIter(const TTableIter &org); // Intentioanlly not implemented
31 TTableIter &operator=(const TTableIter &org); // Intentioanlly not implemented
32protected:
34
35public:
36 TTableIter(const TTableSorter *table, Float_t &keyvalue);
37 TTableIter(const TTableSorter *table, Double_t &keyvalue);
38 TTableIter(const TTableSorter *table, Int_t &keyvalue);
39 TTableIter(const TTableSorter *table, Long_t &keyvalue);
40 TTableIter(const TTableSorter *table, Short_t &keyvalue);
41
42 virtual ~TTableIter(){;}
43
44 Int_t CountKey(Float_t &keyvalue);
45 Int_t CountKey(Long_t &keyvalue);
46 Int_t CountKey(Int_t &keyvalue);
47 Int_t CountKey(Short_t &keyvalue);
48 Int_t CountKey(Double_t &keyvalue);
49
50 Int_t GetNRows() const;
51 Int_t Next();
52 Int_t Next(Int_t idx);
53 Int_t Reset(Int_t indx=0);
56 ClassDef(TTableIter,0) // Iterator over "sorted" TTable objects
57};
58
59//_____________________________________________________________________
60inline Int_t TTableIter::GetNRows() const { return fTotalKeys;}
61//_____________________________________________________________________
62inline Int_t TTableIter::operator()() { return Next();}
63
64//_____________________________________________________________________
65inline Int_t TTableIter::operator[](Int_t idx) { return Next(idx);}
66
67#endif
int Int_t
Definition: RtypesCore.h:41
long Long_t
Definition: RtypesCore.h:50
short Short_t
Definition: RtypesCore.h:35
double Double_t
Definition: RtypesCore.h:55
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:324
Mother of all ROOT objects.
Definition: TObject.h:37
Int_t operator()()
Definition: TTableIter.h:62
Int_t Reset(Int_t indx=0)
to be documented
Definition: TTableIter.cxx:139
TTableIter & operator=(const TTableIter &org)
Int_t operator[](Int_t idx)
Definition: TTableIter.h:65
Int_t Next()
to be documented
Definition: TTableIter.cxx:115
Int_t GetNRows() const
Definition: TTableIter.h:60
virtual ~TTableIter()
Definition: TTableIter.h:42
Int_t CountKey(Float_t &keyvalue)
to be documented
Definition: TTableIter.cxx:71
TTableIter(const TTableIter &org)
Int_t fTotalKeys
Definition: TTableIter.h:28
Int_t fFirstIndx
Definition: TTableIter.h:29
const TTableSorter * fTableSorter
Definition: TTableIter.h:26
Int_t fIndx
Definition: TTableIter.h:27
void table()
Definition: table.C:85
#define org(otri, vertexptr)
Definition: triangle.c:1037