Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8470)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8471)
@@ -19,4 +19,12 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2007/05/03 Daniel Hoehne
+
+   * datacenter/macros/fillsignal.C:
+     - fixed bug which made fillsignal fail for the new MUX data:
+       for sequences > 200000 hilooff and hilocal are not needed anymore
+
+
+
  2007/04/28 Daniela Dorner
 
Index: trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 8470)
+++ trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C	(revision 8471)
@@ -131,16 +131,65 @@
     }
 */
-    MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
-    if (!hilooff)
-    {
-        cout << "WARNING - Reading of HiLoOff failed." << endl;
-        return 2;
-    }
-
-    MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
-    if (!hilocal)
-    {
-        cout << "WARNING - Reading of HiLoCal failed." << endl;
-        return 2;
+
+    //get sequence number from the filename
+    TString sequence = fname(TRegexp("signal[0-9]+[.]root$"));
+    if (sequence.IsNull())
+    {
+        cout << "WARNING - Sequ# empty" << endl;
+        cout << "Sequ# " << sequence << endl;
+        return 2;
+    }
+
+    Int_t seq = atoi(sequence.Data()+6);
+
+    Double_t medoff;
+    Double_t devoff;
+
+    Double_t medcal;
+    Double_t devcal;
+
+    TString medpuloff;
+    TString devpuloff;
+    TString medhilocal;
+    TString devhilocal;
+
+    if (seq > 200000)
+    {
+        cout << "INFO - HiLoOff not used anymore." << endl;
+        cout << "INFO - HiLoCal not used anymore." << endl;
+
+        medpuloff.Form("NULL");
+        devpuloff.Form("NULL");
+        medhilocal.Form("NULL");
+        devhilocal.Form("NULL");
+
+    }
+
+    else
+    {
+        MHCamera *hilooff = (MHCamera*)arr.FindObjectInCanvas("HiLoOff;avg", "MHCamera", "HiLoOff");
+        if (!hilooff)
+        {
+            cout << "WARNING - Reading of HiLoOff failed." << endl;
+            return 2;
+        }
+
+        MHCamera *hilocal = (MHCamera*)arr.FindObjectInCanvas("HiLoCal;avg", "MHCamera", "HiLoCal");
+        if (!hilocal)
+        {
+            cout << "WARNING - Reading of HiLoCal failed." << endl;
+            return 2;
+        }
+
+        medoff = TMath::Nint(hilooff->GetMedian()*10000)/10000.;
+        devoff = TMath::Nint(hilooff->GetDev()   *10000)/10000.;
+
+        medcal = TMath::Nint(hilocal->GetMedian()*100)/100.;
+        devcal = TMath::Nint(hilocal->GetDev()   *100)/100.;
+
+        medpuloff.Form("%7.4f", medoff);
+        devpuloff.Form("%7.4f", devoff);
+        medhilocal.Form("%6.2f", medcal);
+        devhilocal.Form("%6.2f", devcal);
     }
 
@@ -217,20 +266,5 @@
     // 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->GetDev()   *10000)/10000.;
-
-    Double_t medcal = TMath::Nint(hilocal->GetMedian()*100)/100.;
-    Double_t devcal = TMath::Nint(hilocal->GetDev()   *100)/100.;
-
-    //get sequence number from the filename
-    TString sequence = fname(TRegexp("signal[0-9]+[.]root$"));
-    if (sequence.IsNull())
-    {
-        cout << "WARNING - Sequ# empty" << endl;
-        cout << "Sequ# " << sequence << endl;
-        return 2;
-    }
-
-    Int_t seq = atoi(sequence.Data()+6);
+
     TString meanrmsinner =Form("%6.2f", meanrmsi);
     TString meanrmsouter =Form("%6.2f", meanrmso);
@@ -248,8 +282,4 @@
     TString rmspullo     =Form("%6.2f", rmslo);
     */
-    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)
