Index: trunk/MagicSoft/Mars/mtemp/mifae/Changelog
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mifae/Changelog	(revision 6722)
+++ trunk/MagicSoft/Mars/mtemp/mifae/Changelog	(revision 6723)
@@ -18,4 +18,8 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2005/03/03 Javier Rico
+    * programs/makeHillas.cc programs/makehillas.datacard
+      - read initial list of bad pixels from ascii file
+      - include MImagePar as output container
 
  2005/02/15 Javier Rico
Index: trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc	(revision 6722)
+++ trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc	(revision 6723)
@@ -98,4 +98,5 @@
 TString  filter;
 TString  psfilename("makehillas.ps");
+TString  bpfilename;
 MRunIter pedcaliter;
 MRunIter caliter;
@@ -202,9 +203,21 @@
   /* FIRST LOOP: PEDESTAL COMPUTATION FOR CALIBRATION */
   /****************************************************/
-
+  
   // If you want to exclude pixels from the beginning, read 
   // an ascii-file with the corr. pixel numbers (see MBadPixelsCam)  
   //badcam.AsciiRead("badpixels.dat");
-
+  MBadPixelsCam badcam;
+  MGeomCamMagic geomcam;
+  MGeomApply      geomapl;
+  badcam.InitSize(geomcam.GetNumPixels());
+
+  if(bpfilename.Length()>0)
+    {
+      ifstream fin("/home/emma/Mars/mtemp/mifae/programs/badpixels.dat");
+      badcam.AsciiRead((istream&)fin);
+      badcam.Print();
+    }
+  
+  
   MJPedestal pedloop1;
   MJPedestal pedloop2;
@@ -215,5 +228,6 @@
       pedloop1.SetInput(&pedcaliter);
       pedloop1.SetExtractor(extractor);
-      pedloop1.SetNoStorage();
+      pedloop1.SetBadPixels(badcam);
+     pedloop1.SetNoStorage();
       if (!pedloop1.Process())
 	return;
@@ -226,6 +240,7 @@
           /***********************************************************/
           pedloop2.SetNoStorage();
-          pedloop2.SetExtractor(extractor);
-          pedloop2.SetPedestals(pedloop1.GetPedestalCam());  
+          pedloop2.SetExtractor(extractor); 
+	  pedloop2.SetBadPixels(pedloop1.GetBadPixels());
+	  pedloop2.SetPedestals(pedloop1.GetPedestalCam());  
           pedloop2.SetInput(&pedcaliter);
           
@@ -265,9 +280,5 @@
   MParList  plist3;
   MTaskList tlist3;
-  
-  // containers
-  MGeomCamMagic geomcam;
-  MGeomApply      geomapl;
-  
+    
   plist3.AddToList(&tlist3);
   plist3.AddToList(&geomcam);
@@ -547,4 +558,5 @@
   write.AddContainer("MTopology"      , "Parameters");
   write.AddContainer("MPointingPos"   , "Parameters");
+  write.AddContainer("MImagePar"      , "Parameters");
   if(rffilename.Length())
     write.AddContainer("MHadronness",     "Parameters");
@@ -714,4 +726,8 @@
       if(strcmp(word.Data(),"PSFILENAME")==0)
 	ifun >> psfilename;
+
+      // excluded pixels file name
+      if(strcmp(word.Data(),"BADPIXELFILE")==0)
+	ifun >> bpfilename;
 
       // calibration flag
@@ -804,4 +820,6 @@
   if(display)
     cout << "Generating PS file: " << psfilename << endl;
+  if(bpfilename.Length())
+    cout << "Bad pixels will be read from " << bpfilename << endl;
   cout << "Signal Extractor: " << chext[sext] << " with bounds ("<<hifirst<<","<<hilast<<","<<lofirst<<","<<lolast<<"), window size " << wsize << endl;
   cout << "Calibration: ";
Index: trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard	(revision 6722)
+++ trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard	(revision 6723)
@@ -11,5 +11,5 @@
 
 // Maximun number of (data) events to be processed)
-NEVENTS 10000
+NEVENTS 9999999
 
 // data file directory
@@ -41,4 +41,8 @@
 // PS file name
 PSFILENAME makehillas.ps
+
+// If want to include a file with a list of bad pixels, add next word
+// followed by the name of the file (provide the whole path)
+BADPIXELFILE /home/emma/Mars/mtemp/mifae/programs/badpixels.dat
 
 // Signal extractor, higain first, higainlast, logainfirst, logainlast, window size
