Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 6239)
+++ trunk/MagicSoft/Mars/Changelog	(revision 6240)
@@ -21,4 +21,18 @@
                                                  -*-*- END OF LINE -*-*-
 
+ 2005/02/03 Thomas Bretz
+
+   * mfbase/MFilterList.[h,cc]:
+     - added new function AddToList(TCollection&)
+
+   * mhbase/MFillH.cc:
+     - print a warning if 'same'-option given without 
+       a corresponding existing tab
+
+   * mhflux/MHAlpha.[h,cc]:
+     - made time bins settable by user
+
+
+
  2005/02/03 Markus Gaug
 
@@ -29,4 +43,5 @@
      - intialize fTimeShiftHiGain and fTimeShiftLoGain by default.
  
+
 
  2005/02/02 Markus Gaug
@@ -69,8 +84,10 @@
 
 
+
  2005/02/01 Raquel de los Reyes
 
    * mjobs/MSequence.h
      - Added "Get" functions for the TArrays variables.
+
 
 
@@ -90,4 +107,6 @@
      - return kTRUE in PostProcess if GetNumExecutions is 0
 
+
+
  2005/02/01 Daniel Mazin
 
@@ -97,4 +116,6 @@
        MDrive tree
 
+
+
  2005/02/01 Thomas Bretz
 
@@ -102,4 +123,6 @@
      - another fix to make the batch mode working (you can use the batch
        mode to convert a root-file into another format)
+
+
 
  2005/01/31 Thomas Bretz
Index: trunk/MagicSoft/Mars/mfbase/MFilterList.cc
===================================================================
--- trunk/MagicSoft/Mars/mfbase/MFilterList.cc	(revision 6239)
+++ trunk/MagicSoft/Mars/mfbase/MFilterList.cc	(revision 6240)
@@ -237,4 +237,28 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// If you want to add a new filters from a TCollection to the list call
+// this function.
+//
+Bool_t MFilterList::AddToList(const TCollection &col)
+{
+    TIter Next(&col);
+    MFilter *f=0;
+    Int_t idx=0;
+    while ((f=(MFilter*)Next()))
+    {
+        if (!f->InheritsFrom(MFilter::Class()))
+        {
+            *fLog << warn << "WARNING - An object in TCollection doesn't inherit from MFilter... ignored." << endl;
+            continue;
+        }
+
+        f->SetName(Form("F%d", idx++));
+        if (!AddToList(f))
+            return kFALSE;
+    }
+    return kTRUE;
+}
 
 // --------------------------------------------------------------------------
Index: trunk/MagicSoft/Mars/mfbase/MFilterList.h
===================================================================
--- trunk/MagicSoft/Mars/mfbase/MFilterList.h	(revision 6239)
+++ trunk/MagicSoft/Mars/mfbase/MFilterList.h	(revision 6240)
@@ -44,4 +44,5 @@
 
     Bool_t AddToList(MFilter *filter);
+    Bool_t AddToList(const TCollection &col);
     void SetOwner(Bool_t enable=kTRUE) { enable ? SetBit(kIsOwner) : ResetBit(kIsOwner); }
 
Index: trunk/MagicSoft/Mars/mhbase/MFillH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhbase/MFillH.cc	(revision 6239)
+++ trunk/MagicSoft/Mars/mhbase/MFillH.cc	(revision 6240)
@@ -379,5 +379,10 @@
     fCanvas = 0;
     if (fDrawOption.Contains("same", TString::kIgnoreCase))
+    {
         fCanvas = fDisplay->GetCanvas(tabname);
+        if (!fCanvas)
+            *fLog << warn << "WARNING - 'same' option given, but no tab with name '" << tabname << "' found." << endl;
+    }
+
     if (!fCanvas)
         fCanvas = &fDisplay->AddTab(tabname);
Index: trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 6239)
+++ trunk/MagicSoft/Mars/mhflux/MHAlpha.cc	(revision 6240)
@@ -36,4 +36,11 @@
 // PRELIMINARY!
 //
+//
+// ToDo:
+// =====
+//
+//   - Replace time-binning by histogram (which is enhanced bin-wise)
+//
+//
 //////////////////////////////////////////////////////////////////////////////
 #include "MHAlpha.h"
@@ -78,6 +85,5 @@
     fPointPos(0), fTimeEffOn(0), fTime(0),
     fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE),
-    //fEnergyMin(-1), fEnergyMax(-1), fSizeMin(-1), fSizeMax(-1),
-    fMatrix(0)
+    fNumTimeBins(10), fMatrix(0)
 {
     //
@@ -299,4 +305,5 @@
 
     fLastTime = MTime();
+    fNumRebin = fNumTimeBins;
 
     MBinning binst, binse, binsa;
@@ -353,8 +360,4 @@
         return;
 
-    const Int_t steps = 10;
-
-    static int rebin = steps;
-
     if (!final)
     {
@@ -368,8 +371,8 @@
         {
             fLastTime=*fTimeEffOn;
-            rebin--;
-        }
-
-        if (rebin>0)
+            fNumRebin--;
+        }
+
+        if (fNumRebin>0)
             return;
     }
@@ -384,5 +387,5 @@
         *fLog << "This should not happen. Maybe you started you eventloop with" << endl;
         *fLog << "an already initialized time stamp MTimeEffectiveOnTime?" << endl;
-        rebin++;
+        fNumRebin++;
         return;
     }
@@ -426,5 +429,5 @@
     *fLog << all << *fTimeEffOn << ": " << fit.GetEventsExcess() << endl;
 
-    rebin = steps;
+    fNumRebin = fNumTimeBins;
 }
 
@@ -902,2 +905,13 @@
     fMatrix = NULL; 
 }
+
+Int_t MHAlpha::ReadEnv(const TEnv &env, TString prefix, Bool_t print)
+{
+    Bool_t rc = kFALSE;
+    if (IsEnvDefined(env, prefix, "NumTimeBins", print))
+    {
+        SetNumTimeBins(GetEnvValue(env, prefix, "NumTimeBins", fNumTimeBins));
+        rc = kTRUE;
+    }
+    return rc;
+}
Index: trunk/MagicSoft/Mars/mhflux/MHAlpha.h
===================================================================
--- trunk/MagicSoft/Mars/mhflux/MHAlpha.h	(revision 6239)
+++ trunk/MagicSoft/Mars/mhflux/MHAlpha.h	(revision 6240)
@@ -104,12 +104,10 @@
     MTime    fLastTime;         //! Last fTimeEffOn
 
-    //Float_t fEnergyMin;
-    //Float_t fEnergyMax;
-    //Float_t fSizeMin;
-    //Float_t fSizeMax;
-
     Bool_t fSkipHistTime;
     Bool_t fSkipHistTheta;
     Bool_t fSkipHistEnergy;
+
+    UShort_t fNumTimeBins;      // Number of time bins to fill together
+    UShort_t fNumRebin;         //!
 
     //const TString fNameProjAlpha;  //! This should make sure, that gROOT doen't confuse the projection with something else
@@ -144,4 +142,5 @@
         fOffData = &h.fHAlpha;
     }
+    void SetNumTimeBins(UShort_t n) { fNumTimeBins = n; }
 /*
     void SetSizeCuts(Float_t min, Float_t max)   { fSizeMin=min; fSizeMax=max; }
@@ -162,7 +161,4 @@
     void SkipHistEnergy(Bool_t b=kTRUE) { fSkipHistEnergy=b; }
 
-    void Paint(Option_t *opt="");
-    void Draw(Option_t *option="");
-
     void DrawAll(); //*MENU*
 
@@ -170,4 +166,11 @@
     void StopMapping();
 
+    // TObject
+    void Paint(Option_t *opt="");
+    void Draw(Option_t *option="");
+
+    // MParContainer
+    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
+
     ClassDef(MHAlpha, 1) // Alpha-Plot which is fitted online
 };
