Changeset 8959 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 06/14/08 19:27:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r8958 r8959 205 205 if (!g) 206 206 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"; 209 209 210 210 g = (TGraph*)arr.FindObjectInCanvas("TempSky", "TGraph", "MHWeather"); 211 211 if (!g) 212 212 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"; 214 214 215 215 … … 218 218 cout << "WARNING - Reading of NumStars failed." << endl; 219 219 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"; 222 222 223 223 g = (TGraph*)arr.FindObjectInCanvas("NumStarsCor", "TGraph", "MHPointing"); 224 224 if (!g) 225 {226 225 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"; 232 229 233 230 g = (TGraph*)arr.FindObjectInCanvas("Brightness", "TGraph", "MHPointing"); 234 231 if (!g) 235 {236 232 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"; 242 236 243 237 TString sequence = fname(TRegexp("star[0-9]+[.]root$"));
Note:
See TracChangeset
for help on using the changeset viewer.