ROOT
6.10/00
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
Namespaces
All Classes
Files
Release Notes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
misc
table
src
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
ClassImp
(
TTablePoints
)
35
36
////////////////////////////////////////////////////////////////////////////////
37
///to be documented
38
39
TTablePoints
::
TTablePoints
()
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
);
62
SetTablePointer
(
GetTable
());
63
}
64
SetOption
(opt);
65
}
66
67
////////////////////////////////////////////////////////////////////////////////
68
///to be documented
69
70
TTablePoints::TTablePoints
(
TTableSorter
*sorter,
Int_t
keyIndex,
Option_t
*opt)
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
);
81
SetTablePointer
(
GetTable
());
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
97
Int_t
TTablePoints::DistancetoPrimitive
(
Int_t
/*px*/
,
Int_t
/*py*/
)
98
{
99
return
-1;
100
}
TTablePoints::fTableSorter
TTableSorter * fTableSorter
Definition:
TTablePoints.h:22
TTablePoints::TTablePoints
TTablePoints()
to be documented
Definition:
TTablePoints.cxx:39
Option_t
const char Option_t
Definition:
RtypesCore.h:62
TTablePoints::GetTable
virtual void * GetTable()
Definition:
TTablePoints.h:59
Int_t
int Int_t
Definition:
RtypesCore.h:41
TTablePoints::fKey
const void * fKey
Definition:
TTablePoints.h:23
TTablePoints::DistancetoPrimitive
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-* *-* ====================...
Definition:
TTablePoints.cxx:97
TTablePoints.h
TTableSorter::GetKeyAddress
virtual const void * GetKeyAddress(Int_t indx)
Definition:
TTableSorter.h:172
TTablePoints::fRows
void * fRows
Definition:
TTablePoints.h:26
TTablePoints::fSize
Int_t fSize
Definition:
TTablePoints.h:25
TTablePoints
Definition:
TTablePoints.h:19
kFALSE
const Bool_t kFALSE
Definition:
RtypesCore.h:92
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:336
TTablePoints::SetOption
virtual void SetOption(Option_t *)
Definition:
TTablePoints.h:43
TTablePoints::fFirstRow
Int_t fFirstRow
Definition:
TTablePoints.h:24
TTableSorter
Definition:
TTableSorter.h:46
TTablePoints::SetTablePointer
virtual void SetTablePointer(void *table)
Definition:
TTablePoints.h:51
TTableSorter::CountKey
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".
Definition:
TTableSorter.cxx:692
kTRUE
const Bool_t kTRUE
Definition:
RtypesCore.h:91