Changeset 5061


Ignore:
Timestamp:
09/16/04 10:05:46 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5060 r5061  
    2727   * mhbase/MH.cc, mfilter/MFDeltaT.cc:
    2828     - Form %5.1 when printing statistics
     29
     30   * mfilter/MFDeltaT.cc:
     31     - enhaced filter criterias
     32
     33   * mbase/MTime.h:
     34     - added IsMidnight
    2935
    3036
  • trunk/MagicSoft/Mars/mbase/MTime.h

    r4920 r5061  
    115115    UInt_t Sec() const   { Byte_t h, m, s; GetTime(h,m,s); return s; }
    116116
     117    Bool_t IsMidnight() const { return (Long_t)fTime==0 && fNanoSec==0; }
     118
    117119    // I/O functions
    118120    istream &ReadBinary(istream &fin);
  • trunk/MagicSoft/Mars/mfilter/MFDeltaT.cc

    r5060 r5061  
    7878    fNameTime   = time;
    7979
    80     fErrors.Set(5);
     80    fErrors.Set(6);
    8181
    8282    AddToBranchList(Form("%s.*", (const char*)fNameTime));
     
    117117    fResult = kFALSE;
    118118
    119     const Double_t dt = *fTime - fLastTime;
    120     fLastTime = *fTime;
    121 
    122119    Int_t i=0;
    123120
    124121    if (GetNumExecutions()>0)
    125122    {
    126         if (dt<0)
     123        if (*fTime-fLastTime>fUpperLimit)
    127124            i=1;
    128         if (dt==0)
     125        if (*fTime<fLastTime)
    129126            i=2;
    130         if (dt>fUpperLimit)
     127        if (*fTime==fLastTime)
    131128            i=3;
    132         if (TMath::Floor(fTime->GetMjd())==fTime->GetMjd())
     129        if (fTime->IsMidnight())
    133130            i=4;
     131        if (*fTime==MTime())
     132            i=5;
    134133    }
     134
     135    fLastTime = *fTime;
    135136
    136137    fResult = i==0;
     
    151152    *fLog << GetDescriptor() << " filter statistics:" << endl;
    152153    *fLog << dec << setfill(' ');
    153     PrintSkipped(fErrors[1], "Delta-T  < 0");
    154     PrintSkipped(fErrors[2], "Delta-T == 0");
    155     PrintSkipped(fErrors[3], Form("Delta-T  > %.2fs", fUpperLimit));
    156     PrintSkipped(fErrors[4], "Delta-T == floor(Delta-T)");
     154    PrintSkipped(fErrors[2], "Delta-T  < 0");
     155    PrintSkipped(fErrors[3], "Delta-T == 0");
     156    PrintSkipped(fErrors[1], Form("Delta-T  > %.2fs", fUpperLimit));
     157    PrintSkipped(fErrors[4], "MTime is midnight");
     158    PrintSkipped(fErrors[5], "MTime not initialized");
    157159    *fLog << " " << (int)fErrors[0] << " (";
    158160    *fLog << Form("5.1f", 100.*fErrors[0]/GetNumExecutions());
Note: See TracChangeset for help on using the changeset viewer.