1 Int_t AliTPCHits2Digits(Int_t nevent=1)
4 // new version by J.Belikov
6 // Connect the Root Galice file containing Geometry, Kine and Hits
9 delete gAlice->GetRunLoader();
10 delete gAlice;//if everything was OK here it is already NULL
14 AliRunLoader *rl = AliRunLoader::Open("galice.root","Event","update");
17 cerr<<"Can't load RunLoader from "<<inFile_new<<" !\n";
21 // Get AliRun object from file or create it if not on file
25 gAlice = rl->GetAliRun();
27 cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n";
33 // gAlice->GetEvent(0);
34 AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC");
35 AliLoader * tpcl = rl->GetLoader("TPCLoader");
36 if ((TPC == 0x0) || (tpcl == 0x0))
38 cerr<<"AliTPCHits2Digits.C : Can not find TPC or TPCLoader\n";
42 tpcl->LoadHits("READ");
43 tpcl->LoadDigits("recreate");
48 // uncomment below lines to set sectors active
49 // Int_t sec[10]={0,1,2,3,4,5,6,7,8,9};
50 // TPC->SetActiveSectors(sec,10);
52 for(Int_t eventn =0;eventn<nevent;eventn++){
53 printf("Processing event %d \n",eventn);
55 TPC->SetActiveSectors(); // all sectors set active
56 for (Int_t i=0;i<72;i++) if (TPC->IsSectorActive(i)) printf("%d\t",i);
57 TPC->Hits2Digits(eventn);