]>
Commit | Line | Data |
---|---|---|
32bd3eb5 | 1 | Int_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 | { | |
880d6abe | 28 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 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 | { | |
880d6abe | 38 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 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 | { | |
880d6abe | 48 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 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 | { | |
880d6abe | 58 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 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 | { | |
880d6abe | 70 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 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 | { | |
880d6abe | 79 | delete AliRunLoader::GetRunLoader(); |
32bd3eb5 | 80 | delete gAlice; |
81 | gAlice = 0x0; | |
82 | } | |
42036c57 | 83 | |
84 | } |