-#ifndef AliL3_VHDLClusterFinder
-#define AliL3_VHDLClusterFinder
+// @(#) $Id$
+// Author: Constantin Loizides <mailto:loizides@ikf.uni-frankfurt.de>
+//- Copyright & copy ALICE HLT Group
+// See the implementation file for the detailed description
-#include "AliL3RootTypes.h"
-#include "AliL3Logging.h"
-#include "AliL3AltroMemHandler.h"
+#ifndef AliL3VHDLClusterFinder_H
+#define AliL3VHDLClusterFinder_H
-//#define DEBUG
+#include "AliL3AltroMemHandler.h"
struct VHDLClusterData
{
- UInt_t fTotalCharge;
+ UInt_t fTotalCharge; //total charge
UInt_t fPad; //mean in pad
UInt_t fTime; //mean in time
UInt_t fPad2; //for error in XY direction
class AliL3VHDLClusterFinder
{
+ public:
+ AliL3VHDLClusterFinder();
+ virtual ~AliL3VHDLClusterFinder();
+
+ void ProcessDigits();
+
+ void SetXYError(Float_t f) {fXYErr=f;}
+ void SetZError(Float_t f) {fZErr=f;}
+ void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
+ void SetThreshold(UInt_t i=10) {fThreshold=i;}
+ void SetMatchWidth(UInt_t i=4) {fMatch=i;}
+ void SetMergeMinimum(UInt_t i=1) {fMinMerge=i;}
+ void SetSTDOutput(Bool_t f=kFALSE) {fstdout=f;}
+ void SetCalcErr(Bool_t f=kTRUE) {fcalcerr=f;}
+ void SetASCIIInput(FILE *f){fAltromem.SetASCIIInput(f);}
+
+ Int_t GetNumberOfClusters() const {return fNClusters;}
+
private:
- AliL3AltroMemHandler fAltromem; //!
- VCData fSeq; //!
- VCData fSeqs[N_clmem]; //!
- UShort_t fPList[N_mem];
- UShort_t fRow,fNRow;
- UChar_t fPad,fNPad;
+ AliL3AltroMemHandler fAltromem; //! pointer to the ALTRO memory?
+ VCData fSeq; //! C-structure containing the data sequence
+ VCData fSeqs[N_clmem]; //! array of C-structures containg the data sequence
+ UShort_t fPList[N_mem]; // pad list
+ UShort_t fRow,fNRow; // current row and number of rows
+ UChar_t fPad,fNPad; // current pad and number of pads
UShort_t fRP,fWP,fOP,fEP,fFP; //pointer in ringbuffer
UShort_t fLast,fFirst; //free area in memory
Int_t fST; //sigma in time
Int_t fSM; //seq. mean
- Bool_t fDeconvTime;
- Bool_t fDeconvPad;
- Bool_t fstdout;
- Bool_t fcalcerr;
- Float_t fXYErr;
- Float_t fZErr;
+ Bool_t fDeconvTime; // deconvoluted time
+ Bool_t fDeconvPad; // deconvoluted pad
+ Bool_t fstdout; // output flag
+ Bool_t fcalcerr; // flag to calculate errors
+ Float_t fXYErr; // error in XY
+ Float_t fZErr; // error in Z
Int_t fMatch; //match distance
UInt_t fThreshold; //threshold for cluster
UInt_t fMinMerge; //minimum number of merges for cluster
Int_t fNClusters; //number of found clusters
-#ifdef DEBUG
- FILE *fdeb; //!
+#ifdef VHDLDEBUG
+ FILE *fdeb; //! file for debug
#endif
void Clear();
void ProcessSequence();
//void WriteClusters(Int_t n_clusters,ClusterData *list);
- public:
- AliL3VHDLClusterFinder();
- virtual ~AliL3VHDLClusterFinder();
-
- void ProcessDigits();
-
- void SetXYError(Float_t f) {fXYErr=f;}
- void SetZError(Float_t f) {fZErr=f;}
- void SetDeconv(Bool_t f) {fDeconvPad=f; fDeconvTime=f;}
- void SetThreshold(UInt_t i=10) {fThreshold=i;}
- void SetMatchWidth(UInt_t i=4) {fMatch=i;}
- void SetMergeMinimum(UInt_t i=1) {fMinMerge=i;}
- void SetSTDOutput(Bool_t f=kFALSE) {fstdout=f;}
- void SetCalcErr(Bool_t f=kTRUE) {fcalcerr=f;}
- void SetASCIIInput(FILE *f){fAltromem.SetASCIIInput(f);}
-
- Int_t GetNumberOfClusters() {return fNClusters;}
-
ClassDef(AliL3VHDLClusterFinder,1)
};