]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Derive Track from Line (before was TPolyLine3D, RenderElement); this allowed me to...
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Nov 2006 18:42:35 +0000 (18:42 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Nov 2006 18:42:35 +0000 (18:42 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index d43d1964c1cd027dc37304351bc53f6acfcd7986..2edcc20069070ab608c709c4faec72d9fd290a9b 100644 (file)
@@ -22,8 +22,7 @@ using namespace Reve;
 ClassImp(Reve::Track)
 
 Track::Track() :
-  RenderElement(),
-  TPolyLine3D(),
+  Line(),
 
   fV(),
   fP(),
@@ -32,15 +31,11 @@ Track::Track() :
   fLabel(0),
   fPathMarks(),
 
-  fRnrStyle(0),
-
-  fName(),
-  fTitle()
+  fRnrStyle(0)
 {}
 
 Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
-  RenderElement(),
-  TPolyLine3D(),
+  Line(),
 
   fV(t->Vx(), t->Vy(), t->Vz()),
   fP(t->Px(), t->Py(), t->Pz()),
@@ -49,10 +44,7 @@ Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
   fLabel(label),
   fPathMarks(),
 
-  fRnrStyle(rs),
-
-  fName(t->GetName()),
-  fTitle()
+  fRnrStyle(rs)
 {
   fLineColor = fRnrStyle->GetColor();
   fMainColorPtr = &fLineColor;
@@ -60,11 +52,12 @@ Track::Track(TParticle* t, Int_t label, TrackRnrStyle* rs):
   TParticlePDG* pdgp = t->GetPDG();
   if (pdgp)
     fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
+
+  SetName(t->GetName());
 }
 
 Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
-  RenderElement(),
-  TPolyLine3D(),
+  Line(),
 
   fV(t->Vx(), t->Vy(), t->Vz()),
   fP(t->Px(), t->Py(), t->Pz()),
@@ -73,10 +66,7 @@ Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
   fLabel(t->label),
   fPathMarks(),
 
-  fRnrStyle(rs),
-
-  fName(t->GetName()),
-  fTitle()
+  fRnrStyle(rs)
 {
   fLineColor = fRnrStyle->GetColor();
   fMainColorPtr = &fLineColor;
@@ -86,11 +76,12 @@ Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
     t->ResetPdgCode(); pdgp = t->GetPDG();
   }
   fCharge = (Int_t) TMath::Nint(pdgp->Charge()/3);
+
+  SetName(t->GetName());
 }
 
 Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs) :
-  RenderElement(),
-  TPolyLine3D(),
+  Line(),
 
   fV(t->V),
   fP(t->P),
@@ -99,13 +90,12 @@ Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs) :
   fLabel(t->label),
   fPathMarks(),
 
-  fRnrStyle(rs),
-
-  fName(t->GetName()),
-  fTitle()
+  fRnrStyle(rs)
 {
   fLineColor = fRnrStyle->GetColor();
   fMainColorPtr = &fLineColor;
+
+  SetName(t->GetName());
 }
 
 Track::~Track()
@@ -114,6 +104,7 @@ Track::~Track()
     delete *i;
 }
 
+/*
 void Track::Reset(Int_t n_points)
 {
   delete [] TPolyLine3D::fP; TPolyLine3D::fP = 0;
@@ -122,6 +113,7 @@ void Track::Reset(Int_t n_points)
   memset(TPolyLine3D::fP, 0, 3*fN*sizeof(Float_t));
   fLastPoint = -1;
 }
+*/
 
 /**************************************************************************/
 
index b6d6d00e570842bd24f6615bf320be57697d6840..f50ec3e57ad88383689aa8bd9e148d9a365e02ef 100644 (file)
@@ -5,17 +5,17 @@
 
 #include <Reve/PODs.h>
 #include <Reve/RenderElement.h>
+#include <Reve/Line.h>
 
 #include <TPolyMarker3D.h>
-#include <TPolyLine3D.h>
+// #include <TPolyLine3D.h>
 
 namespace Reve {
 
 class TrackRnrStyle;
 class TrackList;
 
-class Track : public RenderElement,
-             public TPolyLine3D
+class Track : public Line
 {
   friend class TrackList;
 
@@ -34,9 +34,6 @@ protected:
   vpPathMark_t      fPathMarks;
 
   TrackRnrStyle*    fRnrStyle;
-    
-  TString           fName;
-  TString           fTitle;
 
 public: 
   Track();
@@ -45,25 +42,11 @@ public:
   Track(Reve::RecTrack* t, TrackRnrStyle* rs);
   virtual ~Track();
 
-  void Reset(Int_t n_points=0);
-
-  virtual void SetLineColor(Color_t col)
-  { SetMainColor(col); }
-
-  virtual void Paint(Option_t* option="")
-  { if(fRnrElement) TPolyLine3D::Paint(option); }
-
   void MakeTrack();
 
   TrackRnrStyle* GetRnrStyle() const  { return fRnrStyle; }
   void SetRnrStyle(TrackRnrStyle* rs) { fRnrStyle = rs; }
 
-  virtual const Text_t* GetName() const    { return fName; }
-  virtual void SetName(const Text_t* name) { fName = name; }
-
-  virtual const Text_t* GetTitle() const     { return fTitle; }
-  virtual void SetTitle(const Text_t* title) { fTitle = title; }
-
   Int_t GetLabel() const { return fLabel; }
   void  AddPathMark(Reve::PathMark* pm) { fPathMarks.push_back(pm); }