Some additional changes related to the previous changes. AliL3Transform
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Hough.h
index 3f0208d534c0318be1e1ab623c046464954a46d9..44f9b4ef95b7262fd397601c16b3a9cfc1dd811e 100644 (file)
@@ -4,33 +4,44 @@
 #include "AliL3RootTypes.h"
 
 class AliL3HoughMaxFinder;
-class AliL3HoughTransformer;
+class AliL3HoughBaseTransformer;
 class AliL3Histogram;
+class AliL3MemHandler;
 class AliL3FileHandler;
 class AliL3HoughEval;
 class AliL3Transform;
 class AliL3TrackArray;
-class TFile;
+class AliL3HoughMerger;
+class AliL3HoughIntMerger;
+class AliL3HoughGlobalMerger;
+class AliL3Transform;
 
-class AliL3Hough : public TObject {
+class AliL3Hough {
   
  private:
   Char_t fPath[256];
   Bool_t fBinary;
   Bool_t fAddHistograms;
-  Bool_t fRemoveFoundTracks;
+  Bool_t fDoIterative;
   Bool_t fWriteDigits;
   Int_t fNEtaSegments;
+  Int_t fNPatches;
+  Int_t fPeakThreshold;
+#ifdef use_aliroot
   AliL3FileHandler **fMemHandler; //!
-  AliL3HoughTransformer **fHoughTransformer; //!
+#else
+  AliL3MemHandler **fMemHandler; //!
+#endif
+  AliL3HoughBaseTransformer **fHoughTransformer; //!
   AliL3HoughEval **fEval; //!
   AliL3HoughMaxFinder *fPeakFinder; //!
-  AliL3TrackArray *fTracks; //!
-  TFile *fRootFile; //!
-  
-  void DeleteEval();
-  void DeleteTransformers();
-  void DeleteMemory();
+  AliL3TrackArray **fTracks; //!
+  AliL3HoughMerger *fMerger; //!
+  AliL3HoughIntMerger *fInterMerger; //!
+  AliL3HoughGlobalMerger *fGlobalMerger; //!
+  AliL3Transform *fTransform; //!
+
+  void CleanUp();
   void Init();
   
  public:
@@ -40,24 +51,42 @@ class AliL3Hough : public TObject {
   virtual ~AliL3Hough();
   
   void Process(Int_t minslice,Int_t maxslice);
-  void TransformSlice(Int_t slice);
+  void ReadData(Int_t slice);
+  void Transform(Int_t row_range = -1);
+  void ProcessSliceIter();
+  void ProcessPatchIter(Int_t patch);
+  void MergePatches();
+  void MergeInternally();
+
   void FindTrackCandidates();
-  AliL3Histogram *AddHistograms(Int_t eta_index);
   void AddAllHistograms();
-  void Evaluate(Bool_t remove=kFALSE);
+  void Evaluate(Int_t road_width=1);
+  void EvaluateWithEta();
+  void WriteTracks(Char_t *path="./");
+#ifdef use_aliroot
   void WriteDigits(Char_t *outfile="output_digits.root");
-  
+#endif
+
   //Setters
   void SetNEtaSegments(Int_t i) {fNEtaSegments = i;}
   void SetAddHistograms() {fAddHistograms = kTRUE;}
-  void SetRemoveFoundTracks() {fRemoveFoundTracks = kTRUE;}
+  void DoIterative() {fDoIterative = kTRUE;}
   void SetWriteDigits() {fWriteDigits = kTRUE;}
+  void SetPeakThreshold(Int_t i) {fPeakThreshold = i;}
   
   //Getters
-  AliL3HoughTransformer *GetTransformer(Int_t i) {if(!fHoughTransformer[i]) return 0; return fHoughTransformer[i];}
-  AliL3TrackArray *GetTracks() {if(!fTracks) return 0; return fTracks;}
+  AliL3HoughBaseTransformer *GetTransformer(Int_t i) {if(!fHoughTransformer[i]) return 0; return fHoughTransformer[i];}
+  AliL3TrackArray *GetTracks(Int_t i) {if(!fTracks[i]) return 0; return fTracks[i];}
+  AliL3HoughEval *GetEval(Int_t i) {if(!fEval[i]) return 0; return fEval[i];}
+  AliL3HoughMerger *GetMerger() {if(!fMerger) return 0; return fMerger;}
+  AliL3HoughIntMerger *GetInterMerger() {if(!fInterMerger) return 0; return fInterMerger;}
+#ifdef use_aliroot
+  AliL3FileHandler *GetMemHandler(Int_t i) {if(!fMemHandler[i]) return 0; return fMemHandler[i];}
+#else
+  AliL3MemHandler *GetMemHandler(Int_t i) {if(!fMemHandler[i]) return 0; return fMemHandler[i];}
+#endif
 
-  ClassDef(AliL3Hough,1)
+  ClassDef(AliL3Hough,1) //Hough transform base class
 
 };