]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/pmd_raw.C
TRefArray with process ID of first element used in constructor.
[u/mrichter/AliRoot.git] / EVE / alice-macros / pmd_raw.C
CommitLineData
d810d0de 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 *
51346b82 7 * full copyright notice. *
d810d0de 8 **************************************************************************/
ee0e160c 9// ---------------------------------------------------------------------- //
dcdad5c4 10void pmd_raw(Int_t mode = 0)
ee0e160c 11{
12 gStyle->SetPalette(1, 0);
13
ee0e160c 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
84aff7a4 26 gEve->DisableRedraw();
ee0e160c 27
84aff7a4 28 TEveElementList* l = new TEveElementList("PMD");
dcdad5c4 29 // l->SetTitle("PMD");
ee0e160c 30 // l->SetMainColor((Color_t)3);
84aff7a4 31 gEve->AddElement(l);
51346b82 32
dcdad5c4 33 Int_t NSM = 0;
ee0e160c 34 Int_t istartDDL = 0;
84aff7a4 35 Int_t iendDDL = 0;
ee0e160c 36 Int_t modnumber = 0;
dcdad5c4 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;
51346b82 48
dcdad5c4 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;
51346b82 60
dcdad5c4 61 default:
62 printf("--- Not set for any Plane ---\n");
63 }
ee0e160c 64
dcdad5c4 65 for (Int_t ipl = istartPlane; ipl < iendPlane; ipl++)
ee0e160c 66 {
67
68 if (ipl == 0)
69 {
dcdad5c4 70 spl = "PRE";
ee0e160c 71 istartDDL = 0;
72 iendDDL = 4;
dcdad5c4 73 zpos = 365.;
ee0e160c 74 }
75 if (ipl == 1)
76 {
77 spl = "CPV";
78 istartDDL = 4;
79 iendDDL = 6;
dcdad5c4 80 zpos = 360.;
ee0e160c 81 }
51346b82 82
84aff7a4 83 TEveElementList* lplane = new TEveElementList(spl.Data());
ee0e160c 84 // l->SetMainColor((Color_t)3);
84aff7a4 85 gEve->AddElement(lplane, l);
51346b82 86
d22e4f00 87 Int_t iddl = -1;
88
89 while ((iddl = rawStream.DdlData(&pmdddlcont)) >=0) {
90 if (iddl >= istartDDL && iddl < iendDDL){
91 sddl = bsddl;
92 sddl += iddl;
93 TEveElementList* lddl = new TEveElementList(sddl.Data());
94 // l->SetMainColor((Color_t)3);
95 gEve->AddElement(ddl, lplane);
96
97 modnumber = iddl*6;
98
99 if (iddl < 4)
100 {
101 NSM = 6;
102 }
103 else if (iddl >=4 && iddl < 6)
104 {
105 NSM = 12;
106 }
107
108 for (Int_t ism = 0; ism < NSM; ism++)
109 {
110 AliEvePMDModule *lmodule = new AliEvePMDModule();
111 lmodule->SetPosition(0.,0.,zpos);
112 lmodule->DisplayRawData(modnumber,pmdddlcont);
113 gEve->AddElement(lmodule, lddl);
114 modnumber++;
115 if (iddl == 4 && modnumber == 30) modnumber = 42;
116 }
117
118 pmdddlcont->Clear();
119 }
120 }
121
122 gEve->EnableRedraw();
ee0e160c 123 }
d22e4f00 124
ee0e160c 125}
ee0e160c 126// ---------------------------------------------------------------------- //
d22e4f00 127