Two new items for context menu: PrintPathMarks and ImportDaughters.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Feb 2007 16:37:09 +0000 (16:37 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Feb 2007 16:37:09 +0000 (16:37 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index 73f7609..772bae6 100644 (file)
@@ -265,12 +265,48 @@ void Track::ImportClustersFromIndex()
   gROOT->ProcessLine(Form("clusters_from_index(%d);", fIndex));
 }
 
+void Track::ImportDaughters()
+{
+  static const Exc_t eH("Track::ImportDaughters ");
+
+  if (fLabel < 0)
+    throw(eH + "label not set.");
+
+  Reve::LoadMacro("daughters_from_label.C");
+  gROOT->ProcessLine(Form("daughters_from_label(%d);", fLabel));
+}
+
+/**************************************************************************/
+
 void Track::PrintKineStack()
 {
   Reve::LoadMacro("print_kine_from_label.C");
   gROOT->ProcessLine(Form("print_kine_from_label(%d);", fLabel));
 }
 
+
+void Track::PrintPathMarks()
+{
+  static const Exc_t eH("Track::PrintPathMarks ");
+
+  if (fLabel < 0)
+    throw(eH + "label not set.");
+
+  printf("Number of path marks %d label %d\n",
+        fPathMarks.size(), fLabel);
+
+  PathMark* pm;
+  for(vpPathMark_i i=fPathMarks.begin(); i!=fPathMarks.end(); i++) 
+  {
+    pm = *i;
+    printf("Reve::PathMark: %-9s  p: %8f %8f %8f Vertex: %8e %8e %8e %g \n",
+          pm->type_name(),
+          pm->P.x,  pm->P.y, pm->P.z,
+          pm->V.x,  pm->V.y, pm->V.z,
+          pm->time);
+  }
+}
+
 /**************************************************************************/
 
 void Track::CtrlClicked(Reve::Track* track)
@@ -690,6 +726,5 @@ void TrackCounter::OutputEventTracks(FILE* out)
       }
       ++i;
     }
-
   }
 }
index d25547a..26b54e6 100644 (file)
@@ -29,10 +29,10 @@ class Track : public Line, public TQObject
   Track(const Track&);            // Not implemented
   Track& operator=(const Track&); // Not implemented
 
-protected:
+public:
   typedef std::vector<Reve::PathMark*>           vpPathMark_t;
   typedef std::vector<Reve::PathMark*>::iterator vpPathMark_i;
-
+protected:
   Reve::Vector      fV;
   Reve::Vector      fP;
   Double_t          fBeta;
@@ -66,8 +66,10 @@ public:
 
   void ImportHits();              // *MENU*
   void ImportClusters();          // *MENU*
-  void ImportClustersFromIndex(); // *MENU*
+  void ImportClustersFromIndex(); // *MENU*  
+  void ImportDaughters();         // *MENU*
   void PrintKineStack();          // *MENU*
+  void PrintPathMarks();          // *MENU*
 
   //--------------------------------