Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 5397)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 5398)
@@ -20,4 +20,17 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/11/12: Thomas Bretz
+
+   * mraw/MRawEvtData.cc:
+     - fixed a bug in the initialisation of the arrays (in both
+       cases - hi- and lo-gain - the number of hi gain samples were
+       used
+     - do not try to read lo gains if poslo==NULL
+
+   * mraw/MRawRunHeader.cc:
+     - updated Print()
+
+
+
  2004/11/11: Markus Gaug
 
Index: /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 5397)
+++ /trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 5398)
@@ -187,5 +187,5 @@
     *fLog << dec << all;
     *fLog << GetDescriptor() << ": " << endl;
-    *fLog << "HiGain: " << nHiPix << " Pixels with " << (Int_t)nHiSamp << " Samples  ";
+    *fLog << "HiGain: " << nHiPix << " Pixels with " << (Int_t)nHiSamp << " Samples" << endl;
     *fLog << "LoGain: " << nLoPix << " Pixels with " << (Int_t)nLoSamp << " Samples";
 
@@ -368,6 +368,6 @@
 void MRawEvtData::InitArrays(UShort_t numconnected, UShort_t maxid)
 {
-    const Int_t numlo = fRunHeader ? fRunHeader->GetNumSamplesHiGain() : 0;
     const Int_t numhi = fRunHeader ? fRunHeader->GetNumSamplesHiGain() : 0;
+    const Int_t numlo = fRunHeader ? fRunHeader->GetNumSamplesLoGain() : 0;
 
     fHiGainPixId       = new MArrayS(numconnected);
@@ -464,18 +464,15 @@
     // Read data for one pixel
     fin.read((char*)poshi, fRunHeader->GetNumSamplesHiGain());
-    fin.read((char*)poslo, fRunHeader->GetNumSamplesLoGain());
-
-    //
-    //  This is to fill the data of one pixel to the MRawEvtHeader Class.
-    //  The parameters are the pixelnumber and the FADC_SLICES values of ADCs
-    //  Add to lo gains if lflag = 1
-    //
     fHiGainPixId->AddAt(npix, fConnectedPixels);
 
-    // FIXME: Not implemented in the raw files yet
-    //if (IsLoGainOn(i, j))
-    //{
-    fLoGainPixId->AddAt(npix, fConnectedPixels);
-    //}
+    if (poslo)
+    {
+        fin.read((char*)poslo, fRunHeader->GetNumSamplesLoGain());
+        // FIXME: Not implemented in the raw files yet
+        //if (IsLoGainOn(i, j))
+        //{
+        fLoGainPixId->AddAt(npix, fConnectedPixels);
+        //}
+    }
 
     if (ab)
Index: /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 5397)
+++ /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 5398)
@@ -234,5 +234,6 @@
     *fLog << "Run Stop:     " << fRunStop << endl;
     *fLog << "Crates:       " << fNumCrates << " x " << fNumPixInCrate << " Pixel/Crate = " << fNumCrates*fNumPixInCrate << " Pixel/Evt" << endl;
-    *fLog << "Samples:      " << fNumSamplesLoGain << "/" << fNumSamplesHiGain << " (lo/hi) = " << (fNumSamplesLoGain+fNumSamplesHiGain) * fNumCrates * fNumPixInCrate /1024 << "kB/Evt" << endl;
+    *fLog << "Num Pixels:   " << GetNumNormalPixels() << " (normal) + " << GetNumSpecialPixels() << " (special) = " << GetNumConnectedPixels() << " (total)" << endl;
+    *fLog << "Samples:      " << fNumSamplesHiGain << "/" << fNumSamplesLoGain << " (hi/lo) = " << (fNumSamplesLoGain+fNumSamplesHiGain) * fNumCrates * fNumPixInCrate /1024 << "kB/Evt" << endl;
     *fLog << "Evt Counter:  " << fNumEvents << endl;
 
