Major upgrade of AliRoot code
[u/mrichter/AliRoot.git] / TPC / AliTPCtest.C
CommitLineData
73042f01 1Int_t AliTPCtest() {
2 Int_t rc=0;
3
4//Test TPC simulation
5 gROOT->LoadMacro("$(ALICE_ROOT)/macros/grun.C");
6 grun();
7
8 Int_t ver=gAlice->GetDetector("TPC")->IsVersion();
9 delete gAlice; gAlice=0;
37831078 10
11 if ((ver!=1)&&(ver!=2)) {
12 cerr<<"Invalid TPC version: "<<ver<<" ! (must be 1 or 2)\n";
13 return 12345;
14 }
15
73042f01 16 if (ver==2) {
17 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCHits2Digits.C");
18 if (rc=AliTPCHits2Digits()) return rc;
19
cf98c13f 20 // gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayDigits.C");
21 // if (rc=AliTPCDisplayDigits(1,1)) return rc;
73042f01 22 }
23
37831078 24
73042f01 25//Test TPC reconstruction
26 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindClusters.C");
27 if (rc=AliTPCFindClusters()) return rc;
28
cf98c13f 29 // gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayClusters.C");
30 // if (rc=AliTPCDisplayClusters()) return rc;
73042f01 31
32 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindTracks.C");
33 if (rc=AliTPCFindTracks()) return rc;
34
35 gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCComparison.C");
36 if (rc=AliTPCComparison()) return rc;
37
38 return rc;
39}