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