Changeset 7116 for trunk


Ignore:
Timestamp:
05/31/05 12:53:41 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7115 r7116  
    6060     - assume that the run-type is real-data if Process is called before
    6161       ReInit
     62
     63   * merpp.cc:
     64     - new options: --auto-time-start --auto-time-stop
    6265
    6366
  • trunk/MagicSoft/Mars/NEWS

    r7115 r7116  
    1414     that also the very first Drive-events in a run are treated
    1515     correctly.
     16
     17   - merpp: new options: --auto-time-start --auto-time-stop which
     18     allow to cut updating with slow-control at the start- or
     19     (previousle --auto-time only allowed: and) stop-time of
     20     the run stored in the runheader.
    1621
    1722   - callisto: changed default of fgFallTimeHiGain in
  • trunk/MagicSoft/Mars/merpp.cc

    r7091 r7116  
    8383//    gLog << "   --sql=mysql://user:password@url  Insert run into database" << endl << endl;
    8484    gLog << " Report File Options:" << endl;
    85     gLog << "   --auto-time               Take time automatically from MRawRunHeader" << endl;
    86     gLog << "                             (overwrites --start= and/or --stop=)" << endl;
     85    gLog << "   --auto-time-start         Take time automatically from MRawRunHeader" << endl;
     86    gLog << "                             (overwrites --start=)" << endl;
     87    gLog << "   --auto-time-stop          Take time automatically from MRawRunHeader" << endl;
     88    gLog << "                             (overwrites --stop=)" << endl;
     89    gLog << "   --auto-time               Abbreviation for --auto-time-start and auto-time-stop" << endl;
    8790    gLog << "   --start=date/time         Start event time" << endl;
    8891    gLog << "   --stop=date/time          Stop  event time" << endl;
     
    116119}
    117120
    118 void GetTimeFromFile(const char *fname, MTime &start, MTime &stop)
     121void GetTimeFromFile(const char *fname, MTime *start, MTime *stop)
    119122{
    120123    TFile f(fname, "READ");
     
    136139    }
    137140
    138     if (!start)
    139         start = h->GetRunStart();
    140     if (!stop)
    141         stop = h->GetRunEnd();
     141    if (start && !*start)
     142        *start = h->GetRunStart();
     143    if (stop && !*stop)
     144        *stop = h->GetRunEnd();
    142145}
    143146
     
    161164    }
    162165
    163     const Int_t  kComprlvl   = arg.GetIntAndRemove("-c", 2);
    164     const Bool_t kInterleave = arg.GetIntAndRemove("--interleave=", 1);
    165     const Bool_t kForce      = arg.HasOnlyAndRemove("-f");
    166     const Bool_t kForceProc  = arg.HasOnlyAndRemove("-ff");
    167     const Int_t  kRunNumber  = arg.GetIntAndRemove("--run=", -1);
    168     const Bool_t kAutoTime   = arg.HasOnlyAndRemove("--auto-time");
    169           Int_t  kRunFile    = arg.GetIntAndRemove("--runfile=", -1);
    170           Bool_t kUpdate     = arg.HasOnlyAndRemove("--update") || arg.HasOnlyAndRemove("-u");
     166    const Int_t  kComprlvl      = arg.GetIntAndRemove("-c", 2);
     167    const Bool_t kInterleave    = arg.GetIntAndRemove("--interleave=", 1);
     168    const Bool_t kForce         = arg.HasOnlyAndRemove("-f");
     169    const Bool_t kForceProc     = arg.HasOnlyAndRemove("-ff");
     170    const Int_t  kRunNumber     = arg.GetIntAndRemove("--run=", -1);
     171    const Bool_t kAutoTime      = arg.HasOnlyAndRemove("--auto-time");
     172    const Bool_t kAutoTimeStart = arg.HasOnlyAndRemove("--auto-time-start") || kAutoTime;
     173    const Bool_t kAutoTimeStop  = arg.HasOnlyAndRemove("--auto-time-stop")  || kAutoTime;
     174          Int_t  kRunFile       = arg.GetIntAndRemove("--runfile=", -1);
     175          Bool_t kUpdate        = arg.HasOnlyAndRemove("--update") || arg.HasOnlyAndRemove("-u");
    171176
    172177    MTime kTimeStart;
     
    258263    // Evaluate possible start-/stop-time
    259264    //
    260     if (kAutoTime && kUpdate && (isreport || isdc))
    261         GetTimeFromFile(kNameout, kTimeStart, kTimeStop);
     265    if ((kAutoTimeStart || kAutoTimeStop) && kUpdate && (isreport || isdc))
     266        GetTimeFromFile(kNameout, kAutoTimeStart?&kTimeStart:0, kAutoTimeStop?&kTimeStop:0);
    262267
    263268    if (kTimeStart)
Note: See TracChangeset for help on using the changeset viewer.