]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PMD/AliPMDRawDataRead.C
Fix for single chain to work: spal
[u/mrichter/AliRoot.git] / PMD / AliPMDRawDataRead.C
... / ...
CommitLineData
1// To read PMD raw data
2
3void AliPMDRawDataRead(Int_t iEvent)
4{
5 TObjArray pmdddlcont;
6
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
13 for(Int_t ievt = 0; ievt < iEvent; ievt++)
14 {
15 AliRawReaderFile reader(ievt);
16 AliPMDRawStream stream(&reader);
17
18 Int_t iddl = -1;
19 while ((iddl = stream.DdlData(&pmdddlcont)) >=0)
20 {
21 //cout << " inside the macro DDLNO = " << iddl << endl;
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();
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
56 }
57 pmdddlcont.Clear();
58
59 }
60
61 }
62
63 h2->Draw();
64}