Changeset 9090 for trunk/MagicSoft


Ignore:
Timestamp:
08/05/08 11:57:53 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9088 r9090  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2008/08/05 Thomas Bretz
     22
     23   * datacenter/macros/fillstar.C:
     24     - fixed the case of invalid effective on times
     25     - fixed the regular expression to find the MSequence in old files
     26
     27
    2028
    2129 2008/08/05 Daniela Dorner
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r9062 r9090  
    162162        effon = h->GetEntries()/100;
    163163
    164     Float_t mrate  = num/effon;
    165     TString muonrate = Form("%6.2f", mrate<0?0:mrate);
     164    Float_t mrate = num/effon;
     165
     166    TString muonrate  = mrate<0 || effon==0 ? "NULL" : Form("%6.2f", mrate);
    166167    TString effontime = Form("%.1f", effon);
    167168
    168169    Int_t numsparks = (int)hsparks->GetEntries();
    169170    Int_t numevents = (int)h->GetEntries() - numsparks;
    170     Int_t datarate  = TMath::Nint(numevents/effon);
    171 
     171
     172    TString datarate  = effon==0 ? "NULL" : Form("%d", numevents/effon);
    172173    TString sparkrate = Form("%5.2f", numsparks/effon);
    173 
    174     if (sparkrate.Contains("inf"))
    175         sparkrate="0.00";
     174    if (sparkrate.Contains("inf") || sparkrate.Contains("nan"))
     175        sparkrate="NULL";
    176176
    177177    MHEffectiveOnTime *ontm = (MHEffectiveOnTime*)arr.FindObjectInCanvas("MHEffectiveOnTime", "MHEffectiveOnTime", "EffOnTime");
     
    223223
    224224    MSequence seq;
    225     if (seq.Read("sequence[0-9]{8}|MSequence")<=0)
     225    if (seq.Read("sequence[0-9]{8}[.]txt|MSequence")<=0)
    226226    {
    227227        cout << "ERROR - Could not find sequence in file: " << fname << endl;
     
    267267                        " fMuonRate=%s,"
    268268                        " fPSF=%s,"
    269                         " fDataRate=%d,"
     269                        " fDataRate=%s,"
    270270                        " fSparkRate=%s,"
    271271                        " fMaxHumidity=%s,"
     
    287287                        num, effontime.Data(), totontime.Data(),
    288288                        muonrate.Data(), PSF.Data(),
    289                         datarate, sparkrate.Data(), maxhum.Data(),
     289                        datarate.Data(), sparkrate.Data(), maxhum.Data(),
    290290                        avghum.Data(), avgtemp.Data(), avgwind.Data(),
    291291                        avgsky.Data(), avgclouds.Data(), rmsclouds.Data(),
Note: See TracChangeset for help on using the changeset viewer.