Changeset 8959


Ignore:
Timestamp:
06/14/08 19:27:12 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r8958 r8959  
    205205    if (!g)
    206206        cout << "WARNING - Reading of Cloudiness failed." << endl;
    207     TString avgclouds = g ? Form("%5.1f", g->GetMean(2)) : "NULL";
    208     TString rmsclouds = g ? Form("%5.1f", g->GetRMS(2))  : "NULL";
     207    TString avgclouds = g && g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
     208    TString rmsclouds = g && g->GetN()>0  ? Form("%5.1f", g->GetRMS(2))  : "NULL";
    209209
    210210    g = (TGraph*)arr.FindObjectInCanvas("TempSky", "TGraph", "MHWeather");
    211211    if (!g)
    212212        cout << "WARNING - Reading of TempSky failed." << endl;
    213     TString avgsky = g ? Form("%5.1f", g->GetMean(2)+200) : "NULL";
     213    TString avgsky = g && g->GetN()>0 ? Form("%5.1f", g->GetMean(2)+200) : "NULL";
    214214
    215215
     
    218218        cout << "WARNING - Reading of NumStars failed." << endl;
    219219
    220     TString numstarsmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
    221     TString numstarsrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
     220    TString numstarsmed = g && g->GetN()>0 ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     221    TString numstarsrms = g && g->GetN()>0  ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    222222
    223223    g = (TGraph*)arr.FindObjectInCanvas("NumStarsCor", "TGraph", "MHPointing");
    224224    if (!g)
    225     {
    226225        cout << "WARNING - Reading of NumStarsCor failed." << endl;
    227 //        return 2;
    228     }
    229 
    230     TString numcorsmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
    231     TString numcorsrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
     226
     227    TString numcorsmed = g && g->GetN()>0  ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     228    TString numcorsrms = g && g->GetN()>0  ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    232229
    233230    g = (TGraph*)arr.FindObjectInCanvas("Brightness", "TGraph", "MHPointing");
    234231    if (!g)
    235     {
    236232        cout << "WARNING - Reading of SkyBrightness failed." << endl;
    237 //        return 2;
    238     }
    239 
    240     TString skybrightnessmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
    241     TString skybrightnessrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
     233
     234    TString skybrightnessmed = g && g->GetN()>0  ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     235    TString skybrightnessrms = g && g->GetN()>0  ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    242236
    243237    TString sequence = fname(TRegexp("star[0-9]+[.]root$"));
Note: See TracChangeset for help on using the changeset viewer.