Ignore:
Timestamp:
06/12/08 15:35:15 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/macros
Files:
2 edited

Legend:

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

    r8931 r8940  
    119119    }
    120120
     121    MHCamera *cal = (MHCamera*)arr.FindObjectInCanvas("CalPos;avg", "MHCamera", "CalPos");
    121122    MHCamera *pul = (MHCamera*)arr.FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos");
    122123    if (!pul)
     
    220221    TString meansiginner =Form("%6.2f", meansigi);
    221222    TString meansigouter =Form("%6.2f", meansigo);
     223
     224    TString calpos = cal ? Form("%5.1f", cal->GetMean()) : "NULL";
    222225
    223226    if (pul->GetMean()<0 || pul->GetRMS()<0)
     
    300303        Int_t nx = htp->GetNbinsX();
    301304
    302         rateped  = Form("%8.1f", iped <0 ? 0 : htp->Integral(1, nx, iped,  iped)  / nx);
    303         rateped2 = Form("%7.2f", iped2<0 ? 0 : htp->Integral(1, nx, iped2, iped2) / nx);
    304         ratecal  = Form("%8.1f", ical <0 ? 0 : htp->Integral(1, nx, ical,  ical)  / nx);
    305         ratetrig = Form("%8.1f", itrig<0 ? 0 : htp->Integral(1, nx, itrig, itrig) / nx);
    306         ratesum  = Form("%8.1f", isum <0 ? 0 : htp->Integral(1, nx, isum,  isum)  / nx);
    307         ratenull = Form("%8.1f", inull<0 ? 0 : htp->Integral(1, nx, inull, inull) / nx);
    308         ratena   = Form("%7.2f", ina  <0 ? 0 : htp->Integral(1, nx, ina,   ina)   / nx);
     305        rateped  = iped <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, iped,  iped)  / nx);
     306        rateped2 = iped2<0 ? "NULL" : Form("%7.2f", htp->Integral(1, nx, iped2, iped2) / nx);
     307        ratecal  = ical <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, ical,  ical)  / nx);
     308        ratetrig = itrig<0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, itrig, itrig) / nx);
     309        ratesum  = isum <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, isum,  isum)  / nx);
     310        ratenull = inull<0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, inull, inull) / nx);
     311        ratena   = ina  <0 ? "NULL" : Form("%7.2f", htp->Integral(1, nx, ina,   ina)   / nx);
    309312    }
    310313
    311314    // *****************************************************
    312 
    313     // *****************************************************
    314 
    315315
    316316    cout << "Sequence #" << seq << endl;
     
    319319    cout << "  Mean Signal  inner [phe] " << meansiginner  << endl;
    320320    cout << "  Mean Signal  outer [phe] " << meansigouter  << endl;
     321    cout << "  Mean extracted  PulsePos " << meanextpulpos << " +- " << rmsextpulpos << endl;
    321322    cout << "  Mean calibrated PulsePos " << meanpulpos    << " +- " << rmspulpos    << endl;
    322     cout << "  Mean extracted  PulsePos " << meanextpulpos << " +- " << rmsextpulpos << endl;
     323    cout << "  Mean calib pulse pos     " << calpos << endl;
    323324//    cout << "  Mean ext.HiGain PulsePos " << meanpulhi     << " +- " << rmspulhi     << endl;
    324325//    cout << "  Mean ext.LoGain PulsePos " << meanpullo     << " +- " << rmspullo     << endl;
     
    346347                        " fPulsePosMean=%s,      fPulsePosRms=%s,      "
    347348                        " fPulsePosCheckMean=%s, fPulsePosCheckRms=%s, "
     349                        " fPulsePosCalib=%s, "
    348350                        //" fPulsePosHiMean=%s,    fPulsePosHiRms=%s,    "
    349351                        //" fPulsePosLoMean=%s,    fPulsePosLoRms=%s,    "
     
    360362                         meanpulpos.Data(),    rmspulpos.Data(),
    361363                         meanextpulpos.Data(), rmsextpulpos.Data(),
     364                         calpos.Data(),
    362365                         //meanpulhi.Data(),     rmspulhi.Data(),
    363366                         //meanpullo.Data(),     rmspullo.Data(),
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r8934 r8940  
    183183        return 2;
    184184    }
    185     TString maxhum = Form("%5.1f", TMath::MaxElement(g->GetN(), g->GetY()));
    186     TString avghum = Form("%5.1f", g->GetMean(2));
     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";
    187187
    188188    g = (TGraph*)arr.FindObjectInCanvas("Temperature", "TGraph", "MHWeather");
     
    192192        return 2;
    193193    }
    194     TString avgtemp = Form("%5.1f", g->GetMean(2));
     194    TString avgtemp = g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
    195195
    196196    g = (TGraph*)arr.FindObjectInCanvas("WindSpeed", "TGraph", "MHWeather");
     
    200200        return 2;
    201201    }
    202     TString avgwind = Form("%5.1f", g->GetMean(2));
     202    TString avgwind = g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
    203203
    204204    g = (TGraph*)arr.FindObjectInCanvas("Cloudiness", "TGraph", "MHWeather");
    205205    if (!g)
    206206        cout << "WARNING - Reading of Cloudiness failed." << endl;
    207     TString avgclouds = g ? Form("%5.1f", g->GetMean(2)) : 0;
    208     TString rmsclouds = g ? Form("%5.1f", g->GetRMS(2))  : 0;
     207    TString avgclouds = g ? Form("%5.1f", g->GetMean(2)) : "NULL";
     208    TString rmsclouds = g ? 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) : 0;
     213    TString avgsky = g ? Form("%5.1f", g->GetMean(2)+200) : "NULL";
    214214
    215215
     
    218218        cout << "WARNING - Reading of NumStars failed." << endl;
    219219
    220     Double_t numstarmed = g ? TMath::Median(g->GetN(), g->GetY()) : -1;
    221     TString numstarsmed = Form("%5.1f", numstarmed);
    222     Double_t numstarrms = g ? g->GetRMS(2) : -1;
    223     TString numstarsrms = Form("%5.1f", numstarrms);
     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";
    224222
    225223    g = (TGraph*)arr.FindObjectInCanvas("NumStarsCor", "TGraph", "MHPointing");
     
    230228    }
    231229
    232     TString numcorsmed = Form("%5.1f", g ? TMath::Median(g->GetN(), g->GetY()) : -1);
    233     TString numcorsrms = Form("%5.1f", g ? g->GetRMS(2) : -1);
     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";
    234232
    235233    g = (TGraph*)arr.FindObjectInCanvas("Brightness", "TGraph", "MHPointing");
     
    240238    }
    241239
    242     TString skybrightnessmed = Form("%5.1f", g ? TMath::Median(g->GetN(), g->GetY()) : -1);
    243     TString skybrightnessrms = Form("%5.1f", g ? g->GetRMS(2) : -1);
    244 
     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";
    245242
    246243    TString sequence = fname(TRegexp("star[0-9]+[.]root$"));
Note: See TracChangeset for help on using the changeset viewer.