Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 6244)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 6245)
@@ -32,4 +32,7 @@
    * mhflux/MHAlpha.[h,cc]:
      - made time bins settable by user
+
+   * mfileio/MWriteRootFile.cc:
+     - fixed ReInit and a warning output when writing to memory
 
 
@@ -53,4 +56,6 @@
    * mcalib/MCalibrationTestCam.cc
      - initialize a missing array in InitAverageAreas
+
+
 
  2005/02/02 Markus Gaug
Index: /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 6244)
+++ /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 6245)
@@ -146,4 +146,9 @@
 // TFile.
 //
+// To create a memory based TTree use
+//   fname  = name of TTree
+//   option = "memory"
+// Make sure you do not read from a tree with the same name!
+//
 MWriteRootFile::MWriteRootFile(const char *fname,
                                const Option_t *option,
@@ -161,5 +166,5 @@
     // Check if we are writing to memory
     //
-    if (opt.Contains("memory"))
+    if (opt.Contains("memory", TString::kIgnoreCase))
     {
         fSplitRule = fname;
@@ -493,5 +498,5 @@
             branch->SetAddress(entry->GetAddress());
 
-            if (!fSplitRule.IsNull())
+            if (!fSplitRule.IsNull() && fOut)
             {
                 *fLog << warn << endl;
@@ -782,5 +787,6 @@
         while (1)
         {
-            TString sub = fname(idx+dest.Length());
+            //TString sub = fname(idx+dest.Length());
+            cout << "--------->" << fname << "<-----------" << endl;
             idx = regexp.Index(fname, &len);
             if (idx<0)
@@ -816,5 +822,5 @@
 Bool_t MWriteRootFile::ReInit(MParList *pList)
 {
-    if (fSplitRule.IsNull())
+    if (fSplitRule.IsNull() || !fOut)
         return MWriteFile::ReInit(pList);
 
