Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8148)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8149)
@@ -18,4 +18,41 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2006/10/23
+
+   * mbadpixels/MBadPixelsCam.cc:
+     - optimized log-output
+
+   * mcalib/MCalibCalcFromPast.cc:
+     - added some comments
+
+   * mcalib/MCalibrationChargeCalc.cc, mhcalib/MHCalibrationCam.cc,
+     mcalib/MCalibrationChargePix.cc:
+     - changed format of a lot of output
+
+   * mfbase/MFDataPhrase.cc:
+     - added output of a newline in the constructor
+
+   * mhcalib/MHCalibrationChargeCam.cc:
+     - count saturation only once (count the number of events not
+       the total number of saturating slices)
+     - changed format of a lot of output
+
+   * mhcalib/MHCalibrationPulseTimeCam.cc:
+     - simple optimization to algorithm, do not consider pixels
+       above saturation limit at all
+
+   * mbadpixels/MBadPixelsCam.[h,cc], mbadpixels/MBadPixelsIntensityCam.h:
+     - removed the run-option from the ascii input files
+     - allow merging a smaller into a larger camera
+
+   * mjobs/badpixels_0_559.rc:
+     - adapted
+
+   * mdata/MDataPhrase.cc:
+     - when checking for the matrices we have to start from the beginning
+       of our phrase
+
+
+
  2006/10/23
 
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 8148)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 8149)
@@ -150,5 +150,5 @@
         InitSize(n);
 
-    if (n!=GetSize())
+    if (GetSize()<n)
     {
         *fLog << warn << "MBadPixelsCam::Merge: Size mismatch (" << n << "," << GetSize() << ")... ignored." << endl;
@@ -559,16 +559,12 @@
 //
 // Read from an ascii file of the format:
-//    pixel1 pixel2 pixel3 pixel4
+//    pixel1
+//    pixel2
+//    pixel3
+//    pixel4
 // while pixel1,2,3,4 are the pixel indices used in the software.
 //
-// To read the pixels corresponding to a given run you can give run!=0
-// and a file of the format:
-//   1234: 17 193 292
-//   1235: 17 193 292 293
-//
-void MBadPixelsCam::AsciiRead(istream &fin, UInt_t run=0)
-{
-
-    Int_t len;
+void MBadPixelsCam::AsciiRead(istream &fin)
+{
     TString str;
 
@@ -576,34 +572,11 @@
     {
         str.ReadLine(fin);
-
-        if (str.IsNull())
-          {
-            *fLog << warn << GetDescriptor() 
-                  << ": Cannot apply AsciiRead from istream pointer. "
-                  << "Either file does not exist or file is empty! " << endl;
-            return;
-          }
-
-        Int_t r;
-
-        const Int_t n = sscanf(str.Data(), " %d : %n", &r, &len);
-        if (n!=1)
-            return;
-
-        if (run==0 || run && (UInt_t)r==run)
+        if (!fin)
             break;
-    }
-
-    str.Remove(0, len);
-
-    while (1)
-    {
-        Int_t idx;
-        const Int_t n = sscanf(str.Data(), " %d %n", &idx, &len);
-
-        if (n!=1)
-            break;
-
-        str.Remove(0, len);
+
+        if (str[0]=='#')
+            continue;
+
+        const Int_t idx = str.Atoi();
 
         if (idx>=GetSize())
@@ -617,18 +590,11 @@
 // --------------------------------------------------------------------------
 //
-// Write the information into an ascii file. If a run-number is given the
-// run-number will lead the line.
-//
-Bool_t MBadPixelsCam::AsciiWrite(ostream &fout, UInt_t run=0) const
-{
-    if (run)
-        fout << run << ":";
-
+// Write the information into an ascii file.
+//
+Bool_t MBadPixelsCam::AsciiWrite(ostream &fout) const
+{
     for (int i=0; i<GetSize(); i++)
         if ((*this)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableRun))
-            fout << " " << i;
-
-    if (run && GetSize())
-        fout << endl;
+            fout << i << endl;
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h	(revision 8148)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h	(revision 8149)
@@ -50,8 +50,6 @@
     Short_t GetNumMaxCluster(const MGeomCam &geom, Int_t aidx=-1) { return GetNumMaxCluster(MBadPixelsPix::kUnsuitableRun, geom, aidx); }
 
-    void   AsciiRead(istream &fin, UInt_t run);
-    void   AsciiRead(istream &fin) { AsciiRead(fin, 0); }
-    Bool_t AsciiWrite(ostream &out, UInt_t run) const;
-    Bool_t AsciiWrite(ostream &out) const { return AsciiWrite(out, 0); }
+    void   AsciiRead(istream &fin);
+    Bool_t AsciiWrite(ostream &out) const;
 
     Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h	(revision 8148)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsIntensityCam.h	(revision 8149)
@@ -71,12 +71,6 @@
         { return GetCam()->GetNumMaxCluster(geom, aidx); }
   
-  void   AsciiRead(istream &fin, UInt_t run) 
-	{ GetCam()->AsciiRead(fin,run); }
-  void   AsciiRead(istream &fin) 
-	{GetCam()->AsciiRead(fin); }
-  Bool_t AsciiWrite(ostream &out, UInt_t run) 
-	const { return GetCam()->AsciiWrite(out,run); }
-  Bool_t AsciiWrite(ostream &out) 
-	const { return GetCam()->AsciiWrite(out); }
+  void   AsciiRead(istream &fin) { GetCam()->AsciiRead(fin); }
+  Bool_t AsciiWrite(ostream &out) const { return GetCam()->AsciiWrite(out); }
   
   // Inits
Index: trunk/MagicSoft/Mars/mdata/MDataPhrase.cc
===================================================================
--- trunk/MagicSoft/Mars/mdata/MDataPhrase.cc	(revision 8148)
+++ trunk/MagicSoft/Mars/mdata/MDataPhrase.cc	(revision 8149)
@@ -282,4 +282,6 @@
     }
 
+    p = 0;
+
     // Now check for matrix elemets as M[5]
     reg = TPRegexp("\\w+\\[\\d+\\]");
Index: trunk/MagicSoft/Mars/mjobs/badpixels_0_559.rc
===================================================================
--- trunk/MagicSoft/Mars/mjobs/badpixels_0_559.rc	(revision 8148)
+++ trunk/MagicSoft/Mars/mjobs/badpixels_0_559.rc	(revision 8149)
@@ -1,1 +1,2 @@
-0: 0 559
+0
+559
