Index: trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 6513)
+++ trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 6553)
@@ -22,4 +22,5 @@
 #pragma link C++ namespace MMath;
 #pragma link C++ class MString+;
+#pragma link C++ class MEnv+;
 #pragma link C++ class MIter+;
 #pragma link C++ class MDirIter+;
Index: trunk/MagicSoft/Mars/mbase/MEnv.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 6553)
+++ trunk/MagicSoft/Mars/mbase/MEnv.cc	(revision 6553)
@@ -0,0 +1,83 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  2/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2005
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//
+//  MEnv
+//
+// It is a slightly changed version of TEnv. It logs all resources which are
+// touched, so that you can print all untouched resources by
+// PrintUntouched()
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MEnv.h"
+
+#include <TObjString.h>
+
+#include "MLog.h"
+#include "MLogManip.h"
+
+ClassImp(MEnv);
+
+using namespace std;
+
+Int_t MEnv::GetValue(const char *name, Int_t dflt)
+{
+    if (!fChecked.FindObject(name))
+        fChecked.Add(new TObjString(name));
+    return TEnv::GetValue(name, dflt);
+}
+
+Double_t MEnv::GetValue(const char *name, Double_t dflt)
+{
+    if (!fChecked.FindObject(name))
+        fChecked.Add(new TObjString(name));
+    return TEnv::GetValue(name, dflt);
+}
+
+const char *MEnv::GetValue(const char *name, const char *dflt)
+{
+    if (!fChecked.FindObject(name))
+        fChecked.Add(new TObjString(name));
+    return TEnv::GetValue(name, dflt);
+}
+
+void MEnv::PrintUntouched() const
+{
+    int i=0;
+    gLog << inf << flush;
+    gLog.Separator("Untouched Resources");
+    TIter Next(GetTable());
+    TObject *o=0;
+    while ((o=Next()))
+        if (!fChecked.FindObject(o->GetName()))
+        {
+            gLog << warn << " - Resource " << o->GetName() << " not touched" << endl;
+            i++;
+        }
+    if (i==0)
+        gLog << inf << "None." << endl;
+    else
+        gLog << inf << i << " resources have not been touched." << endl;
+}
Index: trunk/MagicSoft/Mars/mbase/MEnv.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEnv.h	(revision 6553)
+++ trunk/MagicSoft/Mars/mbase/MEnv.h	(revision 6553)
@@ -0,0 +1,30 @@
+#ifndef MARS_MEnv
+#define MARS_MEnv
+
+#ifndef ROOT_TEnv
+#include <TEnv.h>
+#endif
+
+#ifndef ROOT_TOrdCollection
+#include <TOrdCollection.h>
+#endif
+
+class MEnv : public TEnv
+{
+private:
+    TOrdCollection fChecked;
+
+public:
+    MEnv(const char *name="") : TEnv(name) { fChecked.SetOwner(); }
+
+    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);
+
+    void PrintUntouched() const;
+
+    ClassDef(MEnv, 0) // A slightly more advanced version of TEnv
+};
+    
+#endif
+
Index: trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mbase/Makefile	(revision 6513)
+++ trunk/MagicSoft/Mars/mbase/Makefile	(revision 6553)
@@ -22,4 +22,5 @@
            MString.cc \
            MMath.cc \
+           MEnv.cc \
 	   MLog.cc \
            MLogManip.cc \
