Several patches were done to adapt the barel reconstruction to the multi-event case...
[u/mrichter/AliRoot.git] / TPC / AliTPCFindTracks.C
CommitLineData
b9de75e1 1#ifndef __CINT__
2 #include <iostream.h>
3 #include "AliTPCtracker.h"
4
5 #include "TFile.h"
6 #include "TStopwatch.h"
7#endif
8
afc42102 9Int_t AliTPCFindTracks(Int_t eventn=1) {
73042f01 10 cerr<<"Looking for tracks...\n";
11
12 TFile *out=TFile::Open("AliTPCtracks.root","new");
13 if (!out->IsOpen()) {cerr<<"Delete old AliTPCtracks.root !\n"; return 1;}
14
15 TFile *in=TFile::Open("AliTPCclusters.root");
16 if (!in->IsOpen()) {cerr<<"Can't open AliTPCclusters.root !\n"; return 2;}
17
b9de75e1 18 AliTPCParam *par=(AliTPCParam*)in->Get("75x40_100x60");
19 if (!par) {cerr<<"Can't get TPC parameters !\n"; return 3;}
20
73042f01 21 TStopwatch timer;
afc42102 22
23 for (Int_t i=0;i<eventn;i++){
24 printf("Processing event %d\n",i);
25 AliTPCtracker *tracker = new AliTPCtracker(par,i);
26 Int_t rc=tracker->Clusters2Tracks(0,out);
ec48216e 27 delete tracker;
afc42102 28 }
73042f01 29 timer.Stop(); timer.Print();
b9de75e1 30
f38c8ae5 31 delete par; //Thanks to Mariana Bondila
32
73042f01 33 in->Close();
34 out->Close();
35
f38c8ae5 36 return 0;
73042f01 37}