Index: /fact/tools/rootmacros/PulseTemplates/FPulseOverlay.C
===================================================================
--- /fact/tools/rootmacros/PulseTemplates/FPulseOverlay.C	(revision 13734)
+++ /fact/tools/rootmacros/PulseTemplates/FPulseOverlay.C	(revision 13735)
@@ -29,4 +29,5 @@
 #include <TObjArray.h>
 #include <TF1.h>
+#include<TSystem.h>
 
 #include <stdio.h>
@@ -182,4 +183,9 @@
 void UpdateCanvases( int, int, bool);
 void DeletePixelCanvases( int, int );
+TString SetHostsPaths(TString filename, bool Input);
+
+TString gDataDirectory;
+TString gHomeDirectory;
+TString ghostname;
 
 //----------------------------------------------------------------------------
@@ -189,7 +195,7 @@
 //----------------------------------------------------------------------------
 int FPulseOverlay(
-        TString     datafilename        = "/fhgfs/groups/app/fact-construction/raw/2011/11/09/20111109_006.fits.gz",
-        TString     drsfilename         = "/fhgfs/groups/app/fact-construction/raw/2011/11/09/20111109_003.drs.fits.gz",
-        TString     OutRootFileName     = "/home/jbuss/analysis/FPulseTemplate/20111109_006/Overlay/20111109_006.root",
+        TString     datafilename        = "raw/2011/11/09/20111109_006.fits.gz",
+        TString     drsfilename         = "raw/2011/11/09/20111109_003.drs.fits.gz",
+        TString     OutRootFileName     = "analysis/FPulseTemplate/20111109_006/Overlay/20111109_006.root",
         bool            ProduceGraphic      = false,
         bool            spikeDebug          = false,
@@ -199,7 +205,7 @@
         int             verbosityLevel      = 0,        // different verbosity levels can be implemented here
         int             firstevent          = 1,        // Hast to be between 1 and infinity NOT 0!!!!
-        int             nevents             = -1,
+        int             nevents             = 1,
         int             firstpixel          = 0,
-        int             npixel              = -1,
+        int             npixel              = 1,
         int             pixelSetSize       = 200,
         int             maxPulseOrder       = 4,
@@ -219,7 +225,11 @@
 //	Save-Root-File Settings
 //----------------------------------------------------------------------------
+    datafilename        = SetHostsPaths(datafilename      , true  );
+    drsfilename         = SetHostsPaths(drsfilename       , true  );
+    OutRootFileName     = SetHostsPaths(OutRootFileName   , false );
+
     if (saveResults)
     {
-        CreateRootFile( OutRootFileName, verbosityLevel );
+        CreateRootFile( OutRootFileName, false, verbosityLevel );
     }
 
@@ -1206,4 +1216,40 @@
 
 
+TString
+SetHostsPaths(TString filename, bool Input)
+{
+    ghostname = gSystem->HostName();
+
+    TString temp_filename;
+
+    if ( ghostname.Contains("isdc") ) //IF ONE IS WORKING AT ISDC
+    {
+        gDataDirectory = "/fact/";
+        gHomeDirectory = "/home_nfs/isdc/jbbuss/";
+    }
+    if ( ghostname.Contains("hpc") ) //IF ONE IS WORKING AT PHIDO
+    {
+        gDataDirectory = "/fhgfs/groups/app/fact-construction/";
+        gHomeDirectory = "/home/jbuss/";
+    }
+
+    if (Input)
+    {
+        temp_filename = gDataDirectory;
+        temp_filename += filename;
+        filename = temp_filename;
+    }
+    else if (!Input)
+    {
+        temp_filename = gHomeDirectory;
+        temp_filename += filename;
+        filename = temp_filename;
+    }
+
+    return filename;
+}
+
+
+
 int main()
 {
