]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Have to create Digits trees and branches by hand in the case of multiple event files.
authorjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2001 20:23:54 +0000 (20:23 +0000)
committerjbarbosa <jbarbosa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2001 20:23:54 +0000 (20:23 +0000)
RICH/RICHdigit.C

index 507a4c724ca2b97e7a6c5d4389c317bffaa81e74..8931f5f8967dc22a60b9d3595e1bba022b671798 100644 (file)
@@ -26,8 +26,12 @@ void RICHdigit (Int_t evNumber1=0,Int_t evNumber2=0)
   if (gClassTable->GetID("AliRun") < 0) {
       gROOT->LoadMacro("loadlibs.C");
       loadlibs();
-   }
-
+  }else {
+    delete gAlice;
+    gAlice = 0;
+  }
+  
+  galice=0;
 
 // Connect the Root Galice file containing Geometry, Kine and Hits
 
@@ -43,11 +47,6 @@ void RICHdigit (Int_t evNumber1=0,Int_t evNumber2=0)
        gROOT->LoadMacro("loadlibs.C");
        loadlibs();
     }
-    else {
-      //delete gAlice;
-      gAlice = 0;
-    }
-   
 
 
    if (!gAlice) {
@@ -73,7 +72,6 @@ void RICHdigit (Int_t evNumber1=0,Int_t evNumber2=0)
        iChamber->GenerateTresholds();
      }
    
-
 //
 // Event Loop
 //
@@ -83,7 +81,13 @@ void RICHdigit (Int_t evNumber1=0,Int_t evNumber2=0)
        cout << "Particles       :" <<nparticles<<endl;
        if (nev < evNumber1) continue;
        if (nparticles <= 0) return;
-       if (RICH) RICH->Digitise(nev, particle_type);
+       if (RICH) 
+        {
+          gAlice->MakeTree("D");
+          RICH->MakeBranch("D");
+          RICH->Digitise(nev, particle_type);
+        }
+       //if (RICH) gAlice->SDigits2Digits("RICH");
        //char hname[30];
        //sprintf(hname,"TreeD%d",nev);
        //gAlice->TreeD()->Write(hname);