]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtest.C
J.Chudoba's changes merged correctly with the HEAD
[u/mrichter/AliRoot.git] / TRD / AliTRDtest.C
1 Int_t AliTRDtest() 
2 {
3   //
4   // Test macro for the TRD code
5   //
6
7   Int_t rc = 0;
8
9   // Initialize the test setup 
10   gAlice->Init("$(ALICE_ROOT)/TRD/AliTRDconfig.C");
11
12   // Run one event and create the hits
13   gAlice->SetDebug(2);
14   gAlice->Run(1);
15
16   if (gAlice) delete gAlice;
17   TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
18   gAlice = (AliRun *) file->Get("gAlice");
19
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
28   if (gAlice) delete gAlice;
29   TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
30   gAlice = (AliRun *) file->Get("gAlice");
31
32   // Analyze the digits
33   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeDigits.C");
34   if (rc = AliTRDanalyzeDigits()) return rc;
35
36   // Create the cluster
37   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDcreateCluster.C");
38   if (rc = AliTRDcreateCluster()) return rc;
39
40   if (gAlice) delete gAlice;
41   TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
42   gAlice = (AliRun *) file->Get("gAlice");
43
44   // Analyze the digits
45   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeCluster.C");
46   if (rc = AliTRDanalyzeCluster()) return rc;
47
48   return rc;
49
50 }