ClassImp(Reve::Track)
Track::Track() :
- RenderElement(),
- TPolyLine3D(),
+ Line(),
fV(),
fP(),
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()),
fLabel(label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
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()),
fLabel(t->label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
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),
fLabel(t->label),
fPathMarks(),
- fRnrStyle(rs),
-
- fName(t->GetName()),
- fTitle()
+ fRnrStyle(rs)
{
fLineColor = fRnrStyle->GetColor();
fMainColorPtr = &fLineColor;
+
+ SetName(t->GetName());
}
Track::~Track()
delete *i;
}
+/*
void Track::Reset(Int_t n_points)
{
delete [] TPolyLine3D::fP; TPolyLine3D::fP = 0;
memset(TPolyLine3D::fP, 0, 3*fN*sizeof(Float_t));
fLastPoint = -1;
}
+*/
/**************************************************************************/
#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;
vpPathMark_t fPathMarks;
TrackRnrStyle* fRnrStyle;
-
- TString fName;
- TString fTitle;
public:
Track();
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); }