ROOT » MISC » TABLE » TTable3Points

class TTable3Points: public TTablePoints

   TTable3Points class is to create 3D view of any 3 columns of the TTable objects
   with one and the same "key column value".

   For example all values of the column "x[0]" "x[1]" "x[2]" of the 
   from the rows with one and same "track_id" column value will be regarded
   as an image of one and the same "track".
   The last means all those points will be painted with one and the same 3D
   attributes like "color", "size", "style", "light","markers", "connections"  etc.

   The original TTable object must be pre-sorted by "key column" via TTableSorter

 void   CreatePoints(Tg2t_tpc_hit *points)
   g2t_tpc_hit_st *p = points->GetTable();

  TTable3Points *track = 0;
  TString tr;
  tr = "track_p";
  TTable &ttt = *((TTable *)points);
  // Track2Line MUST be on heap otherwise 3D view will crash just code leaves this
  // subroutine
  We will assemble all points by its "track_p" field.

  TTableSorter *Track2Line = new TTableSorter (ttt,"track_p");

  Int_t i = 0;
  Char_t buffer[10];
  Int_t ntracks = 0;
  const Int_t maxtracks = 5;
---------------------------- Fill tracks -------------------
  long currentId = -1;
  long newId =  0;
  g2t_tpc_hit_st *hitPoint = 0;
  TVolume *thisTrack[7] = {0,0,0,0,0,0,0}; // seven volumes for 7 different colors
  Int_t  MaxRowtoCount = 5000; // 5000;
  Int_t  MaxTracks = Track2Line->CountKeys();
  MaxTracks = 100;
  for (i=0;i<Track2Line->GetNRows() && ntracks <  MaxTracks ;i++)
   hitPoint = p + Track2Line->GetIndex(i);
   newId =  hitPoint->track_p;
   if (newId != currentId)  { // The hit for the new track has been found

     const Char_t *xName = "x[0]";
     const Char_t *yName = "x[1]";
     const Char_t *zName = "x[2]";

     track =  new TTable3Points(Track2Line,(const void *)&newId,xName,yName,zName);

     // Create a shape for this node
     TPolyLineShape *trackShape  =  new TPolyLineShape(track);
     Int_t colorIndx = ntracks%7;
     // Create a node to hold it
     if (!thisTrack[colorIndx])  {
         thisTrack[colorIndx] = new TVolume("hits","hits",trackShape);
         TVolumePosition *pp = hall->Add(thisTrack[colorIndx]);
         if (!pp) printf(" no position %d\n",ntrack);
     currentId = newId;

Function Members (Methods)

voidTObject::AbstractMethod(const char* method) const
virtual Int_tTPoints3DABC::Add(Float_t x, Float_t y, Float_t z)
virtual Int_tTPoints3DABC::AddLast(Float_t x, Float_t y, Float_t z)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")MENU
static Int_tTPoints3DABC::DistancetoLine(Int_t px, Int_t py, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t lineWidth = 1)
virtual Int_tTTablePoints::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Float_tGetAnyPoint(Int_t idx, TTable3Points::EPointDirection xAxis) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual Int_tGetKey(Int_t)
virtual Int_tTTablePoints::GetLastPosition() const
virtual Int_tGetN() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TTablePoints::GetOption() const
virtual Float_t*GetP() const
virtual void*TTablePoints::GetTable()
virtual const char*TObject::GetTitle() const
virtual Int_tGetTotalKeys()
virtual UInt_tTObject::GetUniqueID() const
virtual Float_tGetX(Int_t idx) const
virtual const Float_t*GetXYZ(Int_t)
virtual Float_t*GetXYZ(Float_t* xyz, Int_t idx, Int_t num = 1) const
virtual Float_tGetY(Int_t idx) const
virtual Float_tGetZ(Int_t idx) const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual Int_tTTablePoints::Indx(Int_t sortedIndx) const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidPaintPoints(int, float*, const char*)
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidSetAnyColumn(const Char_t* anyName, TTable3Points::EPointDirection indx)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual Int_tSetKeyByIndx(Int_t)
virtual Int_tSetKeyByValue(Int_t)
virtual Int_tTTablePoints::SetLastPosition(Int_t idx)
virtual Int_tTPoints3DABC::SetNextPoint(Float_t x, Float_t y, Float_t z)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTTablePoints::SetOption(Option_t*)
virtual Int_tTTablePoints::SetPoint(Int_t, Float_t, Float_t, Float_t)
virtual Int_tTTablePoints::SetPoints(Int_t, Float_t*, Option_t*)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetXColumn(const Char_t* xName)
virtual voidSetYColumn(const Char_t* yName)
virtual voidSetZColumn(const Char_t* zName)
virtual voidShowMembers(TMemberInspector& insp) const
virtual Int_tTTablePoints::Size() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
TTable3Points(TTableSorter* sorter, const void* key, const Char_t* xName = "x", const Char_t* yName = "y", const Char_t* zName = "z", Option_t* opt = "")
TTable3Points(TTableSorter* sorter, Int_t keyIndex, const Char_t* xName = "x", const Char_t* yName = "y", const Char_t* zName = "z", Option_t* opt = "")
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidTTablePoints::SetTablePointer(void* table)

Data Members

static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TTable3Points::EPointDirectionkTotalSize
static TObject::(anonymous)TObject::kWriteDelete
static TTable3Points::EPointDirectionkXPoints
static TTable3Points::EPointDirectionkYPoints
static TTable3Points::EPointDirectionkZPoints
static TObject::(anonymous)TObject::kZombie
Int_tTTablePoints::fFirstRowThe first row to take in account
const void*TTablePoints::fKeypointer to key value to select rows
void*TTablePoints::fRowsPointer the first row of the STAF table

Class Charts

Inheritance Chart:

Function documentation

to be documented
TTable3Points(TTableSorter* sorter, const void* key, const Char_t* xName = "x", const Char_t* yName = "y", const Char_t* zName = "z", Option_t* opt = "")
to be documented
TTable3Points(TTableSorter* sorter, Int_t keyIndex, const Char_t* xName = "x", const Char_t* yName = "y", const Char_t* zName = "z", Option_t* opt = "")
to be documented
to be documented
Float_t GetAnyPoint(Int_t idx, TTable3Points::EPointDirection xAxis) const
to be documented
void SetAnyColumn(const Char_t* anyName, TTable3Points::EPointDirection indx)
to be documented
Float_t * GetXYZ(Float_t* xyz, Int_t idx, Int_t num = 1) const
to be documented
TTable3Points(const TTable3Points& )
TTable3Points & operator=(const TTable3Points& )
void SetXColumn(const Char_t* xName)
void SetYColumn(const Char_t* yName)
void SetZColumn(const Char_t* zName)
Int_t GetTotalKeys()
{ return -1;}
Int_t GetKey(Int_t )
{return -1;}
Int_t SetKeyByIndx(Int_t )
{return -1;}
Int_t SetKeyByValue(Int_t )
{return -1;}
Float_t GetX(Int_t idx) const
{return GetAnyPoint(idx,kXPoints);}
Float_t GetY(Int_t idx) const
{return GetAnyPoint(idx,kYPoints);}
Float_t GetZ(Int_t idx) const
-- abstract methods
{return GetAnyPoint(idx,kZPoints);}
void PaintPoints(int , float* , const char* )
const Float_t * GetXYZ(Int_t )
{return 0;}
Float_t * GetP() const
{return 0;}
Int_t GetN() const
{return -1;}