]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/pmd_raw.C
From Basanta: new files for PMD digit visualization.
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_raw.C
1 // ---------------------------------------------------------------------- //
2 void pmd_raw()
3 {
4   gStyle->SetPalette(1, 0);
5
6   gReve->DisableRedraw();
7
8   TObjArray *pmdddlcont = new TObjArray();
9
10   TString spl;
11
12   TString sddl;
13   TString bsddl="DDL";
14
15   Int_t ievt = 0;
16   AliRawReaderRoot reader("raw.root",ievt);
17   AliPMDRawStream stream(&reader);
18
19
20   Reve::RenderElementList* l = new Reve::RenderElementList("Parent Dir");
21   l->SetTitle("PMD");
22   //  l->SetMainColor((Color_t)3);
23   gReve->AddRenderElement(l);
24   
25   Int_t istartDDL = 0;
26   Int_t iendDDL    = 0;
27   Int_t modnumber = 0;
28   Int_t NSM       = 0;
29
30   for (Int_t ipl = 1; ipl < 2; ipl++)
31     {
32
33       if (ipl == 0)
34         {
35           spl = "PRE";
36           istartDDL = 0;
37           iendDDL   = 4;
38         }
39       if (ipl == 1)
40         {
41           spl = "CPV";
42           istartDDL = 4;
43           iendDDL   = 6;
44         }
45       
46       Reve::RenderElementList* lplane = new Reve::RenderElementList(spl.Data());
47       //  l->SetMainColor((Color_t)3);
48       gReve->AddRenderElement(l,lplane);
49       
50       for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++)
51       //for (Int_t iddl = 0; iddl < 1; iddl++)
52         {
53           sddl = bsddl;
54           sddl += iddl;
55           Reve::RenderElementList* lddl = new Reve::RenderElementList(sddl.Data());
56           //  l->SetMainColor((Color_t)3);
57           gReve->AddRenderElement(lplane,lddl);
58
59           modnumber = iddl*6;
60
61           if (iddl < 4)
62             {
63               NSM = 6;
64             }
65           else if (iddl >=4 && iddl < 6)
66             {
67               NSM = 12;
68             }
69
70           reader.Select("PMD", iddl, iddl);
71           Bool_t junk = stream.DdlData(iddl,pmdddlcont);
72
73           for (Int_t ism = 0; ism < NSM; ism++)
74           //for (Int_t ism = 0; ism < 1; ism++)
75             {
76               Alieve::PMDModule *lmodule = new Alieve::PMDModule();
77               lmodule->SetPosition(0.,0.,360.);
78               lmodule->DisplayRawData(modnumber,pmdddlcont);
79               gReve->AddRenderElement(lddl, lmodule);
80               modnumber++;
81               if (iddl == 4 && modnumber == 30) modnumber = 42;
82             }
83
84           pmdddlcont->Clear();
85         }
86     }
87
88
89   gReve->EnableRedraw();
90   
91   gReve->Redraw3D();
92 }
93
94 // ---------------------------------------------------------------------- //