]>
Commit | Line | Data |
---|---|---|
71531a24 | 1 | /// \file AliTPCHits2Clusters.C |
2 | /// | |
3 | /// ~~~ | |
4 | /// .L AliTPCHits2Clusters.C+ | |
5 | /// Hits2ExactClusters(); | |
6 | /// ~~~ | |
8ebf1d48 | 7 | |
8 | #include "AliRun.h" | |
9 | #include "AliRunLoader.h" | |
10 | #include "AliTPC.h" | |
11 | #include "AliTPCLoader.h" | |
12 | #include "AliTPCFast.h" | |
13 | ||
14 | ||
15 | AliRunLoader *Init(); | |
16 | ||
17 | void Hits2ExactClusters(){ | |
18 | AliRunLoader * runLoader = Init(); | |
19 | AliTPCFast fast; | |
20 | ||
21 | for (Int_t ievent =0; ievent<runLoader->GetNumberOfEvents(); ievent++){ | |
22 | runLoader->SetEventNumber(ievent); | |
23 | printf("Event\t%d\n",ievent); | |
24 | fast.Hits2ExactClusters(runLoader); | |
25 | } | |
26 | } | |
27 | ||
28 | ||
29 | ||
30 | ||
31 | ||
32 | AliRunLoader* Init(){ | |
71531a24 | 33 | /// initialization |
34 | ||
8ebf1d48 | 35 | if (gAlice) { |
33c3c91a | 36 | delete AliRunLoader::Instance(); |
8ebf1d48 | 37 | delete gAlice;//if everything was OK here it is already NULL |
38 | gAlice = 0x0; | |
39 | } | |
40 | ||
41 | AliRunLoader* rl = AliRunLoader::Open("galice.root"); | |
42 | if (rl == 0x0) { | |
43 | cerr<<"Can not open session"<<endl; | |
44 | return 0; | |
45 | } | |
46 | ||
47 | if (rl->LoadgAlice()) { | |
48 | cerr<<"Error occured while l"<<endl; | |
49 | return 0; | |
50 | } | |
51 | ||
52 | gAlice=rl->GetAliRun(); | |
53 | if (!gAlice) { | |
54 | cerr<<"Can't get gAlice !\n"; | |
55 | return 0; | |
56 | } | |
57 | return rl; | |
58 | } | |
59 | ||
60 | ||
61 |