AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCHits2Clusters.C
Go to the documentation of this file.
1 
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 
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(){
34 
35  if (gAlice) {
36  delete AliRunLoader::Instance();
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 
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
TFile * Open(const char *filename, Long64_t &nevents)
void Hits2ExactClusters()
AliRunLoader * Init()
AliRun * gAlice