Made it possible to read different and several events from rootfile.
[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
d96f6a4a 22#include "AliL3DataHandler.h"
f80b98cb 23#include "AliL3DigitData.h"
24#include "AliL3HoughEval.h"
25#include "AliL3Transform.h"
f80b98cb 26#include "AliL3TrackArray.h"
27#include "AliL3HoughTrack.h"
95a00d93 28
b1886074 29
30//_____________________________________________________________
31// AliL3Hough
32//
237d3f5c 33// Interface class for the Hough transform
b1886074 34//
237d3f5c 35// Example how to use:
36//
37// AliL3Hough *hough = new AliL3Hough(path,kTRUE,NumberOfEtaSegments);
38// hough->ReadData(slice);
39// hough->Transform();
40// hough->FindTrackCandidates();
41//
42// AliL3TrackArray *tracks = hough->GetTracks(patch);
f000f8a5 43
44ClassImp(AliL3Hough)
45
46AliL3Hough::AliL3Hough()
47{
b1886074 48 //Constructor
49
a6008206 50 fBinary = kFALSE;
51 fNEtaSegments = 0;
52 fAddHistograms = kFALSE;
b1886074 53 fDoIterative = kFALSE;
a6008206 54 fWriteDigits=kFALSE;
1c404dd5 55 fNPatches=0;
237d3f5c 56 fMemHandler = 0;
57 fHoughTransformer = 0;
58 fEval = 0;
59 fPeakFinder = 0;
60 fTracks = 0;
61 fMerger = 0;
62 fInterMerger = 0;
63 fGlobalMerger = 0;
f000f8a5 64}
65
66
f000f8a5 67AliL3Hough::~AliL3Hough()
68{
237d3f5c 69 //dtor
70
b1886074 71 CleanUp();
72 if(fMerger)
73 delete fMerger;
74 if(fInterMerger)
75 delete fInterMerger;
a6008206 76 if(fPeakFinder)
77 delete fPeakFinder;
1c404dd5 78 if(fGlobalMerger)
79 delete fGlobalMerger;
f000f8a5 80}
81
b1886074 82void AliL3Hough::CleanUp()
f000f8a5 83{
b1886074 84 //Cleanup memory
85
1c404dd5 86 for(Int_t i=0; i<fNPatches; i++)
4fc9a6a4 87 {
b1886074 88 if(fTracks[i]) delete fTracks[i];
89 if(fEval[i]) delete fEval[i];
90 if(fHoughTransformer[i]) delete fHoughTransformer[i];
91 if(fMemHandler[i]) delete fMemHandler[i];
4fc9a6a4 92 }
b1886074 93
3fe49b5b 94 /*
95