This patch solves the problem encountered when posting tasks to the folder. What...
[u/mrichter/AliRoot.git] / HLT / hough / AliL3Hough.cxx
CommitLineData
b1886074 1//$Id$
2
3// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
4//*-- Copyright &copy ASV
5
f80b98cb 6
f000f8a5 7#include <string.h>
0309a5ee 8#include <sys/time.h>
f000f8a5 9
b1886074 10#include "AliL3HoughMerger.h"
11#include "AliL3HoughIntMerger.h"
12#include "AliL3HoughGlobalMerger.h"
a6008206 13#include "AliL3Logging.h"
f80b98cb 14#include "AliL3Histogram.h"
f000f8a5 15#include "AliL3Hough.h"
16#include "AliL3HoughTransformer.h"
b46b53c1 17#include "AliL3HoughTransformerVhdl.h"
f000f8a5 18#include "AliL3HoughMaxFinder.h"
95a00d93 19#ifdef use_aliroot
f80b98cb 20#include "AliL3FileHandler.h"
95a00d93 21#else
22#include "AliL3MemHandler.h"
23#endif
d96f6a4a 24#include "AliL3DataHandler.h"
f80b98cb 25#include "AliL3DigitData.h"
26#include "AliL3HoughEval.h"
27#include "AliL3Transform.h"
f80b98cb 28#include "AliL3TrackArray.h"
29#include "AliL3HoughTrack.h"
95a00d93 30
b1886074 31
32//_____________________________________________________________
33// AliL3Hough
34//
237d3f5c 35// Interface class for the Hough transform
b1886074 36//
237d3f5c 37// Example how to use:
38//
39// AliL3Hough *hough = new AliL3Hough(path,kTRUE,NumberOfEtaSegments);
40// hough->ReadData(slice);
41// hough->Transform();
42// hough->FindTrackCandidates();
43//
44// AliL3TrackArray *tracks = hough->GetTracks(patch);
f000f8a5 45
46ClassImp(AliL3Hough)
47
48AliL3Hough::AliL3Hough()
49{
b1886074 50 //Constructor
51
a6008206 52 fBinary = kFALSE;
53 fNEtaSegments = 0;
54 fAddHistograms = kFALSE;
b1886074 55 fDoIterative = kFALSE;
a6008206 56 fWriteDigits=kFALSE;
1c404dd5 57 fNPatches=0;
237d3f5c 58 fMemHandler = 0;
59 fHoughTransformer = 0;
60 fEval = 0;
61 fPeakFinder = 0;
62 fTracks = 0;
63 fMerger = 0;
64 fInterMerger = 0;
65 fGlobalMerger = 0;
b46b53c1 66 fversion = 0;
f000f8a5 67}
68
b46b53c1 69AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments,Int_t tversion=0)
70{
71 //Default ctor.
72
73 fBinary = binary;
74 strcpy(fPath,path);
75 fNEtaSegments = n_eta_segments;
76 fAddHistograms = kFALSE;
77 fDoIterative = kFALSE;
78 fWriteDigits = kFALSE;
79 fversion = tversion;
80}
f000f8a5 81
f000f8a5 82AliL3Hough::~AliL3Hough()
83{
237d3f5c 84 //dtor
85
b1886074 86 CleanUp();
87 if(fMerger)
88 delete fMerger;
89 if(fInterMerger)
90 delete fInterMerger;
a6008206 91 if(fPeakFinder)
92 delete fPeakFinder;
1c404dd5 93 if(fGlobalMerger)
94 delete fGlobalMerger;
f000f8a5 95}
96
b1886074 97void AliL3Hough::CleanUp()
f000f8a5 98{
b1886074 99 //Cleanup memory
100
1c404dd5 101 for(Int_t i=0; i<fNPatches; i++)
4fc9a6a4 102 {
b1886074 103 if(fTracks[i]) delete fTracks[i];
104 if(fEval[i]) delete fEval[i];
105 if(fHoughTransformer[i]) delete fHoughTransformer[i];
106 if(fMemHandler[i]) delete fMemHandler[i];
4fc9a6a4 107 }
b1886074 108
3fe49b5b 109 /*
110