]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSRawAnalyzerPeakFinder.cxx
Getting rid of trivial warnings.
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSRawAnalyzerPeakFinder.cxx
index 52777e18054532d6f278954fa603928562f7d0dd..f5936f29be9a7e4d3a3e2b89fa8f2552b2975f80 100644 (file)
  **************************************************************************/
 
 #include "AliHLTPHOSRawAnalyzerPeakFinder.h"
-#include <iostream>
+//#include <iostream>
 #include <cmath>
 
+
 using std::cout;
 using std::endl;
 
 ClassImp(AliHLTPHOSRawAnalyzerPeakFinder) 
 
 
-AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder&):AliHLTPHOSRawAnalyzer() , fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
-{
+  //AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder(const AliHLTPHOSRawAnalyzerPeakFinder&):AliHLTPHOSRawAnalyzer() , fTVectorPtr(0), fAVectorPtr(0), fTVectorSize(0), fAVectorSize(0)
+  //{
 
 
-}
+  //}
 
 
 /**
@@ -45,12 +46,14 @@ AliHLTPHOSRawAnalyzerPeakFinder::AliHLTPHOSRawAnalyzerPeakFinder():AliHLTPHOSRaw
 }
 
 
-
+//___________________________________________________________________
 AliHLTPHOSRawAnalyzerPeakFinder::~AliHLTPHOSRawAnalyzerPeakFinder()
 {
 
 } //end AliHLTPHOSRawAnalyzerPeakFinder
 
+
+
 void 
 AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(Double_t *tVec, Int_t size)
 {
@@ -70,6 +73,7 @@ AliHLTPHOSRawAnalyzerPeakFinder::SetTVector(Double_t *tVec, Int_t size)
 }
 
 
+//___________________________________________________________________
 void
 AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(Double_t *aVec, Int_t size)
 {
@@ -91,35 +95,25 @@ AliHLTPHOSRawAnalyzerPeakFinder::SetAVector(Double_t *aVec, Int_t size)
 
 
 
-/**
-* Extraction of timing and energy using the Peakfinde Algorithm.
-* The. The parameters "start" and "length" defines a sub array  of the data array
-* that will be used for the the fit. If start+length must not exeed the total length
-* of the Data array. "start" must be chosen as close as possible to t0.
-* The baseline must also be subtracted.
-* The length of "tVector" and "aVector" mus be equal to length.
-* "index + length" must not exeed the length of the data array set in the constructor.
-* @param start the start index of the subarray of the data array. 
-* @param length the number of samples to use starting from index 
-* @param tVector the peakfinder vector for timing
-* @param aVector the peakfinder vector for amplitude (energy)
-**/
+//___________________________________________________________________
 void 
-AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(int start, int length)
+AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(Int_t /*start*/, Int_t length)
 {
-  //  printf("\n AliHLTPHOSRawAnalyzerPeakFinder::Evaluat from index %d to %d\n", start, start + length);
   fDTof = 0;
   fDAmpl = 0;
   Int_t tmpLength;
 
+  //  cout << "AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(), dumping data" << endl; 
+
+  //  DumpData(fIntDataPtr, length, 16);
 
   if(fTVectorPtr == 0 || fAVectorPtr == 0)
     {
-      printf("\nError: the peakfinder vectors are not specified, aborting !!!\n");
+
     }
   else
     {
-      
+
       if(length <  fTVectorSize)
        {
          tmpLength = length;
@@ -131,17 +125,23 @@ AliHLTPHOSRawAnalyzerPeakFinder::Evaluate(int start, int length)
       
       for(int i=0; i < tmpLength; i++)
        {  
-         fDAmpl += fAVectorPtr[i]*fFloatDataPtr[i];    
+         //      fDAmpl += fAVectorPtr[i]*fFloatDataPtr[i];    
+         fDAmpl += fAVectorPtr[i]*fIntDataPtr[i];   
        }
 
       for(int i=0; i < tmpLength; i++)
        {   
-         fDTof += fTVectorPtr[i]*fFloatDataPtr[i]; 
+         //      fDTof += fTVectorPtr[i]*fFloatDataPtr[i]; 
+         fDTof += fTVectorPtr[i]*fIntDataPtr[i]; 
        }
       
       if(fDAmpl > 900)
        {
-         Double_t tmpMax = GetMaxValue(fFloatDataPtr, tmpLength);
+         //      Double_t tmpMax = GetMaxValue(fFloatDataPtr, tmpLength);
+         //      Double_t tmpMax = GetMaxValue(fIntDataPtr, tmpLength);
+         Double_t tmpMax = MaxValue(fIntDataPtr, tmpLength); 
+         
          if(tmpMax == 1023)
            {
              fDAmpl = tmpMax;