]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/alice-macros/pmd_raw.C
Remove trailing whitespace.
[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
ee0e160c 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;
84aff7a4 92 TEveElementList* lddl = new TEveElementList(sddl.Data());
ee0e160c 93 // l->SetMainColor((Color_t)3);
84aff7a4 94 gEve->AddElement(ddl, lplane);
ee0e160c 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++)
ee0e160c 111 {
d810d0de 112 AliEvePMDModule *lmodule = new AliEvePMDModule();
dcdad5c4 113 lmodule->SetPosition(0.,0.,zpos);
ee0e160c 114 lmodule->DisplayRawData(modnumber,pmdddlcont);
84aff7a4 115 gEve->AddElement(lmodule, lddl);
ee0e160c 116 modnumber++;
117 if (iddl == 4 && modnumber == 30) modnumber = 42;
118 }
119
120 pmdddlcont->Clear();
121 }
122 }
123
84aff7a4 124 gEve->EnableRedraw();
ee0e160c 125}
126
127// ---------------------------------------------------------------------- //