]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/RICHpatrec.C
PatRec adapted to new IO
[u/mrichter/AliRoot.git] / RICH / RICHpatrec.C
1 RICHpatrec (Int_t evNumber1=0,Int_t evNumber2=0)
2 {
3   if(gAlice) delete gAlice;      
4   AliRunLoader *al;
5   AliRun *a;
6   
7   if(!(al=AliRunLoader::Open("galice.root","AlicE","update")))
8     Fatal("ReadAlice","galice.root broken");
9   
10   al->LoadgAlice();
11   if(!gAlice) Fatal("ReadAlice","No gAlice in file");
12   a=al->GetAliRun();
13   
14   AliRICHPatRec *detect = new AliRICHPatRec("RICH patrec algorithm","Reconstruction");
15     
16
17     for (int nev=0; nev<= evNumber2; nev++) {    // Event Loop
18       Int_t nparticles = al->GetEvent(nev);
19       cout <<endl<< "Processing event:" <<nev<<endl;
20       cout << "Particles       :" <<nparticles<<endl;
21       if (nev < evNumber1) continue;
22       if (nparticles <= 0) return;
23       detect->PatRec();
24    } // event loop  
25    
26     printf("\nEnd of Macro*************************************\n");
27 }
28
29
30