Ignore:
Timestamp:
08/05/08 11:57:53 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.