Ignore:
Timestamp:
Jun 2, 2008, 9:52:26 AM (12 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MRunIter.cc

    r7808 r8907  
    1919!   Author(s): Javier Rico,  4/2004 <mailto:jrico@ifae.es>
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2004
     21!   Copyright: MAGIC Software Development, 2000-2008
    2222!
    2323!
     
    3535#include "MRunIter.h"
    3636
     37#include <iostream>
     38
     39#include <TMath.h>
    3740#include <TSystem.h>
    38 #include <iostream>
    3941
    4042ClassImp(MRunIter);
    4143
    4244using namespace std;
     45
     46void MRunIter::SortRuns()
     47{
     48    const int n = GetNumRuns();
     49
     50    TArrayI idx(n);
     51    TMath::Sort(n, fRuns.GetArray(), idx.GetArray(), kFALSE);
     52
     53    for (int i=0; i<n; i++)
     54        idx[i] = fRuns[idx[i]];
     55
     56    fRuns = idx;
     57}
    4358
    4459Int_t MRunIter::AddRun(UInt_t run, const char *path)
Note: See TracChangeset for help on using the changeset viewer.