X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=RICH%2FRICHdigit.C;h=8931f5f8967dc22a60b9d3595e1bba022b671798;hp=507a4c724ca2b97e7a6c5d4389c317bffaa81e74;hb=ff34e3aba7fb87697de398d1a73d947a77521184;hpb=ae2721fba771c6c5f1127fc1f3594e97250f310f diff --git a/RICH/RICHdigit.C b/RICH/RICHdigit.C index 507a4c724ca..8931f5f8967 100644 --- a/RICH/RICHdigit.C +++ b/RICH/RICHdigit.C @@ -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 :" <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);