ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TTablePoints.cxx
Go to the documentation of this file.
1 // @(#)root/table:$Id$
2 // Author: Valery Fine 14/05/99 (E-mail: fine@bnl.gov)
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 
12 #include "TTablePoints.h"
13 
14 ///////////////////////////////////////////////////////////////////////////////////////
15 // //
16 // Defines the TTable as an element of "event" geometry //
17 // //
18 // +SEQ,TTablePoints. //
19 // +SEQ,T<your_table_name_here>. //
20 // //
21 // class T<your_table_name_here>_Points : public TTablePoints //
22 // { //
23 // public: //
24 // T<your_table_name_here>_Points(TTableSorter *sorter,const void *key,Option_t *opt):
25 // TTablePoints(sorter,key,opt){} //
26 // virtual ~T<your_table_name_here>_Points(){} // default destructor //
27 // virtual Float_t GetX(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <x>;} //
28 // virtual Float_t GetY(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <y>;} //
29 // virtual Float_t GetZ(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <z>;} //
30 // }; //
31 // //
32 ///////////////////////////////////////////////////////////////////////////////////////
33 
35 
36 ////////////////////////////////////////////////////////////////////////////////
37 ///to be documented
38 
40 {
41  fTableSorter = 0;
42  fKey = 0;
43  fFirstRow = -1;
44  fSize = 0;
45  fRows = 0;
46 }
47 
48 ////////////////////////////////////////////////////////////////////////////////
49 ///to be documented
50 
51 TTablePoints::TTablePoints(TTableSorter *sorter,const void *key,Option_t *opt)
52 {
53  fTableSorter = 0;
54  fKey = 0;
55  fFirstRow = -1;
56  fSize = 0;
57  fRows = 0;
58  if (sorter) {
59  fTableSorter = sorter;
60  fKey = key;
61  fSize = sorter->CountKey(fKey,0,kTRUE,&fFirstRow);
63  }
64  SetOption(opt);
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 ///to be documented
69 
71 {
72  fTableSorter = 0;
73  fKey = 0;
74  fFirstRow = -1;
75  fSize = 0;
76  fRows = 0;
77  if (sorter) {
78  fTableSorter = sorter;
79  fKey = sorter->GetKeyAddress(keyIndex);
80  fSize = sorter->CountKey(fKey,keyIndex,kFALSE,&fFirstRow);
82  }
83  SetOption(opt);
84 }
85 
86 ////////////////////////////////////////////////////////////////////////////////
87 ///*-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-*
88 ///*-* =====================================================
89 ///*-*
90 ///*-* Compute the closest distance of approach from point px,py to each segment
91 ///*-* of the polyline.
92 ///*-* Returns when the distance found is below DistanceMaximum.
93 ///*-* The distance is computed in pixels units.
94 ///*-*
95 ///*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
96 
98 {
99  return -1;
100 }
TTableSorter * fTableSorter
Definition: TTablePoints.h:22
const char Option_t
Definition: RtypesCore.h:62
virtual void * GetTable()
Definition: TTablePoints.h:59
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: Rtypes.h:92
TGNumberEntry * fRows
const void * fKey
Definition: TTablePoints.h:23
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-* *-* ====================...
virtual const void * GetKeyAddress(Int_t indx)
Definition: TTableSorter.h:172
void * fRows
Definition: TTablePoints.h:26
ClassImp(TTablePoints) TTablePoints
to be documented
virtual void SetOption(Option_t *)
Definition: TTablePoints.h:43
Int_t fFirstRow
Definition: TTablePoints.h:24
virtual void SetTablePointer(void *table)
Definition: TTablePoints.h:51
virtual Int_t CountKey(const void *key, Int_t firstIndx=0, Bool_t bSearch=kTRUE, Int_t *firstRow=0) const
CountKey counts the number of rows with the key value equal "key".
const Bool_t kTRUE
Definition: Rtypes.h:91