Added method Track::PrintKineStack(); added global TrackCounter pointer to overcome...
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Dec 2006 15:13:43 +0000 (15:13 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Dec 2006 15:13:43 +0000 (15:13 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index 07af353..04612d8 100644 (file)
@@ -242,6 +242,12 @@ void Track::ImportClustersFromIndex()
   gROOT->ProcessLine(Form("clusters_from_index(%d);", fIndex));
 }
 
+void Track::PrintKineStack()
+{
+  Reve::LoadMacro("print_kine_from_label.C");
+  gROOT->ProcessLine(Form("print_kine_from_label(%d);", fLabel));
+}
+
 /**************************************************************************/
 
 void Track::CtrlClicked(Reve::Track* track)
@@ -501,6 +507,8 @@ void TrackList::ImportClusters()
 
 ClassImp(TrackCounter)
 
+TrackCounter* TrackCounter::fgInstance = 0;
+
 TrackCounter::TrackCounter(const Text_t* name, const Text_t* title) :
   RenderElement(),
   TNamed(name, title),
@@ -511,6 +519,7 @@ TrackCounter::TrackCounter(const Text_t* name, const Text_t* title) :
   fGoodTracks   (0),
   fTrackLists   ()
 {
+  if (fgInstance == 0) fgInstance = this;
   TQObject::Connect("Reve::Track", "CtrlClicked(Reve::Track*)",
                    "Reve::TrackCounter", this, "DoTrackAction(Reve::Track*)");
 }
@@ -518,6 +527,7 @@ TrackCounter::TrackCounter(const Text_t* name, const Text_t* title) :
 TrackCounter::~TrackCounter()
 {
   TQObject::Disconnect("Reve::Track", "DoTrackAction(Reve::Track*)");
+  if (fgInstance == this) fgInstance = 0;
 }
 
 /**************************************************************************/
index 2043755..0692b55 100644 (file)
@@ -61,6 +61,7 @@ public:
   void ImportHits();              // *MENU*
   void ImportClusters();          // *MENU*
   void ImportClustersFromIndex(); // *MENU*
+  void PrintKineStack();          // *MENU*
 
   //--------------------------------
 
@@ -233,6 +234,8 @@ public:
   Int_t GetClickAction() const  { return fClickAction; }
   void  SetClickAction(Int_t a) { fClickAction = a; }
 
+  static TrackCounter* fgInstance;
+
   ClassDef(TrackCounter, 1);
 }; // endclass TrackCounter