Index: trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawCrateArray.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mraw/MRawCrateData.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawCrateData.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawCrateData.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -39,4 +39,5 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MRawCrateData);
@@ -64,6 +65,7 @@
 void MRawCrateData::Print(Option_t *t) const
 {
-    gLog << "Crate Number " << fDAQCrateNumber << ":  ";
-    gLog << "FADCEventNr=" << fFADCEvtNumber << "  ";
-    gLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
+    *fLog << all;
+    *fLog << "Crate Number " << fDAQCrateNumber << ":  ";
+    *fLog << "FADCEventNr=" << fFADCEvtNumber << "  ";
+    *fLog << "FADCClockTick=" << fFADCClockTick << " (20MHz)" << endl;
 }
Index: trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtData.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -49,6 +49,4 @@
 
 #include "MRawEvtData.h"
-
-#include <iomanip.h>
 
 #include <fstream.h>
@@ -155,5 +153,5 @@
     fLog->unsetf(ios::showbase);
 
-    *fLog << dec;
+    *fLog << dec << all;
     *fLog << "HiGain: " << nHiPix << " Pixels with " << (Int_t)nHiSamp << " Samples" << endl;
     *fLog << "LoGain: " << nLoPix << " Pixels with " << (Int_t)nLoSamp << " Samples";;
@@ -213,5 +211,5 @@
     if (GetNumPixels()==0)
     {
-        *fLog << "Sorry, no pixel to draw!" << endl;
+        *fLog << warn << "Sorry, no pixel to draw!" << endl;
         return;
     }
@@ -229,5 +227,5 @@
             num= GetNumPixels();
 
-        *fLog << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl;
+        *fLog << inf << "Drawing Graph: Pixel #" << num << " of " << (int)GetNumPixels() << endl;
 
         const Int_t n = GetNumHiGainSamples();
@@ -288,5 +286,5 @@
     }
 
-    *fLog << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl;
+    *fLog << warn << dbginf << "Warning - You must specify either 'GRAPH' or 'HIST'" << endl;
 }
 
@@ -375,5 +373,5 @@
     if (nSamp && ns!=nSamp)
     {
-        *fLog << "RawEvtData::AddPixel: Error, number of samples in ";
+        *fLog << err << "RawEvtData::AddPixel: Error, number of samples in ";
         *fLog << "TArrayC doesn't match actual number" << endl;
         return;
Index: trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -99,4 +99,6 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
+
 #include "MTime.h"
 #include "MArrayB.h"
@@ -117,5 +119,4 @@
     //   set all member to zero, init the pointer to ClonesArray,
     //
-
     fPixLoGainOn = new MArrayB;
 
@@ -180,4 +181,5 @@
 void MRawEvtHeader::Print(Option_t *o) const
 {
+    *fLog << all;
     *fLog << "DAQEvtNr: " << dec << fDAQEvtNumber << "  (";
     *fLog << "Trigger: ";
@@ -214,7 +216,5 @@
 
     *fLog << endl;
-
     *fLog << endl;
-
 }
 
Index: trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -143,8 +143,5 @@
 void MRawEvtPixelIter::Draw(Option_t *t)
 { 
-  char *txt = new char[6+strlen(t)];
-  sprintf(txt, "%s%d", t, *fHiGainId);
-  fData->Draw(txt);
-  delete txt; 
+    fData->Draw(Form("%s%d", t, *fHiGainId));
 }
 
Index: trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawFileRead.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -44,4 +44,6 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
+
 #include "MTime.h"
 #include "MParList.h"
@@ -92,14 +94,10 @@
 //
 MRawFileRead::MRawFileRead(const char *fname, const char *name, const char *title)
-    : fFileName(fname)
+    : fFileName(fname), fIn(NULL)
 {
     fName  = name  ? name  : "MRawFileRead";
     fTitle = title ? title : "Read task to read DAQ binary files";
 
-    //
-    // open the input stream
-    //
-    fFileName = fname;
-    fIn = new ifstream(fname);
+    fIn = new ifstream;
 }
 
@@ -132,10 +130,12 @@
 {
     //
+    // open the input stream
     // first of all check if opening the file in the constructor was
     // successfull
     //
+    fIn->open(fFileName);
     if (!(*fIn))
     {
-        *fLog << "Error: Cannot open file '" << fFileName << "'" << endl;
+        *fLog << err << "Error: Cannot open file '" << fFileName << "'" << endl;
         return kFALSE;
     }
@@ -231,14 +231,17 @@
 // --------------------------------------------------------------------------
 //
-//  Checks whether the number of read events differs from the number the
-//  file should containe (MRawRunHeader). Prints a warning if it doesn't
-//  match.
+//  Close the file. Check whether the number of read events differs from
+//  the number the file should containe (MRawRunHeader). Prints a warning
+//  if it doesn't match.
 //
 Bool_t MRawFileRead::PostProcess()
 {
+    //
+    // Sanity check for the number of events
+    //
     if (fRawRunHeader->GetNumEvents() == GetNumExecutions()-1)
         return kTRUE;
 
-    *fLog << "WARNING - number of read events (" << GetNumExecutions()-1;
+    *fLog << warn << "Warning - number of read events (" << GetNumExecutions()-1;
     *fLog << ") doesn't match number in run header (";
     *fLog << fRawRunHeader->GetNumEvents() << ")." << endl;
Index: trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawFileWrite.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -130,5 +130,5 @@
     if (!fRawEvtHeader)
     {
-        *fLog << dbginf << "MRawEvtHeader not found... aborting." << endl;
+        *fLog << err << dbginf << "MRawEvtHeader not found... aborting." << endl;
         return kFALSE;
     }
@@ -137,5 +137,5 @@
     if (!fRawEvtData)
     {
-        *fLog << dbginf << "MRawEvtData not found... aborting." << endl;
+        *fLog << err << dbginf << "MRawEvtData not found... aborting." << endl;
         return kFALSE;
     }
@@ -144,5 +144,5 @@
     if (!fRawCrateArray)
     {
-        *fLog << dbginf << "MRawCrateArray not found... aborting." << endl;
+        *fLog << err << dbginf << "MRawCrateArray not found... aborting." << endl;
         return kFALSE;
     }
@@ -151,5 +151,5 @@
     if (!fRawEvtTime)
     {
-        *fLog << dbginf << "MRawEvtTime not found... aborting." << endl;
+        *fLog << err << dbginf << "MRawEvtTime not found... aborting." << endl;
         return kFALSE;
     }
@@ -158,5 +158,5 @@
     if (!fRawRunHeader)
     {
-        *fLog << dbginf << "MRawRunHeader not found... aborting." << endl;
+        *fLog << err << dbginf << "MRawRunHeader not found... aborting." << endl;
         return kFALSE;
     }
@@ -254,6 +254,6 @@
     }
 
-    *fLog << dbginf << "Got wrong number for the trigger type: " << type;
-    *fLog << "  - skipping" << endl;
+    *fLog << warn << dbginf << "Got wrong number for the trigger type: " << type;
+    *fLog << " - skipped" << endl;
 
     return kCONTINUE;
Index: trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 1082)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -37,4 +37,6 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
+
 #include "MArrayS.h"
 
@@ -79,5 +81,5 @@
     if (fMagicNumber != kMagicNumber)
     {
-        *fLog << "Error: Wrong Magic Number: Not a Magic File!" << endl;
+        *fLog << err << "Error: Wrong Magic Number: Not a Magic File!" << endl;
         return;
     }
@@ -122,5 +124,5 @@
 void MRawRunHeader::Print(Option_t *t) const
 {
-    *fLog << endl;
+    *fLog << all << endl;
     *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl;
     *fLog << "Version:      " << dec << "Format=" << fFormatVersion << "  ";
