1 void AliITSPrintRecPoints(TString rfn="galice.root",Int_t mod=-1,
3 // Macro to print out the recpoints for all or a specific module
5 // Dynamically link some shared libs
6 if (gClassTable->GetID("AliRun") < 0) {
7 gROOT->LoadMacro("loadlibs.C");
12 delete gAlice->GetRunLoader();
18 gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C");
20 AliRunLoader *rl = AccessFile(rfn); // Set up to read in Data
21 Int_t retval = rl->LoadHeader();
23 cerr<<"AliITSPrintRecPoints.C : LoadHeader returned error"<<endl;
27 AliITSLoader* ITSloader = (AliITSLoader*) rl->GetLoader("ITSLoader");
30 cerr<<"AliITSPrintRecPoints.C : ITS loader not found"<<endl;
34 ITSloader->LoadHits("read");
35 ITSloader->LoadDigits("read");
36 ITSloader->LoadRecPoints("read");
37 AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
39 cout << "Error: no ITS found. Aborting"<<endl;
44 Int_t evNumber2 = gAlice->GetEventsPerRun();
50 Int_t mod2 = ITS->GetITSgeom()->GetIndexMax();
56 AliITSRecPoint *rp = 0;
57 AliITSDetTypeRec* rec = new AliITSDetTypeRec();
58 rec->SetLoader(ITSloader);
59 rec->SetITSgeom(ITS->GetITSgeom());
63 for(event = evNumber1; event < evNumber2; event++){
65 rec->SetTreeAddress();
66 for(m=mod1;m<mod2;m++){
67 rec->ResetRecPoints();
68 TTree *TR = ITSloader->TreeR();
70 rpa = rec->RecPoints();
71 i2 = rpa->GetEntriesFast();
72 cout << "Event=" << event << " module=" << m <<
73 " Number of Recpoints=" << i2 <<endl;
75 rp = (AliITSRecPoint*)(rpa->At(i));
77 rp->Print((ostream*)cout);