]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliCaloRawAnalyzerPeakFinder.h
Fixes for Coverity warnings
[u/mrichter/AliRoot.git] / EMCAL / AliCaloRawAnalyzerPeakFinder.h
index d4ad5e60a345064a03f8fb3712a4316f04733586..3f3fe4c1644f2b01763a92635a9b412713c28419 100644 (file)
@@ -1,14 +1,14 @@
+// -*- mode: c++ -*-
 #ifndef ALICALORAWANALYZERPEAKFINDER_H
 #define ALICALORAWANALYZERPEAKFINDER_H
-
 /**************************************************************************
- * This file is property of and copyright by the Experimental Nuclear     *
- * Physics Group, Dep. of Physics                                         *
- * University of Oslo, Norway, 2007                                       *
+ * This file is property of and copyright by                              *
+ * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2009     *
+ *                                                                        *
+ * Primary Author: Per Thomas Hille  <perthomas.hille@yale.edu>           *
  *                                                                        *
- * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
  * Contributors are mentioned in the code where appropriate.              *
- * Please report bugs to perthi@fys.uio.no                                *
+ * Please report bugs to perthomas.hille@yale.edu                         *
  *                                                                        *
  * Permission to use, copy, modify and distribute this software and its   *
  * documentation strictly for non-commercial purposes is hereby granted   *
 // weighted sum of the samples using the 
 // best possible weights.
 
-
 #include "AliCaloRawAnalyzer.h"
-
-#define MAXSTART 3
-#define SAMPLERANGE 15
-#define SHIF 0.5
+#include "AliCaloConstants.h"
 
 class AliCaloBunchInfo;
+class AliCaloPeakFinderVectors;
 
 class  AliCaloRawAnalyzerPeakFinder : public AliCaloRawAnalyzer
 {
  public:
   AliCaloRawAnalyzerPeakFinder();
   virtual ~AliCaloRawAnalyzerPeakFinder();
-  virtual AliCaloFitResults Evaluate( const vector<AliCaloBunchInfo> &bunchvector, const UInt_t altrocfg1,  const UInt_t altrocfg2 );
+  virtual AliCaloFitResults Evaluate( const std::vector<AliCaloBunchInfo> &bunchvector, 
+                                     const UInt_t altrocfg1,  const UInt_t altrocfg2 );
 
  private:
-  // AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder   & );
-  // AliCaloRawAnalyzerPeakFinder   & operator = ( const  AliCaloRawAnalyzerPeakFinder  & );
-
-  void LoadVectors();
-  double *fPFAmpVectors[MAXSTART][SAMPLERANGE]; // Vectors for Amplitude extraction 
-  double *fPFTofVectors[MAXSTART][SAMPLERANGE]; // Vectors for TOF extraction
-  double fTof; 
-  double fAmp;
-
+  AliCaloRawAnalyzerPeakFinder( const AliCaloRawAnalyzerPeakFinder   & );
+  AliCaloRawAnalyzerPeakFinder   & operator = ( const  AliCaloRawAnalyzerPeakFinder  & );
+  void     LoadVectorsASCII();
+  void     LoadVectorsOCDB();
+  void     CopyVectors(const AliCaloPeakFinderVectors *const pfvectors );
+  void     ResetVectors();
+  void     InitOCDB(bool alien) const;
+  void     WriteRootFile() const;
+  void PrintVectors();
+  Double_t ScanCoarse(const Double_t *const array, const int length ) const ; // Find a rough estimate of peak position and t0
+  Double_t fPFAmpVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100];  // Vectors for Amplitude extraction, first iteration
+  Double_t fPFTofVectorsCoarse[PF::MAXSTART][PF::SAMPLERANGE][100];  // Vectors for TOF extraction, first iteration
+  Double_t fPFAmpVectors[PF::MAXSTART][PF::SAMPLERANGE][100];        // Vectors for Amplitude extraction, second iteration
+  Double_t fPFTofVectors[PF::MAXSTART][PF::SAMPLERANGE][100];        // Vectors for TOF extraction, second iteration
+  Double_t fAmp; // The amplitude in entities of ADC counts
+  AliCaloPeakFinderVectors  *fPeakFinderVectors; // Collection of Peak-Fincer vectors
+  bool fRunOnAlien; // Wether or not we are running on the GRID
+  bool fIsInitialized;
+  ClassDef( AliCaloRawAnalyzerPeakFinder, 1 )
 };
 
+
 #endif