b1886074 |
1 | //$Id$ |
2 | |
3 | // Author: Anders Vestbo <mailto:vestbo@fi.uib.no> |
4 | //*-- Copyright © ASV |
5 | |
f80b98cb |
6 | |
f000f8a5 |
7 | #include <string.h> |
f80b98cb |
8 | #include <TCanvas.h> |
9 | #include <TFile.h> |
f000f8a5 |
10 | |
b1886074 |
11 | #include "AliL3HoughMerger.h" |
12 | #include "AliL3HoughIntMerger.h" |
13 | #include "AliL3HoughGlobalMerger.h" |
a6008206 |
14 | #include "AliL3Logging.h" |
f80b98cb |
15 | #include "AliL3Histogram.h" |
f000f8a5 |
16 | #include "AliL3Hough.h" |
17 | #include "AliL3HoughTransformer.h" |
18 | #include "AliL3HoughMaxFinder.h" |
f80b98cb |
19 | #include "AliL3FileHandler.h" |
20 | #include "AliL3DigitData.h" |
21 | #include "AliL3HoughEval.h" |
22 | #include "AliL3Transform.h" |
23 | #include "AliL3Defs.h" |
24 | #include "AliL3TrackArray.h" |
25 | #include "AliL3HoughTrack.h" |
b1886074 |
26 | #include "AliL3Benchmark.h" |
27 | |
28 | //_____________________________________________________________ |
29 | // AliL3Hough |
30 | // |
31 | // Base class for the Hough transform |
32 | // |
33 | |
f000f8a5 |
34 | |
35 | ClassImp(AliL3Hough) |
36 | |
37 | AliL3Hough::AliL3Hough() |
38 | { |
b1886074 |
39 | //Constructor |
40 | |
a6008206 |
41 | fBinary = kFALSE; |
42 | fNEtaSegments = 0; |
43 | fAddHistograms = kFALSE; |
b1886074 |
44 | fDoIterative = kFALSE; |
a6008206 |
45 | fWriteDigits=kFALSE; |
f000f8a5 |
46 | } |
47 | |
48 | |
4fc9a6a4 |
49 | AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments) |
f000f8a5 |
50 | { |
4fc9a6a4 |
51 | fBinary = binary; |
52 | strcpy(fPath,path); |
f80b98cb |
53 | fNEtaSegments = n_eta_segments; |
a6008206 |
54 | fAddHistograms = kFALSE; |
b1886074 |
55 | fDoIterative = kFALSE; |
a6008206 |
56 | fWriteDigits = kFALSE; |
4fc9a6a4 |
57 | Init(); |
f000f8a5 |
58 | } |
59 | |
60 | |
61 | AliL3Hough::~AliL3Hough() |
62 | { |
b1886074 |
63 | CleanUp(); |
64 | if(fMerger) |
65 | delete fMerger; |
66 | if(fInterMerger) |
67 | delete fInterMerger; |
a6008206 |
68 | if(fPeakFinder) |
69 | delete fPeakFinder; |
f000f8a5 |
70 | } |
71 | |
b1886074 |
72 | void AliL3Hough::CleanUp() |
f000f8a5 |
73 | { |
b1886074 |
74 | //Cleanup memory |
75 | |
4fc9a6a4 |
76 | for(Int_t i=0; i<NPatches; i++) |
77 | { |
b1886074 |
78 | if(fTracks[i]) delete fTracks[i]; |
79 | if(fEval[i]) delete fEval[i]; |
80 | if(fHoughTransformer[i]) delete fHoughTransformer[i]; |
81 | if(fMemHandler[i]) delete fMemHandler[i]; |
4fc9a6a4 |
82 | } |
b1886074 |
83 | |
84 | /*Shitty compiler doesn't allow this: |
85 | |
86 |