Added #include<stdlib.h> and log
[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>
f000f8a5 8
b1886074 9#include "AliL3HoughMerger.h"
10#include "AliL3HoughIntMerger.h"
11#include "AliL3HoughGlobalMerger.h"
a6008206 12#include "AliL3Logging.h"
f80b98cb 13#include "AliL3Histogram.h"
f000f8a5 14#include "AliL3Hough.h"
15#include "AliL3HoughTransformer.h"
16#include "AliL3HoughMaxFinder.h"
95a00d93 17#ifdef use_aliroot
f80b98cb 18#include "AliL3FileHandler.h"
95a00d93 19#else
20#include "AliL3MemHandler.h"
21#endif
f80b98cb 22#include "AliL3DigitData.h"
23#include "AliL3HoughEval.h"
24#include "AliL3Transform.h"
25#include "AliL3Defs.h"
26#include "AliL3TrackArray.h"
27#include "AliL3HoughTrack.h"
95a00d93 28
b1886074 29
30//_____________________________________________________________
31// AliL3Hough
32//
33// Base class for the Hough transform
34//
35
f000f8a5 36
37ClassImp(AliL3Hough)
38
39AliL3Hough::AliL3Hough()
40{
b1886074 41 //Constructor
42
a6008206 43 fBinary = kFALSE;
44 fNEtaSegments = 0;
45 fAddHistograms = kFALSE;
b1886074 46 fDoIterative = kFALSE;
a6008206 47 fWriteDigits=kFALSE;
1c404dd5 48 fNPatches=0;
f000f8a5 49}
50
51
4fc9a6a4 52AliL3Hough::AliL3Hough(Char_t *path,Bool_t binary,Int_t n_eta_segments)
f000f8a5 53{
4fc9a6a4 54 fBinary = binary;
55 strcpy(fPath,path);
f80b98cb 56 fNEtaSegments = n_eta_segments;
a6008206 57 fAddHistograms = kFALSE;
b1886074 58 fDoIterative = kFALSE;
a6008206 59 fWriteDigits = kFALSE;
4fc9a6a4 60 Init();
f000f8a5 61}
62
63
64AliL3Hough::~AliL3Hough()
65{
b1886074 66 CleanUp();
67 if(fMerger)
68 delete fMerger;
69 if(fInterMerger)
70 delete fInterMerger;
a6008206 71 if(fPeakFinder)
72 delete fPeakFinder;
1c404dd5 73 if(fGlobalMerger)
74 delete fGlobalMerger;
f000f8a5 75}
76
b1886074 77void AliL3Hough::CleanUp()
f000f8a5 78{
b1886074 79 //Cleanup memory
80
1c404dd5 81 for(Int_t i=0; i<fNPatches; i++)
4fc9a6a4 82 {
b1886074 83 if(fTracks[i]) delete fTracks[i];
84 if(fEval[i]) delete fEval[i];
85 if(fHoughTransformer[i]) delete fHoughTransformer[i];
86 if(fMemHandler[i]) delete fMemHandler[i];
4fc9a6a4 87 }
b1886074 88
89 /*Shitty compiler doesn't allow this:
90
91