Index: trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 7866)
+++ trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 7870)
@@ -213,10 +213,13 @@
     Double_t meanoff = TMath::Nint(pullo->GetMean()*100.)/100.;
     Double_t rmsoff  = TMath::Nint(pullo->GetRMS() *100.)/100.;
- */
-    Double_t meanoff = TMath::Nint(hilooff->GetMean()*100.)/100.;
-    Double_t rmsoff  = TMath::Nint(hilooff->GetRMS() *100.)/100.;
-
-    Double_t meancal = TMath::Nint(hilocal->GetMean()*100.)/100.;
-    Double_t rmscal  = TMath::Nint(hilocal->GetRMS() *100.)/100.;
+    */
+
+    // USE MEDIAN INSTEAD? GetQuantiles(Int_t nprobSum, Double_t *q, const Double_t *probSum=0);
+
+    Double_t medoff = TMath::Nint(hilooff->GetMedian()   *10000)/10000.;
+    Double_t devoff = TMath::Nint(hilooff->GetMedianDev()*10000)/10000.;
+
+    Double_t medcal = TMath::Nint(hilocal->GetMedian()   *100)/100.;
+    Double_t devcal = TMath::Nint(hilocal->GetMedianDev()*100)/100.;
 
     //get sequence number from the filename
@@ -245,8 +248,8 @@
     TString rmspullo     =Form("%6.2f", rmslo);
     */
-    TString meanpuloff   =Form("%6.2f", meanoff);
-    TString rmspuloff    =Form("%6.2f", rmsoff);
-    TString meanhilocal  =Form("%6.2f", meancal);
-    TString rmshilocal   =Form("%6.2f", rmscal);
+    TString medpuloff    =Form("%7.4f", medoff);
+    TString devpuloff    =Form("%7.4f", devoff);
+    TString medhilocal   =Form("%6.2f", medcal);
+    TString devhilocal   =Form("%6.2f", devcal);
 
     if (meanextpul<0 && rmsextpul<0)
@@ -270,6 +273,6 @@
 //    cout << "  Mean ext.HiGain PulsePos " << meanpulhi     << " +- " << rmspulhi     << endl;
 //    cout << "  Mean ext.LoGain PulsePos " << meanpullo     << " +- " << rmspullo     << endl;
-    cout << "  Lo-Hi gain offset:       " << meanpuloff    << " +- " << rmspuloff    << endl;
-    cout << "  Hi/Lo gain ratio:        " << meanhilocal   << " +- " << rmshilocal   << endl;
+    cout << "  Lo-Hi gain offset:      " << medpuloff    << " +-  " << devpuloff    << endl;
+    cout << "  Hi/Lo gain ratio:        " << medhilocal   << " +- " << devhilocal   << endl;
     cout << endl;
 
@@ -285,6 +288,6 @@
                          //" fPulsePosHiMean=%s,    fPulsePosHiRms=%s,    "
                          //" fPulsePosLoMean=%s,    fPulsePosLoRms=%s,    "
-                         " fPulsePosOffMean=%s,   fPulsePosOffRms=%s,   "
-                         " fHiLoGainRatioMean=%s, fHiLoGainRatioRms=%s "
+                         " fPulsePosOffMed=%s,    fPulsePosOffDev=%s,   "
+                         " fHiLoGainRatioMed=%s,  fHiLoGainRatioDev=%s  "
                          " WHERE fSequenceFirst='%d' ",
                          meanrmsinner.Data(),  meanrmsouter.Data(),
@@ -294,6 +297,6 @@
                          //meanpulhi.Data(),     rmspulhi.Data(),
                          //meanpullo.Data(),     rmspullo.Data(),
-                         meanpuloff.Data(),    rmspuloff.Data(),
-                         meanhilocal.Data(),   rmshilocal.Data(),
+                         medpuloff.Data(),    devpuloff.Data(),
+                         medhilocal.Data(),   devhilocal.Data(),
                          seq);
 
