Logo ROOT   6.16/01
Reference Guide
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
34// Pin vtable
36{
37 fRows = table;
38}
39
41
42////////////////////////////////////////////////////////////////////////////////
43///to be documented
44
46{
47 fTableSorter = 0;
48 fKey = 0;
49 fFirstRow = -1;
50 fSize = 0;
51 fRows = 0;
52}
53
54////////////////////////////////////////////////////////////////////////////////
55///to be documented
56
58{
59 fTableSorter = 0;
60 fKey = 0;
61 fFirstRow = -1;
62 fSize = 0;
63 fRows = 0;
64 if (sorter) {
65 fTableSorter = sorter;
66 fKey = key;
67 fSize = sorter->CountKey(fKey,0,kTRUE,&fFirstRow);
69 }
70 SetOption(opt);
71}
72
73////////////////////////////////////////////////////////////////////////////////
74///to be documented
75
77{
78 fTableSorter = 0;
79 fKey = 0;
80 fFirstRow = -1;
81 fSize = 0;
82 fRows = 0;
83 if (sorter) {
84 fTableSorter = sorter;
85 fKey = sorter->GetKeyAddress(keyIndex);
86 fSize = sorter->CountKey(fKey,keyIndex,kFALSE,&fFirstRow);
88 }
89 SetOption(opt);
90}
91
92////////////////////////////////////////////////////////////////////////////////
93/// Compute distance from point px,py to a 3-D points.
94///
95/// Compute the closest distance of approach from point px,py to each segment
96/// of the polyline.
97/// Returns when the distance found is below DistanceMaximum.
98/// The distance is computed in pixels units.
99
101{
102 return -1;
103}
int Int_t
Definition: RtypesCore.h:41
const Bool_t kFALSE
Definition: RtypesCore.h:88
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassImp(name)
Definition: Rtypes.h:363
virtual void * GetTable()
Definition: TTablePoints.h:56
Int_t fFirstRow
Definition: TTablePoints.h:24
void * fRows
Definition: TTablePoints.h:26
TTableSorter * fTableSorter
Definition: TTablePoints.h:22
virtual void SetTablePointer(void *table)
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.
TTablePoints()
to be documented
virtual void SetOption(Option_t *)
Definition: TTablePoints.h:43
virtual const void * GetKeyAddress(Int_t indx)
Definition: TTableSorter.h:172
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".
void table()
Definition: table.C:85