Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5364)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5365)
@@ -20,5 +20,13 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/11/09: Abelardo Moralejo
+
+   * mfilter/MFSize.cc
+     - Eliminated allocation of histogram fProb in constructor. Now
+       it has to be supplied by the user.
+
+
  2004/11/09: Hendrik Bartko
+
    * msignal/MExtractTimeAndChargeDigitalFilter.cc
      - implemented an unbiased application of the digital filter in the
Index: /trunk/MagicSoft/Mars/mfilter/MFSize.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfilter/MFSize.cc	(revision 5364)
+++ /trunk/MagicSoft/Mars/mfilter/MFSize.cc	(revision 5365)
@@ -59,24 +59,8 @@
 //     Constructor
 //
-MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0)
+MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0), fProb(NULL)
 {
   fName  = name  ? name  : "MFSize";
   fTitle = title ? title : "Filter to select events according to Size";
-
-  //
-  // Default fProb histogram: 20 bins in the log10(Size) range [2,4]
-  // Values are calculated to make the Size distribution of MC gammas
-  // in the standard MC sample to look like the distribution for MC 
-  // hadrons (p+He)
-  //
-  fProb = new TH1F("ProbVsLog10Size", "", 20, 2., 4.);
-
-  Float_t frac[20] = {0.144928, 0.171911, 0.18763, 0.209461, 0.253219, 
- 		      0.305425, 0.384593, 0.485204, 0.612452, 0.708138, 
- 		      0.754522, 0.728028, 0.774046, 0.791422, 0.808775, 
- 		      0.896842, 1., 1., 1., 1.};
-  
-  for (Int_t i = 0; i < 20; i++)
-    fProb->SetBinContent(i+1, frac[i]);
 }
 
@@ -114,4 +98,11 @@
 Int_t MFSize::PreProcess(MParList *pList)
 {
+  if (!fProb)
+    {
+      *fLog << err << dbginf << fName <<
+	" Histogram fProb not set. You must call MFSize::SetProb(TH1F*) before the event loop." << endl;
+      return kFALSE;
+    }  
+
   fHillas = (MHillas*)pList->FindObject(AddSerialNumber("MHillas"));
     if (!fHillas)
