Changeset 8987 for trunk/MagicSoft/Mars/datacenter/macros
- Timestamp:
- 06/30/08 09:46:36 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/datacenter/macros
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/macros/fillstar.C
r8959 r8987 80 80 using namespace std; 81 81 82 bool CheckGraph(const TGraph *g) 83 { 84 return g && g->GetN()>0 && !(g->GetN()==1 && g->GetX()[0]==0); 85 } 86 82 87 int Process(MSQLMagic &serv, TString fname) 83 88 { … … 183 188 return 2; 184 189 } 185 TString maxhum = g->GetN()>0? Form("%5.1f", TMath::MaxElement(g->GetN(), g->GetY())) : "NULL";186 TString avghum = g->GetN()>0? Form("%5.1f", g->GetMean(2)) : "NULL";190 TString maxhum = CheckGraph(g) ? Form("%5.1f", TMath::MaxElement(g->GetN(), g->GetY())) : "NULL"; 191 TString avghum = CheckGraph(g) ? Form("%5.1f", g->GetMean(2)) : "NULL"; 187 192 188 193 g = (TGraph*)arr.FindObjectInCanvas("Temperature", "TGraph", "MHWeather"); … … 192 197 return 2; 193 198 } 194 TString avgtemp = g->GetN()>0? Form("%5.1f", g->GetMean(2)) : "NULL";199 TString avgtemp = CheckGraph(g) ? Form("%5.1f", g->GetMean(2)) : "NULL"; 195 200 196 201 g = (TGraph*)arr.FindObjectInCanvas("WindSpeed", "TGraph", "MHWeather"); … … 200 205 return 2; 201 206 } 202 TString avgwind = g->GetN()>0? Form("%5.1f", g->GetMean(2)) : "NULL";207 TString avgwind = CheckGraph(g) ? Form("%5.1f", g->GetMean(2)) : "NULL"; 203 208 204 209 g = (TGraph*)arr.FindObjectInCanvas("Cloudiness", "TGraph", "MHWeather"); 205 210 if (!g) 206 211 cout << "WARNING - Reading of Cloudiness failed." << endl; 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"; 212 213 TString avgclouds = CheckGraph(g) ? Form("%5.1f", g->GetMean(2)) : "NULL"; 214 TString rmsclouds = CheckGraph(g) ? Form("%5.1f", g->GetRMS(2)) : "NULL"; 209 215 210 216 g = (TGraph*)arr.FindObjectInCanvas("TempSky", "TGraph", "MHWeather"); 211 217 if (!g) 212 218 cout << "WARNING - Reading of TempSky failed." << endl; 213 TString avgsky = g && g->GetN()>0? Form("%5.1f", g->GetMean(2)+200) : "NULL";219 TString avgsky = CheckGraph(g) ? Form("%5.1f", g->GetMean(2)+200) : "NULL"; 214 220 215 221 … … 218 224 cout << "WARNING - Reading of NumStars failed." << endl; 219 225 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";226 TString numstarsmed = CheckGraph(g) ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL"; 227 TString numstarsrms = CheckGraph(g) ? Form("%5.1f", g->GetRMS(2)) : "NULL"; 222 228 223 229 g = (TGraph*)arr.FindObjectInCanvas("NumStarsCor", "TGraph", "MHPointing"); … … 225 231 cout << "WARNING - Reading of NumStarsCor failed." << endl; 226 232 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";233 TString numcorsmed = CheckGraph(g) ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL"; 234 TString numcorsrms = CheckGraph(g) ? Form("%5.1f", g->GetRMS(2)) : "NULL"; 229 235 230 236 g = (TGraph*)arr.FindObjectInCanvas("Brightness", "TGraph", "MHPointing"); … … 232 238 cout << "WARNING - Reading of SkyBrightness failed." << endl; 233 239 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";240 TString skybrightnessmed = CheckGraph(g) ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL"; 241 TString skybrightnessrms = CheckGraph(g) ? Form("%5.1f", g->GetRMS(2)) : "NULL"; 236 242 237 243 TString sequence = fname(TRegexp("star[0-9]+[.]root$")); -
trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
r8986 r8987 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.4 6 2008-06-21 13:53:33 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.47 2008-06-30 08:46:03 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 539 539 plot.SetDescription("RMS Arrival Time inner Camera;\\sigma_{T,I} [sl]", "RmsArrTmI"); 540 540 plot.Plot("Calibration.fArrTimeRmsInner", 0, 4.5, 0.01); 541 plot.SetDescription("Number of unsuitable pixels inner Camera;N {I}", "UnsuitI");541 plot.SetDescription("Number of unsuitable pixels inner Camera;N_{I}", "UnsuitI"); 542 542 plot.Plot("Calibration.fUnsuitableInner", 0, 75, 1); 543 543 plot.SetDescription("Number of unsuitable pixels >50%;N", "Unsuit50"); … … 575 575 plot.Plot("Calibration.fRatePedEvts", 0, 50, 1); 576 576 plot.SetDescription("Average rate of events with ped+cosmics trigger;R [Hz]", "RatePT"); 577 plot.Plot("Calibration.fRatePedTrigEvts", 0, 3.5, 0.1);577 plot.Plot("Calibration.fRatePedTrigEvts", 0, 4.0, 0.1); 578 578 plot.SetDescription("Average rate of events without trigger pattern;R [Hz]", "Rate0"); 579 579 plot.Plot("Calibration.fRateNullEvts", 0, 3.5, 0.1);
Note:
See TracChangeset
for help on using the changeset viewer.