]>
Commit | Line | Data |
---|---|---|
1 | // $Id$ | |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
3 | ||
4 | /************************************************************************** | |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
7 | * full copyright notice. * | |
8 | **************************************************************************/ | |
9 | // ---------------------------------------------------------------------- // | |
10 | void pmd_raw(Int_t mode = 0) | |
11 | { | |
12 | gStyle->SetPalette(1, 0); | |
13 | ||
14 | ||
15 | TObjArray *pmdddlcont = new TObjArray(); | |
16 | ||
17 | TString spl; | |
18 | ||
19 | TString sddl; | |
20 | TString bsddl="DDL"; | |
21 | ||
22 | Int_t ievt = 0; | |
23 | AliRawReaderRoot reader("raw.root",ievt); | |
24 | AliPMDRawStream stream(&reader); | |
25 | ||
26 | gEve->DisableRedraw(); | |
27 | ||
28 | TEveElementList* l = new TEveElementList("PMD"); | |
29 | // l->SetTitle("PMD"); | |
30 | // l->SetMainColor((Color_t)3); | |
31 | gEve->AddElement(l); | |
32 | ||
33 | Int_t NSM = 0; | |
34 | Int_t istartDDL = 0; | |
35 | Int_t iendDDL = 0; | |
36 | Int_t modnumber = 0; | |
37 | Int_t istartPlane = 0; | |
38 | Int_t iendPlane = 0; | |
39 | Float_t zpos = 0; | |
40 | ||
41 | switch(mode) | |
42 | { | |
43 | case 0: | |
44 | istartPlane = 0; | |
45 | iendPlane = 1; | |
46 | printf("--- Visualization is set for PREshower Plane ---\n"); | |
47 | break; | |
48 | ||
49 | case 1: | |
50 | istartPlane = 1; | |
51 | iendPlane = 2; | |
52 | printf("--- Visualization is set for CPV Plane ---\n"); | |
53 | break; | |
54 | ||
55 | case 2: | |
56 | istartPlane = 0; | |
57 | iendPlane = 2; | |
58 | printf("--- Visualization is set for both the Plane ---\n"); | |
59 | break; | |
60 | ||
61 | default: | |
62 | printf("--- Not set for any Plane ---\n"); | |
63 | } | |
64 | ||
65 | for (Int_t ipl = istartPlane; ipl < iendPlane; ipl++) | |
66 | { | |
67 | ||
68 | if (ipl == 0) | |
69 | { | |
70 | spl = "PRE"; | |
71 | istartDDL = 0; | |
72 | iendDDL = 4; | |
73 | zpos = 365.; | |
74 | } | |
75 | if (ipl == 1) | |
76 | { | |
77 | spl = "CPV"; | |
78 | istartDDL = 4; | |
79 | iendDDL = 6; | |
80 | zpos = 360.; | |
81 | } | |
82 | ||
83 | TEveElementList* lplane = new TEveElementList(spl.Data()); | |
84 | // l->SetMainColor((Color_t)3); | |
85 | gEve->AddElement(lplane, l); | |
86 | ||
87 | for (Int_t iddl = istartDDL; iddl < iendDDL; iddl++) | |
88 | //for (Int_t iddl = 0; iddl < 1; iddl++) | |
89 | { | |
90 | sddl = bsddl; | |
91 | sddl += iddl; | |
92 | TEveElementList* lddl = new TEveElementList(sddl.Data()); | |
93 | // l->SetMainColor((Color_t)3); | |
94 | gEve->AddElement(ddl, lplane); | |
95 | ||
96 | modnumber = iddl*6; | |
97 | ||
98 | if (iddl < 4) | |
99 | { | |
100 | NSM = 6; | |
101 | } | |
102 | else if (iddl >=4 && iddl < 6) | |
103 | { | |
104 | NSM = 12; | |
105 | } | |
106 | ||
107 | reader.Select("PMD", iddl, iddl); | |
108 | Bool_t junk = stream.DdlData(iddl,pmdddlcont); | |
109 | ||
110 | for (Int_t ism = 0; ism < NSM; ism++) | |
111 | { | |
112 | AliEvePMDModule *lmodule = new AliEvePMDModule(); | |
113 | lmodule->SetPosition(0.,0.,zpos); | |
114 | lmodule->DisplayRawData(modnumber,pmdddlcont); | |
115 | gEve->AddElement(lmodule, lddl); | |
116 | modnumber++; | |
117 | if (iddl == 4 && modnumber == 30) modnumber = 42; | |
118 | } | |
119 | ||
120 | pmdddlcont->Clear(); | |
121 | } | |
122 | } | |
123 | ||
124 | gEve->EnableRedraw(); | |
125 | } | |
126 | ||
127 | // ---------------------------------------------------------------------- // |