// @(#)root/table:$Id$
// Author: Valery Fine   14/05/99  (E-mail: fine@bnl.gov)

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TTablePoints.h"

///////////////////////////////////////////////////////////////////////////////////////
//                                                                                   //
//   Defines the TTable as an element of "event" geometry                            //
//                                                                                   //
//  +SEQ,TTablePoints.                                                               //
//  +SEQ,T<your_table_name_here>.                                                    //
//                                                                                   //
//  class T<your_table_name_here>_Points : public TTablePoints                       //
//  {                                                                                //
//    public:                                                                        //
//       T<your_table_name_here>_Points(TTableSorter *sorter,const void *key,Option_t *opt):
//                TTablePoints(sorter,key,opt){}                                     //
//       virtual  ~T<your_table_name_here>_Points(){} // default destructor          //
//       virtual Float_t GetX(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <x>;}               //
//       virtual Float_t GetY(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <y>;}               //
//       virtual Float_t GetZ(Int_t indx) { return ((<your_table_name_here>_st *)fRows)[Indx(idx)]-> <z>;}               //
//  };                                                                               //
//                                                                                   //
///////////////////////////////////////////////////////////////////////////////////////

ClassImp(TTablePoints)

//____________________________________________________________________________
TTablePoints::TTablePoints()
{
   //to be documented
   fTableSorter =  0;
   fKey         =  0;
   fFirstRow    = -1;
   fSize        =  0;
   fRows        =  0;
}

//____________________________________________________________________________
TTablePoints::TTablePoints(TTableSorter *sorter,const void *key,Option_t *opt)
{
   //to be documented
   fTableSorter =  0;
   fKey         =  0;
   fFirstRow    = -1;
   fSize        =  0;
   fRows        =  0;
   if (sorter) {
      fTableSorter = sorter;
      fKey         = key;
      fSize        = sorter->CountKey(fKey,0,kTRUE,&fFirstRow);
      SetTablePointer(GetTable());
   }
   SetOption(opt);
}

//____________________________________________________________________________
TTablePoints::TTablePoints(TTableSorter *sorter, Int_t keyIndex,Option_t *opt)
{
   //to be documented
   fTableSorter =  0;
   fKey         =  0;
   fFirstRow    = -1;
   fSize        =  0;
   fRows        =  0;
   if (sorter) {
      fTableSorter = sorter;
      fKey         = sorter->GetKeyAddress(keyIndex);
      fSize        = sorter->CountKey(fKey,keyIndex,kFALSE,&fFirstRow);
      SetTablePointer(GetTable());
   }
   SetOption(opt);
}

//______________________________________________________________________________
Int_t TTablePoints::DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/)
{
//*-*-*-*-*-*-*Compute distance from point px,py to a 3-D points *-*-*-*-*-*-*
//*-*          =====================================================
//*-*
//*-*  Compute the closest distance of approach from point px,py to each segment
//*-*  of the polyline.
//*-*  Returns when the distance found is below DistanceMaximum.
//*-*  The distance is computed in pixels units.
//*-*
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
   return -1;
}
 TTablePoints.cxx:1
 TTablePoints.cxx:2
 TTablePoints.cxx:3
 TTablePoints.cxx:4
 TTablePoints.cxx:5
 TTablePoints.cxx:6
 TTablePoints.cxx:7
 TTablePoints.cxx:8
 TTablePoints.cxx:9
 TTablePoints.cxx:10
 TTablePoints.cxx:11
 TTablePoints.cxx:12
 TTablePoints.cxx:13
 TTablePoints.cxx:14
 TTablePoints.cxx:15
 TTablePoints.cxx:16
 TTablePoints.cxx:17
 TTablePoints.cxx:18
 TTablePoints.cxx:19
 TTablePoints.cxx:20
 TTablePoints.cxx:21
 TTablePoints.cxx:22
 TTablePoints.cxx:23
 TTablePoints.cxx:24
 TTablePoints.cxx:25
 TTablePoints.cxx:26
 TTablePoints.cxx:27
 TTablePoints.cxx:28
 TTablePoints.cxx:29
 TTablePoints.cxx:30
 TTablePoints.cxx:31
 TTablePoints.cxx:32
 TTablePoints.cxx:33
 TTablePoints.cxx:34
 TTablePoints.cxx:35
 TTablePoints.cxx:36
 TTablePoints.cxx:37
 TTablePoints.cxx:38
 TTablePoints.cxx:39
 TTablePoints.cxx:40
 TTablePoints.cxx:41
 TTablePoints.cxx:42
 TTablePoints.cxx:43
 TTablePoints.cxx:44
 TTablePoints.cxx:45
 TTablePoints.cxx:46
 TTablePoints.cxx:47
 TTablePoints.cxx:48
 TTablePoints.cxx:49
 TTablePoints.cxx:50
 TTablePoints.cxx:51
 TTablePoints.cxx:52
 TTablePoints.cxx:53
 TTablePoints.cxx:54
 TTablePoints.cxx:55
 TTablePoints.cxx:56
 TTablePoints.cxx:57
 TTablePoints.cxx:58
 TTablePoints.cxx:59
 TTablePoints.cxx:60
 TTablePoints.cxx:61
 TTablePoints.cxx:62
 TTablePoints.cxx:63
 TTablePoints.cxx:64
 TTablePoints.cxx:65
 TTablePoints.cxx:66
 TTablePoints.cxx:67
 TTablePoints.cxx:68
 TTablePoints.cxx:69
 TTablePoints.cxx:70
 TTablePoints.cxx:71
 TTablePoints.cxx:72
 TTablePoints.cxx:73
 TTablePoints.cxx:74
 TTablePoints.cxx:75
 TTablePoints.cxx:76
 TTablePoints.cxx:77
 TTablePoints.cxx:78
 TTablePoints.cxx:79
 TTablePoints.cxx:80
 TTablePoints.cxx:81
 TTablePoints.cxx:82
 TTablePoints.cxx:83
 TTablePoints.cxx:84
 TTablePoints.cxx:85
 TTablePoints.cxx:86
 TTablePoints.cxx:87
 TTablePoints.cxx:88
 TTablePoints.cxx:89
 TTablePoints.cxx:90
 TTablePoints.cxx:91
 TTablePoints.cxx:92
 TTablePoints.cxx:93
 TTablePoints.cxx:94
 TTablePoints.cxx:95
 TTablePoints.cxx:96