Added method 'void ImportClustersFromIndex()'.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Dec 2006 18:02:44 +0000 (18:02 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Dec 2006 18:02:44 +0000 (18:02 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index 4ee0be2..07af353 100644 (file)
@@ -64,6 +64,7 @@ Track::Track(Reve::MCTrack* t, TrackRnrStyle* rs):
   fBeta(t->P()/t->Energy()),
   fCharge(0),
   fLabel(t->label),
+  fIndex(t->index),
   fPathMarks(),
 
   fRnrStyle(rs)
@@ -88,6 +89,7 @@ Track::Track(Reve::RecTrack* t, TrackRnrStyle* rs) :
   fBeta(t->beta),
   fCharge(t->sign),
   fLabel(t->label),
+  fIndex(t->index),
   fPathMarks(),
 
   fRnrStyle(rs)
@@ -234,6 +236,12 @@ void Track::ImportClusters()
   gROOT->ProcessLine(Form("clusters_from_label(%d);", fLabel));
 }
 
+void Track::ImportClustersFromIndex()
+{
+  Reve::LoadMacro("clusters_from_index.C");
+  gROOT->ProcessLine(Form("clusters_from_index(%d);", fIndex));
+}
+
 /**************************************************************************/
 
 void Track::CtrlClicked(Reve::Track* track)
index 44118b3..2043755 100644 (file)
@@ -32,6 +32,7 @@ protected:
   Double_t          fBeta;
   Int_t             fCharge;
   Int_t             fLabel;
+  Int_t             fIndex;
   vpPathMark_t      fPathMarks;
 
   TrackRnrStyle*    fRnrStyle;
@@ -48,13 +49,18 @@ public:
   TrackRnrStyle* GetRnrStyle() const  { return fRnrStyle; }
   void SetRnrStyle(TrackRnrStyle* rs) { fRnrStyle = rs; }
 
-  Int_t GetLabel() const { return fLabel; }
+  Int_t GetLabel() const    { return fLabel; }
+  void  SetLabel(Int_t lbl) { fLabel = lbl;  }
+  Int_t GetIndex() const    { return fIndex; }
+  void  SetIndex(Int_t idx) { fIndex = idx;  }
+
   void  AddPathMark(Reve::PathMark* pm) { fPathMarks.push_back(pm); }
 
   //--------------------------------
 
-  void ImportHits();     // *MENU*
-  void ImportClusters(); // *MENU*
+  void ImportHits();              // *MENU*
+  void ImportClusters();          // *MENU*
+  void ImportClustersFromIndex(); // *MENU*
 
   //--------------------------------