]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtest.C
Major upgrades to the strip structure
[u/mrichter/AliRoot.git] / TRD / AliTRDtest.C
index e1ac3df5bfd81b5169e7c56f711787c7d838eb59..d7a07b283a590454d7d0018c31ded8bcb3b8658d 100644 (file)
@@ -7,11 +7,16 @@ Int_t AliTRDtest()
   Int_t rc = 0;
 
   // Initialize the test setup 
-  gAlice->Init("AliTRDconfig.C");
+  gAlice->Init("$(ALICE_ROOT)/TRD/AliTRDconfig.C");
 
   // Run one event and create the hits
+  gAlice->SetDebug(2);
   gAlice->Run(1);
 
+  if (gAlice) delete gAlice;
+  TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
+  gAlice = (AliRun *) file->Get("gAlice");
+
   // Analyze the TRD hits
   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeHits.C");
   if (rc = AliTRDanalyzeHits()) return rc;
@@ -20,10 +25,26 @@ Int_t AliTRDtest()
   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDcreateDigits.C");
   if (rc = AliTRDcreateDigits()) return rc;
 
+  if (gAlice) delete gAlice;
+  TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
+  gAlice = (AliRun *) file->Get("gAlice");
+
   // Analyze the digits
   gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeDigits.C");
   if (rc = AliTRDanalyzeDigits()) return rc;
 
+  // Create the cluster
+  gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDcreateCluster.C");
+  if (rc = AliTRDcreateCluster()) return rc;
+
+  if (gAlice) delete gAlice;
+  TFile *file = (TFile *) gROOT->GetListOfFiles()->FindObject("TRD_test.root");
+  gAlice = (AliRun *) file->Get("gAlice");
+
+  // Analyze the digits
+  gROOT->LoadMacro("$(ALICE_ROOT)/TRD/AliTRDanalyzeCluster.C");
+  if (rc = AliTRDanalyzeCluster()) return rc;
+
   return rc;
 
 }