Index: external/ExRootAnalysis/ExRootConfReader.cc
===================================================================
--- external/ExRootAnalysis/ExRootConfReader.cc	(revision b67a7513fb5e8d97fd5c3bb4eb1fc9808d340a9f)
+++ external/ExRootAnalysis/ExRootConfReader.cc	(revision bd8c88490f0cb2320f4b77336779a7a5597d4c23)
@@ -12,4 +12,6 @@
 #include "tcl/tcl.h"
 
+#include <libgen.h>
+
 #include <iostream>
 #include <iomanip>
@@ -22,13 +24,15 @@
 
 static Tcl_ObjCmdProc ModuleObjCmdProc;
+static Tcl_ObjCmdProc SourceObjCmdProc;
 
 //------------------------------------------------------------------------------
 
 ExRootConfReader::ExRootConfReader() :
-  fTclInterp(0)
+  fTopDir(0), fTclInterp(0)
 {
   fTclInterp = Tcl_CreateInterp();
 
   Tcl_CreateObjCommand(fTclInterp, "module", ModuleObjCmdProc, this, 0);
+  Tcl_CreateObjCommand(fTclInterp, "source", SourceObjCmdProc, this, 0);
 }
 
@@ -42,14 +46,6 @@
 //------------------------------------------------------------------------------
 
-void ExRootConfReader::ReadFile(const char *fileName)
-{
-/*
-  ifstream inputFileStream(fileName);
-  string cmdBuffer = string(istreambuf_iterator<char>(inputFileStream), istreambuf_iterator<char>());
-
-  Tcl_Obj *cmdObjPtr = Tcl_NewObj();
-  cmdObjPtr->bytes = const_cast<char *>(cmdBuffer.c_str());
-  cmdObjPtr->length = cmdBuffer.size();
-*/
+void ExRootConfReader::ReadFile(const char *fileName, bool isTop)
+{
   stringstream message;
 
@@ -60,4 +56,6 @@
     throw runtime_error(message.str());
   }
+
+  if(isTop) fTopDir = dirname(const_cast<char *>(fileName));
 
   int file_length = inputFileStream.tellg();
@@ -93,5 +91,5 @@
 {
   Tcl_Obj *object;
-  Tcl_Obj *variableName = Tcl_NewStringObj(const_cast<char *>(name),-1);
+  Tcl_Obj *variableName = Tcl_NewStringObj(const_cast<char *>(name), -1);
   object = Tcl_ObjGetVar2(fTclInterp, variableName, 0, TCL_GLOBAL_ONLY);
   return ExRootConfParam(name, object, fTclInterp);
@@ -188,18 +186,17 @@
 int ModuleObjCmdProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
 {
+  ExRootConfReader *reader;
+
   if(objc < 3)
   {
-/*
-    Tcl_SetResult(interp, "wrong # args: should be \"module className moduleName arg ?arg...?\"", 0);
-*/
     Tcl_WrongNumArgs(interp, 1, objv, "className moduleName ?arg...?");
-		return TCL_ERROR;
-  }
-
-  ExRootConfReader *test = (ExRootConfReader*) clientData;
+    return TCL_ERROR;
+  }
+
+  reader = (ExRootConfReader*) clientData;
 
   // add module to a list of modules to be created
 
-  test->AddModule(Tcl_GetStringFromObj(objv[1], 0), Tcl_GetStringFromObj(objv[2], 0));
+  reader->AddModule(Tcl_GetStringFromObj(objv[1], 0), Tcl_GetStringFromObj(objv[2], 0));
 
   if(objc > 3)
@@ -218,4 +215,31 @@
 //------------------------------------------------------------------------------
 
+int SourceObjCmdProc(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
+{
+  const char *fileName;
+  char *fullName;
+  ExRootConfReader *reader;
+  size_t size;
+
+  if(objc != 2)
+  {
+    Tcl_WrongNumArgs(interp, 1, objv, "fileName");
+    return TCL_ERROR;
+  }
+
+  reader = (ExRootConfReader*) clientData;
+  fileName = Tcl_GetStringFromObj(objv[1], 0);
+  size = strlen(reader->GetTopDir()) + strlen(fileName) + 2;
+  fullName = static_cast<char *>(malloc(size));
+  strcpy(fullName, reader->GetTopDir());
+  strcat(fullName, "/");
+  strcat(fullName, fileName);
+  reader->ReadFile(fullName, false);
+
+  return TCL_OK;
+}
+
+//------------------------------------------------------------------------------
+
 ExRootConfParam::ExRootConfParam(const char *name, Tcl_Obj *object, Tcl_Interp *interp) :
   fName(name), fObject(object), fTclInterp(interp)
@@ -289,5 +313,5 @@
   const char *result = defaultValue;
   if(fObject) result = Tcl_GetStringFromObj(fObject, 0);
-  return result;  
+  return result;
 }
 
@@ -304,5 +328,5 @@
     throw runtime_error(message.str());
   }
-  return length;  
+  return length;
 }
 
Index: external/ExRootAnalysis/ExRootConfReader.h
===================================================================
--- external/ExRootAnalysis/ExRootConfReader.h	(revision b67a7513fb5e8d97fd5c3bb4eb1fc9808d340a9f)
+++ external/ExRootAnalysis/ExRootConfReader.h	(revision bd8c88490f0cb2320f4b77336779a7a5597d4c23)
@@ -50,5 +50,5 @@
   ~ExRootConfReader();
 
-  void ReadFile(const char *fileName);
+  void ReadFile(const char *fileName, bool isTop = true);
 
   int GetInt(const char *name, int defaultValue, int index = -1);
@@ -63,5 +63,9 @@
   void AddModule(const char *className, const char *moduleName);
 
+  const char *GetTopDir() const { return fTopDir; }
+
 private:
+
+  const char *fTopDir; //!
 
   Tcl_Interp *fTclInterp; //!
