Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 6512)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 6513)
@@ -21,4 +21,22 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2005/02/16 Thomas Bretz
+
+   * mbase/MEvtLoop.cc:
+     - fixed a typo
+
+   * mbase/MParList.cc, mfileio/MReadMarsFile.cc,
+     mfileio/MReadTree.cc, mfileio/MWriteRootFile.cc,
+     mjobs/MJStar.cc:
+     - optimized size of some output
+
+   * mfileio/MWriteRootFile.[h,cc]:
+     - fixed CopySource option for single-file case
+
+   * mhist/MHCamEvent.cc:
+     - replaced the warn in SetupFill by an inf
+
+
 
  2005/02/15 Abelardo Moralejo
Index: /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 6513)
@@ -668,5 +668,5 @@
             "!   Author(s): Thomas Bretz et al. <mailto:tbretz@astro.uni-wuerzburg.de>" << endl <<
             "!" << endl <<
-            "!   Copyright: MAGIC Software Development, 2000-2002" << endl <<
+            "!   Copyright: MAGIC Software Development, 2000-2005" << endl <<
             "!" << endl <<
             "!" << endl <<
Index: /trunk/MagicSoft/Mars/mbase/MParList.cc
===================================================================
--- /trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 6513)
@@ -532,5 +532,8 @@
     // if object is not existing in the list try to create one
     //
-    *fLog << inf << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
+    *fLog << inf << "Object '" << oname << "' ";
+    if (oname!=cname)
+        *fLog << "[" << cname << "] ";
+    *fLog << "not yet in " << GetName() << "... creating." << endl;
 
     //
Index: /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 6513)
@@ -79,5 +79,5 @@
     // open the input stream
     //
-    fRun = new MReadTree("RunHeaders", fname, "ReadRunHeaders");
+    fRun = new MReadTree("RunHeaders", fname, "RunHeaders");
 
     //
Index: /trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 6513)
@@ -395,5 +395,5 @@
     {
         SetBit(kChainWasChanged);
-        *fLog << inf << GetDescriptor() << " - AddFile: " << numfiles << " files added from " << fname << "." << endl;
+        *fLog << inf << GetDescriptor() << ": Added " << fname << " <" << numfiles << ">" << endl;
     }
     else
@@ -839,6 +839,8 @@
         fTree->SetBranchAddress(bname, pcont); // *CHANGED-fChain-to-fTree*
 
-        *fLog << inf << "Master branch address '" << bname << "' [";
-        *fLog << classname << "] setup for reading." << endl;
+        *fLog << inf << "Master branch address '" << bname << "' ";
+        if ((TString)bname!=(TString)classname)
+            *fLog << "[" << classname << "] ";
+        *fLog << "setup for reading." << endl;
 
         //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
Index: /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 6513)
@@ -582,6 +582,8 @@
             // The containers should be written in Splitlevel=1
             //
-            *fLog << inf << "Creating Branch " << cname << " of " << cont->ClassName();
-            *fLog << " in tree " << tree->GetName() << "... " << flush;
+            *fLog << inf << "Creating Branch '" << cname << "' ";
+            if ((TString)cname!=(TString)cont->ClassName())
+                *fLog << "[" << cont->ClassName() << "] ";
+            *fLog << "in tree " << tree->GetName() << "... " << flush;
 
             branch = tree->Branch(branchname, cont->ClassName(), entry->GetAddress());
@@ -805,5 +807,5 @@
 // If you need more difficult rules please send me an eMail...
 //
-TString MWriteRootFile::GetNewFileName(TString &inname) const
+TString MWriteRootFile::GetNewFileName(const char *inname) const
 {
     // Remove the path from the filename
@@ -868,5 +870,5 @@
         path.Append("/");
 
-    inname.Prepend(path);
+    //inname.Prepend(path);
 
     // Create full qualified pathname
@@ -924,5 +926,8 @@
         TTree *gettree = dynamic_cast<TTree*>(file->Get(o->GetName()));
         if (!gettree)
-            continue;
+        {
+            *fLog << err << "ERROR - MakeCopies: Tree " << o->GetName() << " not found in file " << fname << "... abort." << endl;
+            return kFALSE;
+        }
 
         gettree->SetBranchStatus(o->GetTitle(), 1);
@@ -960,8 +965,24 @@
 Bool_t MWriteRootFile::ReInit(MParList *pList)
 {
+    MRead *read = (MRead*)pList->FindTask("MRead");
+    if (fSplitRule.IsNull() && fCopies.GetEntries()>0 && fOut)
+    {
+        if (!read)
+        {
+            *fLog << err;
+            *fLog << "ERROR: No Task 'MRead' found in the tasklist.  This task is" << endl;
+            *fLog << "  necessary to  get the filename.  Without  a filename file" << endl;
+            *fLog << "  AddCopySource cannot be used... abort." << endl;
+            *fLog << endl;
+            return kFALSE;
+        }
+        if (!MakeCopies(read->GetFullFileName()))
+            return kFALSE;
+
+    }
+
     if (fSplitRule.IsNull() || !(fOut || TestBit(kIsNotOwner)))
         return MWriteFile::ReInit(pList);
 
-    MRead *read = (MRead*)pList->FindTask("MRead");
     if (!read)
     {
@@ -975,6 +996,6 @@
     }
 
-    TString oldname = read->GetFileName();
-
+
+    const TString oldname = read->GetFullFileName();
     const TString newname = GetNewFileName(oldname);
     if (!ChangeFile(newname))
Index: /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
===================================================================
--- /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 6512)
+++ /trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 6513)
@@ -93,5 +93,5 @@
     // File handling
     void    Close();
-    TString GetNewFileName(TString &inname) const;
+    TString GetNewFileName(const char *inname) const;
     Bool_t  ChangeFile(const char *fname);
     TFile  *OpenFile(const char *name, Option_t *option, const char *title, Int_t comp);
Index: /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mhist/MHCamEvent.cc	(revision 6513)
@@ -149,5 +149,5 @@
             return kFALSE;
         }
-        *fLog << warn << GetDescriptor() << ": No MCamEvent available..." << endl;
+        *fLog << inf << GetDescriptor() << ": Assuming to get MCamEvent from Fill()..." << endl;
     }
 
Index: /trunk/MagicSoft/Mars/mjobs/MJStar.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 6512)
+++ /trunk/MagicSoft/Mars/mjobs/MJStar.cc	(revision 6513)
@@ -125,5 +125,5 @@
     *fLog << inf;
     fLog->Separator(GetDescriptor());
-    *fLog << "Calculate image parameters from sequence ";
+    *fLog << "Calculate image parameters of sequence ";
     *fLog << fSequence.GetName() << endl;
     *fLog << endl;
