Added method SortPathMarksByTime().
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Mar 2007 16:10:31 +0000 (16:10 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Mar 2007 16:10:31 +0000 (16:10 +0000)
EVE/Reve/Track.cxx
EVE/Reve/Track.h

index 3b929b29570dfd7e5a8549406baa179532c7585f..2cf96d9baee28ba1657ad958bc9d55e96de32638 100644 (file)
@@ -247,6 +247,20 @@ make_polyline:
   }
 }
 
+/**************************************************************************/
+namespace {
+struct cmp_pathmark {
+  bool operator()(PathMark* const & a, PathMark* const & b)
+  { return a->time < b->time; }
+};
+}
+
+void Track::SortPathMarksByTime()
+{
+ sort(fPathMarks.begin(), fPathMarks.end(), cmp_pathmark());
+}
+
+
 /**************************************************************************/
 
 void Track::ImportHits()
index aeb9d47abc65fa52d1a835171413847c32defa6d..5db1f67e7c37f4495a38f17e9bc70c8aff3b10ab 100644 (file)
@@ -61,7 +61,8 @@ public:
   void  SetIndex(Int_t idx) { fIndex = idx;  }
 
   void  AddPathMark(Reve::PathMark* pm) { fPathMarks.push_back(pm); }
-
+  void  SortPathMarksByTime();
   //--------------------------------
 
   void ImportHits();              // *MENU*