4 #include "TClonesArray.h"
6 #include "$(ALICE_ROOT)/STEER/AliRun.h"
7 #include "$(ALICE_ROOT)/ITS/AliITS.h"
8 #include "$(ALICE_ROOT)/ITS/AliITSgeom.h"
9 #include "$(ALICE_ROOT)/ITS/AliITSdigit.h"
11 void AliITSPrintDigits(TString rfn="galice.root",Int_t mod=-1,
13 // Macro to print out the recpoints for all or a specific module
15 // Dynamically link some shared libs
16 if (gClassTable->GetID("AliRun") < 0) {
17 gROOT->LoadMacro("loadlibs.C");
20 gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C");
23 rf = AccessFile(rfn,"R"); // Set up to read in Data
24 AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS");
26 cout << "Error: no ITS found. Aborting"<<endl;
31 Int_t evNumber2 = gAlice->GetEventsPerRun();
37 Int_t mod2 = ITS->GetITSgeom()->GetIndexMax();
42 TClonesArray *pda = 0;
43 AliITSdigitSPD *dp0 = 0;
44 AliITSdigitSDD *dp1 = 0;
45 AliITSdigitSSD *dp2 = 0;
47 Int_t event,m,i,i2,id;
48 for(event = evNumber1; event < evNumber2; event++){
49 gAlice->GetEvent(event);
50 for(m=mod1;m<mod2;m++){
51 id = ITS->GetITSgeom()->GetModuleType(m);
52 dpa = ITS->DigitsAddress(id);
54 gAlice->TreeD()->GetEvent(m);
55 i2 = dpa->GetEntriesFast();
58 cout << "Event=" << event << " module=" << m <<
59 " Number of SPD Digits=" << i2 <<endl;
61 dp0 = (AliITSdigitSPD*)(dpa->At(i));
63 dp0->Print((ostream*)cout);
68 cout << "Event=" << event << " module=" << m <<
69 " Number of SDD Digits=" << i2 <<endl;
71 dp1 = (AliITSdigitSDD*)(dpa->At(i));
73 dp1->Print((ostream*)cout);
78 cout << "Event=" << event << " module=" << m <<
79 " Number of SSD Digits=" << i2 <<endl;
81 dp2 = (AliITSdigitSSD*)(dpa->At(i));
83 dp2->Print((ostream*)cout);