Correcting the comments changed in the previous commit
[u/mrichter/AliRoot.git] / PMD / AliPMDRawDataRead.C
CommitLineData
9f35f7b3 1// To read PMD raw data
3aa0223f 2
9f35f7b3 3void AliPMDRawDataRead(Int_t iEvent)
4{
df42ab21 5 TObjArray pmdddlcont;
9f35f7b3 6
722ccc67 7 TH2F *h2 = new TH2F("h2"," ",100,-100.,100.,100,-100.,100.);
8 Float_t xx, yy;
9 Int_t xpad, ypad;
10
11 AliPMDUtility cc;
12
9f35f7b3 13 for(Int_t ievt = 0; ievt < iEvent; ievt++)
df42ab21 14 {
9f35f7b3 15 AliRawReaderFile reader(ievt);
16 AliPMDRawStream stream(&reader);
df42ab21 17
722ccc67 18 Int_t iddl = -1;
19 while ((iddl = stream.DdlData(&pmdddlcont)) >=0)
df42ab21 20 {
722ccc67 21 //cout << " inside the macro DDLNO = " << iddl << endl;
9f35f7b3 22 Int_t ientries = pmdddlcont.GetEntries();
23 for (Int_t ient = 0; ient < ientries; ient++)
24 {
25 AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
26
27 Int_t det = pmdddl->GetDetector();
28 Int_t smn = pmdddl->GetSMN();
29 //Int_t mcm = pmdddl->GetMCM();
30 //Int_t chno = pmdddl->GetChannel();
31 Int_t row = pmdddl->GetRow();
32 Int_t col = pmdddl->GetColumn();
33 Int_t sig = pmdddl->GetSignal();
722ccc67 34 //cout<<sig<<endl;
35 if(smn <12)
36 {
37 xpad = col;
38 ypad = row;
39 }
40 else if(smn >=12 && smn < 24)
41 {
42 xpad = row;
43 ypad = col;
44 }
45
46 if (det == 1)
47 {
48 // Draw only for PRE plane
49 cc.RectGeomCellPos(smn,xpad,ypad,xx,yy);
50
51 h2->Fill(xx,yy);
52 }
53
54
55
9f35f7b3 56 }
57 pmdddlcont.Clear();
58
df42ab21 59 }
3aa0223f 60
61 }
722ccc67 62
63 h2->Draw();
64}