]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFtest.C
AliTOFRawStream class: change of the TOF geometry pointer
[u/mrichter/AliRoot.git] / TOF / AliTOFtest.C
CommitLineData
32bd3eb5 1Int_t AliTOFtest(Int_t nevents=1)
42036c57 2{
3 //
4 // Test macro for the TOF code
5 // report bug to Fabrizio.Pierella@cern.ch
6 // Use case:
7 // start aliroot
8 // root [0] .L AliTOFtest.C
9 // root [1] AliTOFtest()
32bd3eb5 10 //
11 // Updated to the new I/O: A. De Caro, C. Zampolli
12 //
42036c57 13
14 Int_t rc = 0;
15
16 // Initialize the test setup
17
710ea4e8 18 gAlice->Init("$ALICE_ROOT/TOF/AliTOFconfig.C");
42036c57 19
32bd3eb5 20 // Run one central Hijing event and create the hits
21 // (time required: some minuts)
42036c57 22
23 gAlice->SetDebug(2);
32bd3eb5 24 gAlice->Run(nevents);
42036c57 25
32bd3eb5 26 if (gAlice)
27 {
28 delete gAlice->GetRunLoader();
29 delete gAlice;
30 gAlice = 0x0;
42036c57 31 }
32
32bd3eb5 33 gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFanalyzeHits.C");
34 if (rc=AliTOFanalyzeHits()) return rc;
42036c57 35
32bd3eb5 36 if (gAlice)
37 {
38 delete gAlice->GetRunLoader();
39 delete gAlice;
40 gAlice = 0x0;
41 }
42036c57 42
32bd3eb5 43 gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFhits2sdigits.C");
44 if (rc=AliTOFhits2sdigits()) return rc;
42036c57 45
32bd3eb5 46 if (gAlice)
47 {
48 delete gAlice->GetRunLoader();
49 delete gAlice;
50 gAlice = 0x0;
51 }
42036c57 52
32bd3eb5 53 gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFanalyzeSDigitsV2.C");
54 if (rc=AliTOFanalyzeSDigitsV2()) return rc;
42036c57 55
32bd3eb5 56 if (gAlice)
57 {
58 delete gAlice->GetRunLoader();
59 delete gAlice;
60 gAlice = 0x0;
61 }
62
63 gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFSDigits2Digits.C");
64 if (rc=AliTOFSDigits2Digits()) return rc;
65 //gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFtestDigitizer.C");
66 //if (rc=AliTOFtestDigitizer()) return rc;
67
68 if (gAlice)
69 {
70 delete gAlice->GetRunLoader();
71 delete gAlice;
72 gAlice = 0x0;
73 }
42036c57 74
32bd3eb5 75 gROOT->LoadMacro("$(ALICE_ROOT)/TOF/AliTOFanalyzeDigits.C");
76 if (rc=AliTOFanalyzeDigits()) return rc;
77 if (gAlice)
78 {
79 delete gAlice->GetRunLoader();
80 delete gAlice;
81 gAlice = 0x0;
82 }
42036c57 83
84}