Index: trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc	(revision 2367)
+++ trunk/MagicSoft/Mars/mfileio/MReadCurrents.cc	(revision 2377)
@@ -24,13 +24,13 @@
 
 /////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MReadCurrents                                                         //
-//                                                                         //
-//  Input Containers:                                                      //
-//   -/-                                                                   //
-//                                                                         //
-//  Output Containers:                                                     //
-//   MCerPhotEvt                                                           //
-//                                                                         //
+//
+// MReadCurrents
+//
+//  Input Containers:
+//   -/-
+//
+//  Output Containers:
+//   MCerPhotEvt
+//
 /////////////////////////////////////////////////////////////////////////////
 #include "MReadCurrents.h"
@@ -63,5 +63,5 @@
 			     const char *name, 
                              const char *title)
-    : fIn(NULL)
+    : fIn(NULL), fNumPixel(577)
 {
     fName  = name  ? name  : "MReadCurrents";
@@ -225,5 +225,5 @@
     fTime->SetTime(h, m, s, ms*1000000);
 
-    for (int i=0; i<577; i++)
+    for (int i=0; i<fNumPixel; i++)
         *fIn >> (*fCurrents)[i];
 
Index: trunk/MagicSoft/Mars/mfileio/MReadCurrents.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadCurrents.h	(revision 2367)
+++ trunk/MagicSoft/Mars/mfileio/MReadCurrents.h	(revision 2377)
@@ -18,4 +18,6 @@
     TList     *fFileNames;   // Array which stores the \0-terminated filenames
 
+    Int_t      fNumPixel;
+
     Bool_t OpenNextFile();
 
@@ -32,4 +34,6 @@
     Int_t Process();
 
+    void SetNumPixel(Int_t i) { fNumPixel=i; }
+
     ClassDef(MReadCurrents, 0)	// Reads a Central Control currents file
 };
Index: trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 2367)
+++ trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 2377)
@@ -96,8 +96,12 @@
     //fTrees.SetOwner();
 
+    TString str(fname);
+    if (!str.EndsWith(".root", TString::kIgnoreCase))
+        str += ".root";
+
     //
     // Open the rootfile
     //
-    fOut = new TFile(fname, opt, ftitle, comp);
+    fOut = new TFile(str, opt, ftitle, comp);
 }
 
