Index: /fact/tools/rootmacros/DrsCalibration.C
===================================================================
--- /fact/tools/rootmacros/DrsCalibration.C	(revision 13534)
+++ /fact/tools/rootmacros/DrsCalibration.C	(revision 13535)
@@ -2,9 +2,11 @@
 
 #include <iostream>
+using namespace std;
+
 float getValue( int slice, int pixel,
 	vector<float> &drs_basemean,
 	vector<float> &drs_gainmean,
 	vector<float> &drs_triggeroffsetmean,
-	UInt_t RegionOfInterest,
+	unsigned int    RegionOfInterest,
 	vector<int16_t> AllPixelDataVector,
 	vector<int16_t> StartCellVector
@@ -56,5 +58,5 @@
 	vector<float> &drs_gainmean,
 	vector<float> &drs_triggeroffsetmean,
-	UInt_t RegionOfInterest,
+	unsigned int RegionOfInterest,
 	vector<int16_t> AllPixelDataVector,
 	vector<int16_t> StartCellVector,
Index: /fact/tools/rootmacros/DrsCalibration.h
===================================================================
--- /fact/tools/rootmacros/DrsCalibration.h	(revision 13534)
+++ /fact/tools/rootmacros/DrsCalibration.h	(revision 13535)
@@ -6,23 +6,24 @@
 
 float getValue( int slice, int pixel,
-	vector<float> &drs_basemean,
-	vector<float> &drs_gainmean,
-	vector<float> &drs_triggeroffsetmean,
-	UInt_t RegionOfInterest,
-	vector<int16_t> AllPixelDataVector,
-	vector<int16_t> StartCellVector
+    std::vector<float> &drs_basemean,
+    std::vector<float> &drs_gainmean,
+    std::vector<float> &drs_triggeroffsetmean,
+    unsigned int RegionOfInterest,
+    std::vector<int16_t> AllPixelDataVector,
+    std::vector<int16_t> StartCellVector
 );
 
-size_t applyDrsCalibration( vector<float> &destination,
-	int pixel, 
-  int LeaveOutLeft,
-  int LeaveOutRight,
-	vector<float> &drs_basemean,
-	vector<float> &drs_gainmean,
-	vector<float> &drs_triggeroffsetmean,
-	UInt_t RegionOfInterest,
-	vector<int16_t> AllPixelDataVector,
-	vector<int16_t> StartCellVector,
-	int verbosityLevel  = 1
+size_t applyDrsCalibration( 
+    std::vector<float> &destination,
+    int pixel, 
+    int LeaveOutLeft,
+    int LeaveOutRight,
+    std::vector<float> &drs_basemean,
+    std::vector<float> &drs_gainmean,
+    std::vector<float> &drs_triggeroffsetmean,
+    unsigned int RegionOfInterest,
+    std::vector<int16_t> AllPixelDataVector,
+    std::vector<int16_t> StartCellVector,
+    int verbosityLevel  = 1
 );
 
Index: /fact/tools/rootmacros/PulseTemplates/Makefile
===================================================================
--- /fact/tools/rootmacros/PulseTemplates/Makefile	(revision 13534)
+++ /fact/tools/rootmacros/PulseTemplates/Makefile	(revision 13535)
@@ -1,4 +1,40 @@
-all:
-	g++ -o pulseoverlay FPulseOverlay.C -I`root-config --incdir` `root-config --glibs`
+CXXFLAGS = -I`root-config --incdir` `root-config --glibs` -Wall -g
+CC = g++
+RM = rm
+
+OBJ = openFits.o discriminator.o zerosearch.o factfir.o \
+    DrsCalibration.o SpikeRemoval.o rootfilehandler.o pixel.o
+
+BINNAME = pulseoverlay
+
+$(BINNAME): $(OBJ)
+	$(CC) $(CXXFLAGS) FPulseOverlay.C $(OBJ) -o $@
+
+openFits.o : ../openFits.c ../openFits.h ../fits.h ../izstream.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+discriminator.o : ../discriminator.C ../discriminator.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+zerosearch.o : ../zerosearch.C ../zerosearch.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+factfir.o : ../factfir.C ../factfir.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+DrsCalibration.o : ../DrsCalibration.C ../DrsCalibration.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+SpikeRemoval.o : ../SpikeRemoval.C ../SpikeRemoval.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+rootfilehandler.o : rootfilehandler.C rootfilehandler.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+pixel.o : pixel.C pixel.h
+	$(CC) $(CXXFLAGS) -c $< -o $@
+
+all: $(BINNAME)
+
 clean:
-	rm main
+	$(RM) *.o
Index: /fact/tools/rootmacros/PulseTemplates/rootfilehandler.C
===================================================================
--- /fact/tools/rootmacros/PulseTemplates/rootfilehandler.C	(revision 13534)
+++ /fact/tools/rootmacros/PulseTemplates/rootfilehandler.C	(revision 13535)
@@ -3,5 +3,5 @@
 
 #include "rootfilehandler.h"
-
+#include <stdlib.h>
 using namespace std;
 
Index: /fact/tools/rootmacros/SpikeRemoval.C
===================================================================
--- /fact/tools/rootmacros/SpikeRemoval.C	(revision 13534)
+++ /fact/tools/rootmacros/SpikeRemoval.C	(revision 13535)
@@ -2,4 +2,5 @@
 
 #include <iostream>
+using namespace std;
 
 // compute the mean of the left and right neighbors of a channel
Index: /fact/tools/rootmacros/SpikeRemoval.h
===================================================================
--- /fact/tools/rootmacros/SpikeRemoval.h	(revision 13534)
+++ /fact/tools/rootmacros/SpikeRemoval.h	(revision 13535)
@@ -4,9 +4,9 @@
 #include <vector>
 
-vector<float> * computeN1mean( vector<float> &src);
+std::vector<float> * computeN1mean( std::vector<float> &src);
 
 void removeSpikes(
-	vector<float> &src,
-	vector<float> &dest,
+	std::vector<float> &src,
+	std::vector<float> &dest,
 	const float CandidateTHR = -5.0,
 	const float nextDiffTHR = -1.6,
Index: /fact/tools/rootmacros/factfir.C
===================================================================
--- /fact/tools/rootmacros/factfir.C	(revision 13534)
+++ /fact/tools/rootmacros/factfir.C	(revision 13535)
@@ -1,5 +1,8 @@
-#include <vector>
+
 #include <deque>
 #include "factfir.h"
+
+using namespace std;
+
 // source vector is
 void factfir(double b, vector<double> &a, int k, vector<float> &source, vector<float> &dest){
Index: /fact/tools/rootmacros/factfir.h
===================================================================
--- /fact/tools/rootmacros/factfir.h	(revision 13534)
+++ /fact/tools/rootmacros/factfir.h	(revision 13535)
@@ -2,14 +2,17 @@
 #define __FACTFIR_H
 
+#include <vector>
+
+
 void factfir(
     double b, 
-    vector<double> &a, 
+    std::vector<double> &a, 
     int k, 
-    vector<float> &source, 
-    vector<float> &dest);
+    std::vector<float> &source, 
+    std::vector<float> &dest);
 
 void sliding_avg(
-    vector<float> &source, 
-    vector<float> &dest, 
+    std::vector<float> &source, 
+    std::vector<float> &dest, 
     unsigned int HalfWidth);
 #endif // __FACTFIR_H
Index: /fact/tools/rootmacros/izstream.h
===================================================================
--- /fact/tools/rootmacros/izstream.h	(revision 13534)
+++ /fact/tools/rootmacros/izstream.h	(revision 13535)
@@ -15,4 +15,6 @@
 #else
 #include <zlib.h>
+#include "string.h"
+#include <stdio.h>
 #endif
 
Index: /fact/tools/rootmacros/openFits.c
===================================================================
--- /fact/tools/rootmacros/openFits.c	(revision 13534)
+++ /fact/tools/rootmacros/openFits.c	(revision 13535)
@@ -3,5 +3,5 @@
 #include "stdint.h"
 
-
+using namespace std;
 
 // Opens FACT Fits Raw Data  -- for more Info refer to header file
@@ -12,6 +12,6 @@
 	vector<int16_t> &StartCells,	// vector, which will be filled with DRS start positions
 	unsigned int &EventID,			// index of the current event
-	UInt_t &RegionOfInterest,		// Width of the Region, read out of the DRS
-	UInt_t &NumberOfPixels,			// Total number of pixel, read out of the camera
+	unsigned int &RegionOfInterest,		// Width of the Region, read out of the DRS
+	unsigned int &NumberOfPixels,			// Total number of pixel, read out of the camera
 	size_t &PXLxROI,				// Size of column "Data" = #Pixel x ROI
 			// this can be used, to x-check RegionOfInterest and NumberOfPixels
Index: /fact/tools/rootmacros/openFits.h
===================================================================
--- /fact/tools/rootmacros/openFits.h	(revision 13534)
+++ /fact/tools/rootmacros/openFits.h	(revision 13535)
@@ -6,13 +6,14 @@
 #include <cstdio>
 #include "stdint.h"
+#include <vector>
 
 size_t openDataFits(
 	const char *datafilename,		// path to fits file containing FACT raw data
-	fits * * datafile,				// ptr to pointer, where to return the fits object
-	vector<int16_t> &Data,			// vector, which will be filled with raw data
-	vector<int16_t> &StartCells,	// vector, which will be filled with DRS start positions
+	std::fits * * datafile,				// ptr to pointer, where to return the fits object
+	std::vector<int16_t> &Data,			// vector, which will be filled with raw data
+	std::vector<int16_t> &StartCells,	// vector, which will be filled with DRS start positions
 	unsigned int &EventID,			// index of the current event
-	UInt_t &RegionOfInterest,		// Width of the Region, read out of the DRS
-	UInt_t &NumberOfPixels,			// Total number of pixel, read out of the camera
+	unsigned int &RegionOfInterest,		// Width of the Region, read out of the DRS
+	unsigned int &NumberOfPixels,			// Total number of pixel, read out of the camera
 	size_t &PXLxROI,				// Size of column "Data" = #Pixel x ROI
 			// this can be used, to x-check RegionOfInterest and NumberOfPixels
@@ -22,7 +23,7 @@
 size_t openCalibFits(
   const char *FileName,     // path to fits file
-  vector<float> &Offset,
-  vector<float> &Gain,
-  vector<float> &TriggerOffset,
+  std::vector<float> &Offset,
+  std::vector<float> &Gain,
+  std::vector<float> &TriggerOffset,
   size_t &TriggerOffsetROI,
   int VerbosityLevel =0
Index: /fact/tools/rootmacros/zerosearch.C
===================================================================
--- /fact/tools/rootmacros/zerosearch.C	(revision 13534)
+++ /fact/tools/rootmacros/zerosearch.C	(revision 13535)
@@ -1,7 +1,8 @@
 #include "Region.h"
 #include <iostream>
-#include <vector>
 
 #include "zerosearch.h"
+
+using namespace std;
 
 // searches for zero crossings in a given vector of floats
Index: /fact/tools/rootmacros/zerosearch.h
===================================================================
--- /fact/tools/rootmacros/zerosearch.h	(revision 13534)
+++ /fact/tools/rootmacros/zerosearch.h	(revision 13535)
@@ -4,7 +4,8 @@
 
 #include "Region.h"
+#include <vector>
 
-vector<Region> *zerosearch(
-    vector<float> &input,
+std::vector<Region> *zerosearch(
+    std::vector<float> &input,
     int edge = 1,			// search for transitions on rising edge=1, -1:falling
     unsigned int step = 4,			// search in steps of step
@@ -12,9 +13,10 @@
 );
 
-size_t ShiftRegionBy(vector<Region> &src,
+size_t ShiftRegionBy(
+    std::vector<Region> &src,
     int Shift,
     int VerbosityLevel=0);
 
-size_t EnlargeRegion(vector<Region> &src,
+size_t EnlargeRegion(std::vector<Region> &src,
     int Left,
     int Right,
@@ -22,6 +24,6 @@
 
 size_t findAbsMaxInRegions(
-    vector<Region> &regions,
-    vector<float> &data,
+    std::vector<Region> &regions,
+    std::vector<float> &data,
     int VerbosityLevel=0);
 
@@ -29,9 +31,9 @@
 
 size_t removeEqualMaxima(
-    vector<Region> &regions,
+    std::vector<Region> &regions,
     int VerbosityLevel=0);
 
 size_t removeRegionOnFallingEdge(
-  vector<Region> &regions,
+  std::vector<Region> &regions,
   unsigned int FallingEdgeWidth = 100,
   int VerbosityLevel=0);
@@ -39,25 +41,25 @@
 
 size_t removeRegionWithMaxOnEdge(
-    vector<Region> &regions,
+    std::vector<Region> &regions,
     unsigned int EdgeWidth=3,
     int VerbosityLevel=0);
 
 size_t removeMaximaBelow(
-    vector<Region> &regions,
+    std::vector<Region> &regions,
     float threshold = 2.0,
     int VerbosityLevel=0);
 
 size_t removeMaximaAbove(
-    vector<Region> &regions,
+    std::vector<Region> &regions,
     float threshold= 14.0,
     int VerbosityLevel=0);
 
 Region FindAbsMax(
-   vector<Region> &regions,
+   std::vector<Region> &regions,
    int VerbosityLevel=0);
 
 size_t findTimeOfHalfMaxLeft(
-    vector<Region> &regions,
-    vector<float> &data,
+    std::vector<Region> &regions,
+    std::vector<float> &data,
     float baseline = -0.5,
     int beginRisingEdge = 5,
