Index: trunk/MagicSoft/Mars/mbase/MEnv.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 8484)
+++ trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 8539)
@@ -18,5 +18,5 @@
 !   Author(s): Thomas Bretz  2/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
 !
-!   Copyright: MAGIC Software Development, 2000-2005
+!   Copyright: MAGIC Software Development, 2000-2007
 !
 !
@@ -51,12 +51,12 @@
 //---------------------------------------------------------------------------
 //
-// (Default) constructor. If the given file cannot be accessed the data
-// member fName is set to "" which can then be checked by IsValid()
-//
-MEnv::MEnv(const char *name) : TEnv(name), fName(name)
+// (Default) constructor. If the given file cannot be accessed SetRcName("")
+// is called which can then be checked by IsValid()
+//
+MEnv::MEnv(const char *name) : TEnv(name)
 {
     fChecked.SetOwner();
 
-    if (fName.IsNull())
+    if (!IsValid())
         return;
 
@@ -65,5 +65,22 @@
 
     if (gSystem->AccessPathName(fname, kFileExists))
-        fName = "";
+        fname = "";
+
+    SetRcName(fname);
+
+    if (GetEntries()<=0 && !fname.IsNull() && fname!=name)
+        ReadFile(fname, kEnvLocal);;
+}
+
+//---------------------------------------------------------------------------
+//
+// Return the total number of entries in the table
+//
+Int_t MEnv::GetEntries() const
+{
+    if (!GetTable())
+        return -1;
+
+    return GetTable()->GetEntries();
 }
 
@@ -123,5 +140,5 @@
 {
     MEnv *env = new MEnv("/dev/null");
-    env->fName = fName;
+    env->SetRcName(GetRcName());
     env->AddEnv(*this);
     return env;
@@ -836,5 +853,8 @@
     int i=0;
     gLog << inf << flush;
-    gLog.Separator("Untouched Resources");
+
+    TString sep = "Untouched Resources - ";
+    sep += GetRcName();
+    gLog.Separator(sep);
     TIter Next(GetTable());
     TObject *o=0;
Index: trunk/MagicSoft/Mars/mbase/MEnv.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEnv.h	(revision 8484)
+++ trunk/MagicSoft/Mars/mbase/MEnv.h	(revision 8539)
@@ -21,6 +21,4 @@
     TOrdCollection fChecked;
 
-    TString fName; // A workaround!
-
     TString Compile(TString str, const char *post) const;
 
@@ -28,5 +26,5 @@
     MEnv(const char *name="");
 
-    Bool_t      IsValid() const { return !fName.IsNull(); }
+    Bool_t      IsValid() const { return !TString(GetRcName()).IsNull(); }
 
     TObject    *Clone(const char *newname="") const;
@@ -34,9 +32,11 @@
     Bool_t      Touch(const char *name) { return !TString(GetValue(name, "")).IsNull(); }
 
+    Int_t       GetEntries() const;
+
     Int_t       GetValue(const char *name, Int_t dflt);
     Double_t    GetValue(const char *name, Double_t dflt);
     const char *GetValue(const char *name, const char *dflt);
 
-    const char *GetName() const { return fName; }
+    const char *GetName() const { return GetRcName(); }
 
     Int_t       GetColor(const char *name, Int_t dftl);
