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 3b929b2..2cf96d9 100644 (file)
@@ -248,6 +248,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 aeb9d47..5db1f67 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*