Example how to run script
[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>
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
35ClassImp(AliL3Hough)
36
37AliL3Hough::AliL3Hough()
38{
b1886074 39 //Constructor
40
a6008206 41 fBinary = kFALSE;
42 fNEtaSegments = 0;
43 fAddHistograms = kFALSE;
b1886074 44 fDoIterative = kFALSE;
a6008206 45 fWriteDigits=kFALSE;
1c404dd5 46 fNPatches=0;
f000f8a5 47}
48
49
4fc9a6a4 50AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments)
f000f8a5 51{
4fc9a6a4 52 fBinary = binary;
53 strcpy(fPath,path);
f80b98cb 54 fNEtaSegments = n_eta_segments;
a6008206 55 fAddHistograms = kFALSE;
b1886074 56 fDoIterative = kFALSE;
a6008206 57 fWriteDigits = kFALSE;
4fc9a6a4 58 Init();
f000f8a5 59}
60
61
62AliL3Hough::~AliL3Hough()
63{
b1886074 64 CleanUp();
65 if(fMerger)
66 delete fMerger;
67 if(fInterMerger)
68 delete fInterMerger;
a6008206 69 if(fPeakFinder)
70 delete fPeakFinder;
1c404dd5 71 if(fGlobalMerger)
72 delete fGlobalMerger;
f000f8a5 73}
74
b1886074 75void AliL3Hough::CleanUp()
f000f8a5 76{
b1886074 77 //Cleanup memory
78
1c404dd5 79 for(Int_t i=0; i<fNPatches; i++)
4fc9a6a4 80 {
b1886074 81 if(fTracks[i]) delete fTracks[i];
82 if(fEval[i]) delete fEval[i];
83 if(fHoughTransformer[i]) delete fHoughTransformer[i];
84 if(fMemHandler[i]) delete fMemHandler[i];
4fc9a6a4 85 }
b1886074 86
87 /*Shitty compiler doesn't allow this:
88
89