Int_t AliTPCHits2Digits(Int_t nevent=1) { // new version by J.Belikov // Connect the Root Galice file containing Geometry, Kine and Hits if (gAlice) { delete gAlice->GetRunLoader(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } AliRunLoader *rl = AliRunLoader::Open("galice.root","Event","update"); if (!rl) { cerr<<"Can't load RunLoader from "<LoadgAlice(); gAlice = rl->GetAliRun(); if (!gAlice) { cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n"; return 2; } // gAlice->GetEvent(0); AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC"); AliLoader * tpcl = rl->GetLoader("TPCLoader"); if ((TPC == 0x0) || (tpcl == 0x0)) { cerr<<"AliTPCHits2Digits.C : Can not find TPC or TPCLoader\n"; // delete rl; return 3; } tpcl->LoadHits("READ"); tpcl->LoadDigits("recreate"); TStopwatch timer; timer.Start(); // uncomment below lines to set sectors active // Int_t sec[10]={0,1,2,3,4,5,6,7,8,9}; // TPC->SetActiveSectors(sec,10); for(Int_t eventn =0;eventnGetEvent(eventn); TPC->SetActiveSectors(); // all sectors set active for (Int_t i=0;i<72;i++) if (TPC->IsSectorActive(i)) printf("%d\t",i); TPC->Hits2Digits(eventn); } delete rl; timer.Stop(); timer.Print(); return 0; };