]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtest.C
Update of digitization. Moved digit branch definition to AliTRD
[u/mrichter/AliRoot.git] / TRD / AliTRDtest.C
CommitLineData
793ff80c 1Int_t AliTRDtest()
2{
3 //
4 // Test macro for the TRD code
5 //
6
7 Int_t rc = 0;
8
9 // Initialize the test setup
5931c105 10 gAlice->Init("$(ALICE_ROOT)/TRD/AliTRDconfig.C");
793ff80c 11
12 // Run one event and create the hits
6244debe 13 gAlice->SetDebug(2);
793ff80c 14 gAlice->Run(1);
15
6244debe 16 if (gAlice) delete gAlice;
17 TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
18 gAlice = (AliRun *) file->Get("gAlice");
19
793ff80c 20 // Analyze the TRD hits
21 gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeHits.C");
22 if (rc = AliTRDanalyzeHits()) return rc;
23
24 // Run the digitization
25 gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDcreateDigits.C");
26 if (rc = AliTRDcreateDigits()) return rc;
27
6244debe 28 if (gAlice) delete gAlice;
29 TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
30 gAlice = (AliRun *) file->Get("gAlice");
31
793ff80c 32 // Analyze the digits
33 gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeDigits.C");
34 if (rc = AliTRDanalyzeDigits()) return rc;
35
36 return rc;
37
38}