Index: fact/tools/rootmacros/PulseTemplates/pixel.C
===================================================================
--- fact/tools/rootmacros/PulseTemplates/pixel.C	(revision 13590)
+++ fact/tools/rootmacros/PulseTemplates/pixel.C	(revision 13592)
@@ -10,38 +10,4 @@
 
 //============================= LIFECYCLE ====================================
-
-//Pixel::Pixel(int pixelID)
-//{
-//    Chid                                = pixelID;
-//    max_puslse_order                    = 1;
-//    hMaxOverlay                       = NULL;
-//    hEdgeOverlay                   = NULL;
-//    hMaxProfile                       = NULL;
-//    hEdgeProfile                      = NULL;
-//    hList                               = NULL;
-
-//}
-//Pixel::Pixel(
-//        int         pixelID,
-//        int         maxPulsorder,
-//        int         verbosityLevel,
-//        bool        stats,
-//        TFile*      filename
-//        )
-//{
-//    mChid                   = pixelID;
-//    mStats                  = stats;
-//    mMaxPulseOrder          = maxPulsorder;
-//    mVerbosityLevel         = verbosityLevel;
-
-//    hMaxOverlay  = new TH2F*[mMaxPulseOrder];
-//    hEdgeOverlay = new TH2F*[mMaxPulseOrder];
-//    hMaxProfile  = new TProfile*[mMaxPulseOrder];
-//    hEdgeProfile = new TProfile*[mMaxPulseOrder];
-
-//    hList           = new TObjArray;
-
-//    LoadPulseHistos( filename );
-//}
 
 Pixel::Pixel(
@@ -50,5 +16,29 @@
         int         verbosityLevel,
         bool        stats,
-//        TFile*      filename,
+        TFile*      filename
+        )
+{
+    mChid                   = pixelID;
+    mStats                  = stats;
+    mMaxPulseOrder          = maxPulsorder;
+    mVerbosityLevel         = verbosityLevel;
+    mRootFile               = filename;
+
+    hMaxOverlay  = new TH2F*[mMaxPulseOrder];
+    hEdgeOverlay = new TH2F*[mMaxPulseOrder];
+    hMaxProfile  = new TProfile*[mMaxPulseOrder];
+    hEdgeProfile = new TProfile*[mMaxPulseOrder];
+
+    hList           = new TObjArray;
+
+    LoadPulseHistos( );
+}
+
+Pixel::Pixel(
+        int         pixelID,
+        int         maxPulsorder,
+        int         verbosityLevel,
+        bool        stats,
+        TFile*      filename,
         int         pixelOverlayXaxisLeft,
         int         pixelOverlayXaxisRight,
@@ -67,4 +57,5 @@
     mBSLMean                = bSLMean;
     mGainMean               = gainMean;
+    mRootFile               = filename;
 
     hMaxOverlay  = new TH2F*[mMaxPulseOrder];
@@ -126,5 +117,5 @@
         hMaxOverlay[order]=new TH2F(
                     HistoName("hMaxOverlay", order),
-                    HistoTitle("Overlay of detected pulses of", order),
+                    HistoTitle("Overlay at peak maximum of detected pulses of", order),
                     mPixelOverlayXaxisLeft + mPixelOverlayXaxisRight ,
                     (-1*mPixelOverlayXaxisLeft)-0.5,
@@ -288,5 +279,5 @@
                 hRisingEdgeToMax[order] = new TH1I (
                             HistoName("hRisingEdgeToMax", order),
-                            HistoTitle("Distance from rising edge to pulse's maximum", order),
+                            HistoTitle("Distribution of distance between rising edge and pulse's maximum", order),
                             x_max -x_min,
                             x_min,
@@ -509,16 +500,14 @@
 
 void
-Pixel::LoadPulseHistos(
-        TFile*      filename
-        )
-{
-    filename->cd();
-    filename->cd(CreateSubDirName( mChid ));
+Pixel::LoadPulseHistos()
+{
+    mRootFile->cd();
+    mRootFile->cd(CreateSubDirName( mChid ));
     for (int order = 0; order < mMaxPulseOrder; order++)
     {
-        hMaxOverlay[order]  = (TH2F*)filename->Get( HistoName("hMaxOverlay", order) );
-        hEdgeOverlay[order] = (TH2F*)filename->Get( HistoName("hEdgeOverlay", order) );
-        hMaxProfile[order]  = (TProfile*)filename->Get( HistoName("hMaxProfile", order) );
-        hEdgeProfile[order] = (TProfile*)filename->Get( HistoName("hEdgeProfile", order) );
+        hMaxOverlay[order]  = (TH2F*)mRootFile->Get( HistoName("hMaxOverlay", order) );
+        hEdgeOverlay[order] = (TH2F*)mRootFile->Get( HistoName("hEdgeOverlay", order) );
+        hMaxProfile[order]  = (TProfile*)mRootFile->Get( HistoName("hMaxProfile", order) );
+        hEdgeProfile[order] = (TProfile*)mRootFile->Get( HistoName("hEdgeProfile", order) );
     }
 }
