Index: /fact/tools/rootmacros/fpeak_cfd.C
===================================================================
--- /fact/tools/rootmacros/fpeak_cfd.C	(revision 12501)
+++ /fact/tools/rootmacros/fpeak_cfd.C	(revision 12502)
@@ -80,5 +80,5 @@
 TObjArray hList;
 
-void BookHistos( );
+void BookHistos( TString &title );
 void SaveHistograms(const char * );
 
@@ -91,5 +91,5 @@
 //	* find peaks (CFD and normal discriminator)
 //	* compute pulse height and pulse integral spektrum of the peaks
-int fpeak(
+int fpeak_cfd(
 	char *datafilename 		= "data/20111016_013.fits.gz",
 	const char *drsfilename = "../../20111016_011.drs.fits.gz",
@@ -100,5 +100,5 @@
 	int npixel				= -1,
 	bool spikeDebug = false,
-	int avg1		= 14,
+	int avg1		= 8,
 	int avg2 		= 8,
 	int verbosityLevel = 1, // different verbosity levels can be implemented here
@@ -108,4 +108,17 @@
 gStyle->SetPalette(1,0);
 gROOT->SetStyle("Plain");
+
+TString histogramtitle;
+histogramtitle += datafilename; 
+histogramtitle += " ";
+histogramtitle += drsfilename ;
+histogramtitle += " ";
+
+			histogramtitle += avg1;
+ 			histogramtitle += " "; 
+			histogramtitle +=  avg2;
+//			histogramtitle +=  " 3.0 100";
+			cout << histogramtitle.Data() << endl;
+
 
 	TCanvas *cFiltered = NULL;
@@ -158,5 +171,5 @@
 					drs_n);
 
-	BookHistos( );
+	BookHistos( histogramtitle  );
 //-----------------------------------------------------------------------------
 // Loops over Every Event and Pixel
@@ -197,8 +210,9 @@
 			EnlargeRegion( *zXings, 10, 10);
 			findAbsMaxInRegions( *zXings, Vslide);
-			removeMaximaBelow( *zXings, 3.0, 0);
-			removeRegionWithMaxOnEdge( *zXings, 2);
-			removeRegionOnFallingEdge( *zXings, 100);
-
+	//		removeMaximaBelow( *zXings, 3.0, 0);
+	//		removeRegionWithMaxOnEdge( *zXings, 2);
+	//		removeRegionOnFallingEdge( *zXings, 100);
+
+			
 			// fill maxima in Histogram
 			if (zXings->size() != 0 ){
@@ -301,8 +315,10 @@
 
 // booking and parameter settings for all histos
-void BookHistos( ){
+void BookHistos( TString& title){
 	// histograms for baseline extraction
 
-	hAmplSpek_cfd = new TH2F("hAmplSpek_cfd","amplitude spektrum - CFD",1440,-0.5,1439.5, 256, -27.5, 100.5);
+	
+
+	hAmplSpek_cfd = new TH2F("hAmplSpek_cfd", title,1440,-0.5,1439.5, 256, -27.5, 100.5);
 	hAmplSpek_cfd->GetXaxis()->SetTitle( "pixel" );
 	hAmplSpek_cfd->GetYaxis()->SetTitle( "amplitude in mV" );
@@ -330,5 +346,5 @@
 }
 
-void SaveHistograms( const char * loc_fname ){
+void SaveHistograms( const char * loc_fname){
 	// create the histogram file (replace if already existing)
 	TFile tf( loc_fname, "RECREATE");
