49 fMain =
new TGMainFrame(gClient->GetRoot(),10,10,kMainFrame | kVerticalFrame);
50 fMain->SetLayoutBroken(kTRUE);
51 fMain->SetWindowName(
"Qweak 2D Single Event Display");
57 fMenuBarLayout =
new TGLayoutHints(kLHintsTop, kLHintsExpandX);
58 fMenuBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft | kRaisedFrame);
59 fMenuBarHelpLayout =
new TGLayoutHints(kLHintsTop | kLHintsRight | kRaisedFrame);
61 fMenuFile =
new TGPopupMenu(gClient->GetRoot());
62 fMenuFile->AddEntry(
"&Open ROOT File", M_FILE_OPEN);
63 fMenuFile->AddSeparator();
64 fMenuFile->AddEntry(
"&Close ROOT File", M_FILE_CLOSE);
66 fMenuHelp =
new TGPopupMenu(gClient->GetRoot());
67 fMenuHelp->AddEntry(
"&Tutorial", M_HELP_TUTORIAL);
68 fMenuHelp->AddSeparator();
69 fMenuHelp->AddEntry(
"&About", M_HELP_ABOUT);
71 fMenuFile->Connect(
"Activated(Int_t)",
"QwEventDisplay",
this,
"HandleMenu(Int_t)");
72 fMenuHelp->Connect(
"Activated(Int_t)",
"QwEventDisplay",
this,
"HandleMenu(Int_t)");
74 fMenuBar =
new TGMenuBar(fMain, kLHintsTop | kLHintsExpandX);
75 fMenuBar->AddPopup(
"&File", fMenuFile, fMenuBarItemLayout);
76 fMenuBar->AddPopup(
"&Help", fMenuHelp, fMenuBarHelpLayout);
77 gClient->GetColorByName(
"#deba87", ucolor);
78 fMenuBar->SetBackgroundColor(ucolor);
80 fMain->AddFrame(fMenuBar, fMenuBarLayout);
81 fMenuBar->MoveResize(0,0,900,20);
87 gClient->GetColorByName(
"#ffffff",ucolor);
88 TGHorizontalFrame *fLogos =
new TGHorizontalFrame(fMain,900,80,kHorizontalFrame | kRaisedFrame,ucolor);
89 fLogos->SetLayoutBroken(kTRUE);
91 TGIcon *QweakLogo =
new TGIcon(fLogos,
getenv_safe_TString(
"QWANALYSIS") +
"/Extensions/Logos/qweak.jpg");
92 fLogos->AddFrame(QweakLogo,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
93 QweakLogo->MoveResize(0,1,140,77);
96 ufont = gClient->GetFont(
"-*-helvetica-bold-r-*-*-34-*-*-*-*-*-*-*");
98 valBox.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
99 gClient->GetColorByName(
"#000000",valBox.fForeground);
100 gClient->GetColorByName(
"#c0c0c0",valBox.fBackground);
101 valBox.fFillStyle = kFillSolid;
102 valBox.fFont = ufont->GetFontHandle();
103 valBox.fGraphicsExposures = kFALSE;
104 uGC = gClient->GetGC(&valBox, kTRUE);
107 gClient->GetColorByName(
"#d45954",ucolor);
108 TGLabel *TitleBox =
new TGLabel(fLogos,
"Qweak 2D Single Event Display",uGC->GetGC(),ufont->GetFontStruct(),kRaisedFrame,ucolor);
109 TitleBox->SetTextJustify(36);
110 TitleBox->SetMargins(0,0,0,0);
111 TitleBox->SetWrapLength(-1);
112 fLogos->AddFrame(TitleBox,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
113 TitleBox->MoveResize(143,1,627,77);
116 TGIcon *GWULogo =
new TGIcon(fLogos,
getenv_safe_TString(
"QWANALYSIS") +
"/Extensions/Logos/gwu_logo_main.gif");
117 fLogos->AddFrame(GWULogo,
new TGLayoutHints(kLHintsNormal));
118 GWULogo->MoveResize(772,1,135,77);
121 fMain->AddFrame(fLogos,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
122 fLogos->MoveResize(0,20,900,100);
128 gClient->GetColorByName(
"#0047ab",ucolor);
129 fEventBoxes =
new TGHorizontalFrame(fMain,900,240,kHorizontalFrame,ucolor);
130 fEventBoxes->SetLayoutBroken(kTRUE);
135 gClient->GetColorByName(
"#d4cf87",ucolor);
136 fEventBox1 =
new TGVerticalFrame(fEventBoxes,220,226,kVerticalFrame | kRaisedFrame,ucolor);
137 fEventBox1->SetLayoutBroken(kTRUE);
140 gClient->GetColorByName(
"#deba87", ucolor);
141 ufont = gClient->GetFont(
"-*-charter-bold-r-*-*-15-*-*-*-*-*-*-*");
142 GCValues_t valunterLabel;
143 valunterLabel.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
144 gClient->GetColorByName(
"#000000",valunterLabel.fForeground);
145 gClient->GetColorByName(
"#c0c0c0",valunterLabel.fBackground);
146 valunterLabel.fFillStyle = kFillSolid;
147 valunterLabel.fFont = ufont->GetFontHandle();
148 valunterLabel.fGraphicsExposures = kFALSE;
149 uGC = gClient->GetGC(&valunterLabel, kTRUE);
152 TGLabel *EventCounterLabel =
new TGLabel(fEventBox1,
"Event Counter",uGC->GetGC(),ufont->GetFontStruct(),kSunkenFrame,ucolor);
153 EventCounterLabel->SetTextJustify(36);
154 EventCounterLabel->SetMargins(0,0,0,0);
155 EventCounterLabel->SetWrapLength(-1);
156 fEventBox1->AddFrame(EventCounterLabel,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
157 EventCounterLabel->MoveResize(45,6,125,20);
158 EventCounterLabel->SetBackgroundColor(ucolor);
161 gClient->GetColorByName(
"#507ba7", ucolor);
162 fEventCounter =
new TGVerticalFrame(fEventBox1,144,176,kVerticalFrame | kSunkenFrame, ucolor);
163 fEventCounter->SetLayoutBroken(kTRUE);
166 ufont = gClient->GetFont(
"-*-courier-bold-r-*-*-12-*-*-*-*-*-*-*");
167 GCValues_t valentHit;
168 valentHit.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
169 gClient->GetColorByName(
"#000000",valentHit.fForeground);
170 gClient->GetColorByName(
"#c0c0c0",valentHit.fBackground);
171 valentHit.fFillStyle = kFillSolid;
172 valentHit.fFont = ufont->GetFontHandle();
173 valentHit.fGraphicsExposures = kFALSE;
174 uGC = gClient->GetGC(&valentHit, kTRUE);
177 fCurrentEvent =
new TGGroupFrame(fEventCounter,
"Current Event",kVerticalFrame,uGC->GetGC(),ufont->GetFontStruct(),ucolor);
178 fCurrentEvent->SetLayoutBroken(kTRUE);
181 ufont = gClient->GetFont(
"-*-charter-bold-r-*-*-33-*-*-*-*-*-*-*");
182 GCValues_t valntHitLabel;
183 valntHitLabel.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
184 gClient->GetColorByName(
"#000000",valntHitLabel.fForeground);
185 gClient->GetColorByName(
"#c0c0c0",valntHitLabel.fBackground);
186 valntHitLabel.fFillStyle = kFillSolid;
187 valntHitLabel.fFont = ufont->GetFontHandle();
188 valntHitLabel.fGraphicsExposures = kFALSE;
189 uGC = gClient->GetGC(&valntHitLabel, kTRUE);
190 gClient->GetColorByName(
"#fff897",ucolor);
193 fCurrentEventLabel =
new TGLabel(fCurrentEvent, Form(
"%u", (Int_t) fEventNumber), uGC->GetGC(),ufont->GetFontStruct(),ucolor);
194 fCurrentEventLabel->SetTextJustify(36);
195 fCurrentEventLabel->SetMargins(0,0,0,0);
196 fCurrentEventLabel->SetWrapLength(-1);
197 fCurrentEventLabel->MoveResize(11,18,104,32);
198 fCurrentEventLabel->SetBackgroundColor(ucolor);
201 fCurrentEvent->AddFrame(fCurrentEventLabel,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
202 fCurrentEvent->SetLayoutManager(
new TGVerticalLayout(fCurrentEvent));
205 fEventCounter->AddFrame(fCurrentEvent,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
206 fCurrentEvent->MoveResize(8,8,126,64);
209 ufont = gClient->GetFont(
"-*-helvetica-bold-r-*-*-11-*-*-*-*-*-*-*");
210 GCValues_t valitButton;
211 valitButton.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
212 gClient->GetColorByName(
"#000000",valitButton.fForeground);
213 gClient->GetColorByName(
"#c0c0c0",valitButton.fBackground);
214 valitButton.fFillStyle = kFillSolid;
215 valitButton.fFont = ufont->GetFontHandle();
216 valitButton.fGraphicsExposures = kFALSE;
217 uGC = gClient->GetGC(&valitButton, kTRUE);
220 gClient->GetColorByName(
"#d4cf87",ucolor);
221 TGTextButton *GotoEventButton =
new TGTextButton(fEventCounter,
"&Goto Event",-1,uGC->GetGC(),ufont->GetFontStruct());
222 GotoEventButton->Connect(
"Clicked()",
"QwEventDisplay",
this,
"GotoEvent()");
223 GotoEventButton->SetTextJustify(36);
224 GotoEventButton->SetMargins(0,0,0,0);
225 GotoEventButton->SetWrapLength(-1);
226 GotoEventButton->Resize(67,24);
227 GotoEventButton->ChangeBackground(ucolor);
230 fEventCounter->AddFrame(GotoEventButton,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
231 GotoEventButton->MoveResize(64,133,67,24);
234 fCurrentEventEntry =
new TGNumberEntry(fEventCounter, (Double_t) 0,11,-1,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
235 fEventCounter->AddFrame(fCurrentEventEntry,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
236 fCurrentEventEntry->MoveResize(24,94,96,22);
239 fEventBox1->AddFrame(fEventCounter,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
240 fEventCounter->MoveResize(35,32,144,180);
243 fEventBoxes->AddFrame(fEventBox1,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
244 fEventBox1->MoveResize(3,6,220,226);
249 gClient->GetColorByName(
"#d4cf87",ucolor);
250 fEventBox2 =
new TGVerticalFrame(fEventBoxes,220,226,kVerticalFrame | kRaisedFrame,ucolor);
251 fEventBox2->SetLayoutBroken(kTRUE);
254 fWireInfoListBox =
new TGListBox(fEventBox2);
255 fWireInfoListBox->Resize(200,180);
256 fEventBox2->AddFrame(fWireInfoListBox,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
257 fWireInfoListBox->MoveResize(8,32,428,180);
258 ufont = gClient->GetFont(
"-*-charter-bold-r-*-*-15-*-*-*-*-*-*-*");
261 GCValues_t valitsLabel;
262 valitsLabel.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
263 gClient->GetColorByName(
"#000000",valitsLabel.fForeground);
264 gClient->GetColorByName(
"#c0c0c0",valitsLabel.fBackground);
265 valitsLabel.fFillStyle = kFillSolid;
266 valitsLabel.fFont = ufont->GetFontHandle();
267 valitsLabel.fGraphicsExposures = kFALSE;
268 uGC = gClient->GetGC(&valitsLabel, kTRUE);
269 gClient->GetColorByName(
"#deba87", ucolor);
272 TGLabel *fWireInfoLabel =
new TGLabel(fEventBox2,
"Wire Hit Information",uGC->GetGC(),ufont->GetFontStruct(),kSunkenFrame,ucolor);
273 fWireInfoLabel->SetTextJustify(36);
274 fWireInfoLabel->SetMargins(0,0,0,0);
275 fWireInfoLabel->SetWrapLength(-1);
276 fWireInfoLabel->MoveResize(129,6,196,20);
277 fWireInfoLabel->SetBackgroundColor(ucolor);
278 fEventBox2->AddFrame(fWireInfoLabel,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
281 fEventBoxes->AddFrame(fEventBox2,
new TGLayoutHints(kLHintsNormal));
282 fEventBox2->MoveResize(227,6,444,226);
287 gClient->GetColorByName(
"#d4cf87",ucolor);
288 fEventBox3 =
new TGVerticalFrame(fEventBoxes,220,226,kVerticalFrame | kRaisedFrame,ucolor);
289 fEventBox3->SetLayoutBroken(kTRUE);
292 ufont = gClient->GetFont(
"-*-charter-bold-r-*-*-15-*-*-*-*-*-*-*");
293 GCValues_t valInfoLabel;
294 valInfoLabel.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
295 gClient->GetColorByName(
"#000000",valInfoLabel.fForeground);
296 gClient->GetColorByName(
"#c0c0c0",valInfoLabel.fBackground);
297 valInfoLabel.fFillStyle = kFillSolid;
298 valInfoLabel.fFont = ufont->GetFontHandle();
299 valInfoLabel.fGraphicsExposures = kFALSE;
300 uGC = gClient->GetGC(&valInfoLabel, kTRUE);
301 gClient->GetColorByName(
"#deba87", ucolor);
304 TGLabel *fOctantLabel =
new TGLabel(fEventBox3,
"Octant Identification",uGC->GetGC(),ufont->GetFontStruct(),kSunkenFrame,ucolor);
305 fOctantLabel->SetTextJustify(36);
306 fOctantLabel->SetMargins(0,0,0,0);
307 fOctantLabel->SetWrapLength(-1);
308 fOctantLabel->MoveResize(25,6,175,20);
309 fOctantLabel->SetBackgroundColor(ucolor);
310 fEventBox3->AddFrame(fOctantLabel,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
313 fOctantID =
new TRootEmbeddedCanvas(0, fEventBox3, 200, 180);
314 Int_t wOctantID = fOctantID->GetCanvasWindowId();
315 cOctantID =
new TCanvas(
"cOctantID", 10, 10, wOctantID);
316 fOctantID->AdoptCanvas(cOctantID);
317 fEventBox3->AddFrame(fOctantID,
new TGLayoutHints(kVerticalFrame | kSunkenFrame));
318 fOctantID->MoveResize(22,32,180,180);
319 fOctantID->GetCanvas()->SetFillColor(kAzure-7);
320 Octant_1 =
new TPaveLabel(.4,.75,.6,.95,
"3");
321 Octant_1->SetLineColor(1);
322 Octant_1->SetFillColor(0);
324 Octant_2 =
new TPaveLabel(.675,.675,.875,.875,
"4");
325 Octant_2->SetLineColor(1);
326 Octant_2->SetFillColor(0);
328 Octant_3 =
new TPaveLabel(.75,.4,.95,.6,
"5");
329 Octant_3->SetLineColor(1);
330 Octant_3->SetFillColor(0);
332 Octant_4 =
new TPaveLabel(.675,.125,.875,.325,
"6");
333 Octant_4->SetLineColor(1);
334 Octant_4->SetFillColor(0);
336 Octant_5 =
new TPaveLabel(.4,.05,.6,.25,
"7");
337 Octant_5->SetLineColor(1);
338 Octant_5->SetFillColor(0);
340 Octant_6 =
new TPaveLabel(.125,.125,.325,.325,
"8");
341 Octant_6->SetLineColor(1);
342 Octant_6->SetFillColor(0);
344 Octant_7 =
new TPaveLabel(.05,.4,.25,.6,
"1");
345 Octant_7->SetLineColor(1);
346 Octant_7->SetFillColor(0);
348 Octant_8 =
new TPaveLabel(.125,.675,.325,.875,
"2");
349 Octant_8->SetLineColor(1);
350 Octant_8->SetFillColor(0);
352 fOctantID->GetCanvas()->SetEditable(kFALSE);
355 fEventBoxes->AddFrame(fEventBox3,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
356 fEventBox3->MoveResize(675,6,222,226);
359 fMain->AddFrame(fEventBoxes,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
360 fEventBoxes->MoveResize(0,100,900,260);
366 ufont = gClient->GetFont(
"-*-charter-bold-r-*-*-15-*-*-*-*-*-*-*");
368 valTabs.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
369 gClient->GetColorByName(
"#000000",valTabs.fForeground);
370 gClient->GetColorByName(
"#c0c0c0",valTabs.fBackground);
371 valTabs.fFillStyle = kFillSolid;
372 valTabs.fFont = ufont->GetFontHandle();
373 valTabs.fGraphicsExposures = kFALSE;
374 uGC = gClient->GetGC(&valTabs, kTRUE);
375 gClient->GetColorByName(
"#0047ab",ucolor);
378 fRegions =
new TGTab(fMain,900,312,uGC->GetGC(),ufont->GetFontStruct(),kChildFrame,ucolor);
379 gClient->GetColorByName(
"#d4cf87",ucolor);
384 fRegion1 = fRegions->AddTab(
"Region 1--GEM");
385 fRegion1->SetLayoutManager(
new TGMatrixLayout(fRegion1,0,1,0,0));
386 fRegion1->SetLayoutBroken(kTRUE);
387 fRegion1->SetBackgroundColor(ucolor);
390 fRegion1XY =
new TRootEmbeddedCanvas(0,fRegion1,280,280);
391 Int_t wRegion1XY = fRegion1XY->GetCanvasWindowId();
392 cR1XY =
new TCanvas(
"cR1XY", 10, 10, wRegion1XY);
393 fRegion1XY->AdoptCanvas(cR1XY);
394 fRegion1->AddFrame(fRegion1XY,
new TGLayoutHints(kLHintsNormal));
395 fRegion1XY->MoveResize(12,4,280,280);
396 fRegion1XY->GetCanvas()->SetFillColor(0);
397 Label_R1XY =
new TPaveLabel(.03,.94,.97,.99,
"Front View (X-Y Projection)");
400 Box_R1XY->SetLineColor(1);
401 Box_R1XY->SetFillStyle(0);
403 fRegion1XY->GetCanvas()->SetEditable(kFALSE);
406 fRegion1YZ =
new TRootEmbeddedCanvas(0,fRegion1,280,280);
407 Int_t wRegion1YZ = fRegion1YZ->GetCanvasWindowId();
408 cR1YZ =
new TCanvas(
"cR1YZ", 10, 10, wRegion1YZ);
409 fRegion1YZ->AdoptCanvas(cR1YZ);
410 fRegion1->AddFrame(fRegion1YZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
411 fRegion1YZ->MoveResize(306,4,280,280);
412 fRegion1YZ->GetCanvas()->SetFillColor(0);
413 Label_R1YZ =
new TPaveLabel(.03,.94,.97,.99,
"Top View (Y-Z Projection)");
416 Box_R1YZ->SetLineColor(1);
417 Box_R1YZ->SetFillStyle(0);
419 fRegion1YZ->GetCanvas()->SetEditable(kFALSE);
422 fRegion1XZ =
new TRootEmbeddedCanvas(0,fRegion1,280,280);
423 Int_t wRegion1XZ = fRegion1XZ->GetCanvasWindowId();
424 cR1XZ =
new TCanvas(
"cR1XZ", 10, 10, wRegion1XZ);
425 fRegion1XZ->AdoptCanvas(cR1XZ);
426 fRegion1->AddFrame(fRegion1XZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
427 fRegion1XZ->MoveResize(603,4,280,280);
428 fRegion1XZ->GetCanvas()->SetFillColor(0);
429 Label_R1XZ =
new TPaveLabel(.03,.94,.97,.99,
"Side View (X-Z Projection)");
432 Box_R1XZ->SetLineColor(1);
433 Box_R1XZ->SetFillStyle(0);
435 fRegion1XZ->GetCanvas()->SetEditable(kFALSE);
440 fRegion2 = fRegions->AddTab(
"Region 2--HDC (1-4)");
441 fRegion2->SetLayoutManager(
new TGVerticalLayout(fRegion2));
442 fRegion2->SetLayoutBroken(kTRUE);
443 fRegion2->SetBackgroundColor(ucolor);
446 fRegion2XY =
new TRootEmbeddedCanvas(0,fRegion2,280,280);
447 Int_t wRegion2XY = fRegion2XY->GetCanvasWindowId();
448 cR2XY =
new TCanvas(
"cR2XY", 10, 10, wRegion2XY);
449 fRegion2XY->AdoptCanvas(cR2XY);
450 fRegion2->AddFrame(fRegion2XY,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
451 fRegion2XY->MoveResize(12,4,280,280);
452 fRegion2XY->GetCanvas()->SetFillColor(0);
453 Label_R2XY =
new TPaveLabel(.03,.94,.97,.99,
"Front View (X-Y Projection)");
456 Box_R2XY->SetLineColor(1);
457 Box_R2XY->SetFillStyle(0);
459 fRegion2XY->GetCanvas()->SetEditable(kFALSE);
462 fRegion2YZ =
new TRootEmbeddedCanvas(0,fRegion2,280,280);
463 Int_t wRegion2YZ = fRegion2YZ->GetCanvasWindowId();
464 cR2YZ =
new TCanvas(
"cR2YZ", 10, 10, wRegion2YZ);
465 fRegion2YZ->AdoptCanvas(cR2YZ);
466 fRegion2->AddFrame(fRegion2YZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
467 fRegion2YZ->MoveResize(306,4,280,280);
468 fRegion2YZ->GetCanvas()->SetFillColor(0);
469 Label_R2YZ =
new TPaveLabel(.03,.94,.97,.99,
"Top View (Y-Z Projection)");
472 Box_R2YZ1->SetLineColor(1);
473 Box_R2YZ1->SetFillStyle(0);
476 Box_R2YZ2->SetLineColor(7);
477 Box_R2YZ2->SetFillStyle(0);
480 Box_R2YZ3->SetLineColor(6);
481 Box_R2YZ3->SetFillStyle(0);
484 Box_R2YZ4->SetLineColor(8);
485 Box_R2YZ4->SetFillStyle(0);
487 tR2XY1 =
new TText(.03, .03,
"Cham. 1");
488 tR2XY1->SetTextColor(1);
490 tR2XY2 =
new TText(.29, .03,
"Cham. 2");
491 tR2XY2->SetTextColor(7);
493 tR2XY3 =
new TText(.55, .03,
"Cham. 3");
494 tR2XY3->SetTextColor(6);
496 tR2XY4 =
new TText(.81, .03,
"Cham. 4");
497 tR2XY4->SetTextColor(8);
499 fRegion2YZ->GetCanvas()->SetEditable(kFALSE);
502 fRegion2XZ =
new TRootEmbeddedCanvas(0,fRegion2,280,280);
503 Int_t wRegion2XZ = fRegion2XZ->GetCanvasWindowId();
504 cR2XZ =
new TCanvas(
"cR2XZ",10, 10, wRegion2XZ);
505 fRegion2XZ->AdoptCanvas(cR2XZ);
506 fRegion2->AddFrame(fRegion2XZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
507 fRegion2XZ->MoveResize(603,4,280,280);
508 fRegion2XZ->GetCanvas()->SetFillColor(0);
509 Label_R2XZ =
new TPaveLabel(.03,.94,.97,.99,
"Side View (X-Z Projection)");
512 Box_R2XZ1->SetLineColor(8);
513 Box_R2XZ1->SetFillStyle(0);
516 Box_R2XZ2->SetLineColor(6);
517 Box_R2XZ2->SetFillStyle(0);
520 Box_R2XZ3->SetLineColor(7);
521 Box_R2XZ3->SetFillStyle(0);
524 Box_R2XZ4->SetLineColor(1);
525 Box_R2XZ4->SetFillStyle(0);
527 tR2XZ1 =
new TText(.03, .03,
"Cham. 1");
528 tR2XZ1->SetTextColor(1);
530 tR2XZ2 =
new TText(.29, .03,
"Cham. 2");
531 tR2XZ2->SetTextColor(7);
533 tR2XZ3 =
new TText(.55, .03,
"Cham. 3");
534 tR2XZ3->SetTextColor(6);
536 tR2XZ4 =
new TText(.81, .03,
"Cham. 4");
537 tR2XZ4->SetTextColor(8);
539 fRegion2XZ->GetCanvas()->SetEditable(kFALSE);
544 fRegion2b = fRegions->AddTab(
"Region 2--HDC (5-8)");
545 fRegion2b->SetLayoutManager(
new TGVerticalLayout(fRegion2));
546 fRegion2b->SetLayoutBroken(kTRUE);
547 fRegion2b->SetBackgroundColor(ucolor);
550 fRegion2bXY =
new TRootEmbeddedCanvas(0,fRegion2b,280,280);
551 Int_t wRegion2bXY = fRegion2bXY->GetCanvasWindowId();
552 cR2bXY =
new TCanvas(
"cR2bXY", 10, 10, wRegion2bXY);
553 fRegion2bXY->AdoptCanvas(cR2bXY);
554 fRegion2b->AddFrame(fRegion2bXY,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
555 fRegion2bXY->MoveResize(12,4,280,280);
556 fRegion2bXY->GetCanvas()->SetFillColor(0);
557 Label_R2bXY =
new TPaveLabel(.03,.94,.97,.99,
"Front View (X-Y Projection)");
560 Box_R2bXY->SetLineColor(1);
561 Box_R2bXY->SetFillStyle(0);
563 fRegion2bXY->GetCanvas()->SetEditable(kFALSE);
566 fRegion2bYZ =
new TRootEmbeddedCanvas(0,fRegion2b,280,280);
567 Int_t wRegion2bYZ = fRegion2bYZ->GetCanvasWindowId();
568 cR2bYZ =
new TCanvas(
"cR2bYZ", 10, 10, wRegion2bYZ);
569 fRegion2bYZ->AdoptCanvas(cR2bYZ);
570 fRegion2b->AddFrame(fRegion2bYZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
571 fRegion2bYZ->MoveResize(306,4,280,280);
572 fRegion2bYZ->GetCanvas()->SetFillColor(0);
573 Label_R2bYZ =
new TPaveLabel(.03,.94,.97,.99,
"Top View (Y-Z Projection)");
576 Box_R2bYZ1->SetLineColor(1);
577 Box_R2bYZ1->SetFillStyle(0);
580 Box_R2bYZ2->SetLineColor(7);
581 Box_R2bYZ2->SetFillStyle(0);
584 Box_R2bYZ3->SetLineColor(6);
585 Box_R2bYZ3->SetFillStyle(0);
588 Box_R2bYZ4->SetLineColor(8);
589 Box_R2bYZ4->SetFillStyle(0);
591 tR2bXY1 =
new TText(.03, .03,
"Cham. 5");
592 tR2bXY1->SetTextColor(1);
594 tR2bXY2 =
new TText(.29, .03,
"Cham. 6");
595 tR2bXY2->SetTextColor(7);
597 tR2bXY3 =
new TText(.55, .03,
"Cham. 7");
598 tR2bXY3->SetTextColor(6);
600 tR2bXY4 =
new TText(.81, .03,
"Cham. 8");
601 tR2bXY4->SetTextColor(8);
603 fRegion2bYZ->GetCanvas()->SetEditable(kFALSE);
606 fRegion2bXZ =
new TRootEmbeddedCanvas(0,fRegion2b,280,280);
607 Int_t wRegion2bXZ = fRegion2bXZ->GetCanvasWindowId();
608 cR2bXZ =
new TCanvas(
"cR2bXZ",10, 10, wRegion2bXZ);
609 fRegion2bXZ->AdoptCanvas(cR2bXZ);
610 fRegion2b->AddFrame(fRegion2bXZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
611 fRegion2bXZ->MoveResize(603,4,280,280);
612 fRegion2bXZ->GetCanvas()->SetFillColor(0);
613 Label_R2bXZ =
new TPaveLabel(.03,.94,.97,.99,
"Side View (X-Z Projection)");
616 Box_R2bXZ1->SetLineColor(8);
617 Box_R2bXZ1->SetFillStyle(0);
620 Box_R2bXZ2->SetLineColor(6);
621 Box_R2bXZ2->SetFillStyle(0);
624 Box_R2bXZ3->SetLineColor(7);
625 Box_R2bXZ3->SetFillStyle(0);
628 Box_R2bXZ4->SetLineColor(1);
629 Box_R2bXZ4->SetFillStyle(0);
631 tR2bXZ1 =
new TText(.03, .03,
"Cham. 5");
632 tR2bXZ1->SetTextColor(1);
634 tR2bXZ2 =
new TText(.29, .03,
"Cham. 6");
635 tR2bXZ2->SetTextColor(7);
637 tR2bXZ3 =
new TText(.55, .03,
"Cham. 7");
638 tR2bXZ3->SetTextColor(6);
640 tR2bXZ4 =
new TText(.81, .03,
"Cham. 8");
641 tR2bXZ4->SetTextColor(8);
643 fRegion2bXZ->GetCanvas()->SetEditable(kFALSE);
648 fRegion3 = fRegions->AddTab(
"Region 3--VDC");
649 fRegion3->SetLayoutManager(
new TGVerticalLayout(fRegion3));
650 fRegion3->SetLayoutBroken(kTRUE);
651 fRegion3->SetBackgroundColor(ucolor);
654 fRegion3XY =
new TRootEmbeddedCanvas(0,fRegion3,280,280);
655 Int_t wRegion3XY = fRegion3XY->GetCanvasWindowId();
656 cR3XY =
new TCanvas(
"cR3XY", 10, 10, wRegion3XY);
657 fRegion3XY->AdoptCanvas(cR3XY);
658 fRegion3->AddFrame(fRegion3XY,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
659 fRegion3XY->MoveResize(12,4,280,280);
660 fRegion3XY->GetCanvas()->SetFillColor(0);
661 Label_R3XY =
new TPaveLabel(.03,.94,.97,.99,
"Front View (Normal to Tilt Angle)");
664 Box_R3XY1->SetLineColor(1);
665 Box_R3XY1->SetFillStyle(0);
667 Box_R3XY2->SetLineColor(7);
668 Box_R3XY2->SetFillStyle(0);
672 Box_R3XY3->SetLineColor(6);
673 Box_R3XY3->SetFillStyle(0);
675 Box_R3XY4->SetLineColor(8);
676 Box_R3XY4->SetFillStyle(0);
679 tR3XY1 =
new TText(.03, .03,
"Leia (1)");
680 tR3XY1->SetTextColor(1);
682 tR3XY2 =
new TText(.28, .03,
"Vader (2)");
683 tR3XY2->SetTextColor(7);
685 tR3XY3 =
new TText(.55, .03,
"Han (3)");
686 tR3XY3->SetTextColor(6);
688 tR3XY4 =
new TText(.81, .03,
"Yoda (4)");
689 tR3XY4->SetTextColor(8);
691 Div_R3XY =
new TLine(0,.5,1,.5);
692 Div_R3XY->SetLineStyle(2);
694 fRegion3XY->GetCanvas()->SetEditable(kFALSE);
697 fRegion3YZ =
new TRootEmbeddedCanvas(0,fRegion3,280,280);
698 Int_t wRegion3YZ = fRegion3YZ->GetCanvasWindowId();
699 cR3YZ =
new TCanvas(
"cR3YZ", 10, 10, wRegion3YZ);
700 fRegion3YZ->AdoptCanvas(cR3YZ);
701 fRegion3->AddFrame(fRegion3YZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
702 fRegion3YZ->MoveResize(306,4,280,280);
703 fRegion3YZ->GetCanvas()->SetFillColor(0);
704 Label_R3YZ =
new TPaveLabel(.03,.94,.97,.99,
"Top View (Oriented to Tilt Angle)");
707 Box_R3YZ1->SetLineColor(1);
708 Box_R3YZ1->SetFillStyle(0);
710 Box_R3YZ2->SetLineColor(7);
711 Box_R3YZ2->SetFillStyle(0);
715 Box_R3YZ3->SetLineColor(6);
716 Box_R3YZ3->SetFillStyle(0);
718 Box_R3YZ4->SetLineColor(8);
719 Box_R3YZ4->SetFillStyle(0);
722 tR3YZ1 =
new TText(.03, .03,
"Leia (1)");
723 tR3YZ1->SetTextColor(1);
725 tR3YZ2 =
new TText(.28, .03,
"Vader (2)");
726 tR3YZ2->SetTextColor(7);
728 tR3YZ3 =
new TText(.55, .03,
"Han (3)");
729 tR3YZ3->SetTextColor(6);
731 tR3YZ4 =
new TText(.81, .03,
"Yoda (4)");
732 tR3YZ4->SetTextColor(8);
734 Div_R3YZ =
new TLine(0,.5,1,.5);
735 Div_R3YZ->SetLineStyle(2);
737 fRegion3YZ->GetCanvas()->SetEditable(kFALSE);
740 fRegion3XZ =
new TRootEmbeddedCanvas(0,fRegion3,280,280);
741 Int_t wRegion3XZ = fRegion3XZ->GetCanvasWindowId();
742 cR3XZ =
new TCanvas(
"cR3XZ", 10, 10, wRegion3XZ);
743 fRegion3XZ->AdoptCanvas(cR3XZ);
744 fRegion3->AddFrame(fRegion3XZ,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
745 fRegion3XZ->MoveResize(603,4,280,280);
746 fRegion3XZ->GetCanvas()->SetFillColor(0);
747 Label_R3XZ =
new TPaveLabel(.03,.94,.97,.99,
"Side View (Rotated to Tilt Angle)");
750 Box_R3XZ1->SetLineColor(1);
751 Box_R3XZ1->SetFillStyle(0);
753 Box_R3XZ2->SetLineColor(7);
754 Box_R3XZ2->SetFillStyle(0);
758 Box_R3XZ3->SetLineColor(6);
759 Box_R3XZ3->SetFillStyle(0);
761 Box_R3XZ4->SetLineColor(8);
762 Box_R3XZ4->SetFillStyle(0);
765 tR3XZ1 =
new TText(.03, .03,
"Leia (1)");
766 tR3XZ1->SetTextColor(1);
768 tR3XZ2 =
new TText(.28, .03,
"Vader (2)");
769 tR3XZ2->SetTextColor(7);
771 tR3XZ3 =
new TText(.55, .03,
"Han (3)");
772 tR3XZ3->SetTextColor(6);
774 tR3XZ4 =
new TText(.81, .03,
"Yoda (4)");
775 tR3XZ4->SetTextColor(8);
777 Div_R3XZ =
new TLine(0,.5,1,.5);
778 Div_R3XZ->SetLineStyle(2);
780 fRegion3XZ->GetCanvas()->SetEditable(kFALSE);
785 fRegion3TS = fRegions->AddTab(
"Region 3--TS");
786 fRegion3TS->SetLayoutManager(
new TGVerticalLayout(fRegion3TS));
787 fRegion3TS->SetLayoutBroken(kTRUE);
788 fRegion3TS->SetBackgroundColor(ucolor);
792 fRegions->Resize(fRegions->GetDefaultSize());
793 fMain->AddFrame(fRegions,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
794 fRegions->MoveResize(0,340,900,332);
795 gClient->GetColorByName(
"#deba87", ucolor);
796 fRegions->GetTabTab(
"Region 1--GEM")->SetBackgroundColor(ucolor);
797 fRegions->GetTabTab(
"Region 2--HDC (1-4)")->SetBackgroundColor(ucolor);
798 fRegions->GetTabTab(
"Region 2--HDC (5-8)")->SetBackgroundColor(ucolor);
799 fRegions->GetTabTab(
"Region 3--VDC")->SetBackgroundColor(ucolor);
800 fRegions->GetTabTab(
"Region 3--TS")->SetBackgroundColor(ucolor);
806 gClient->GetColorByName(
"#0047ab",ucolor);
807 TGHorizontalFrame *fButtons =
new TGHorizontalFrame(fMain,900,60,kHorizontalFrame,ucolor);
808 fButtons->SetLayoutBroken(kTRUE);
809 ufont = gClient->GetFont(
"-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*");
810 gClient->GetColorByName(
"#d4cf87",ucolor);
814 valutton.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
815 gClient->GetColorByName(
"#000000",valutton.fForeground);
816 gClient->GetColorByName(
"#c0c0c0",valutton.fBackground);
817 valutton.fFillStyle = kFillSolid;
818 valutton.fFont = ufont->GetFontHandle();
819 valutton.fGraphicsExposures = kFALSE;
820 uGC = gClient->GetGC(&valutton, kTRUE);
822 ExitButton =
new TGTextButton(fButtons,
"E&xit",
"gApplication->Terminate(0)");
823 ExitButton->SetFont(ufont->GetFontStruct());
824 ExitButton->SetTextJustify(36);
825 ExitButton->SetMargins(0,0,0,0);
826 ExitButton->SetWrapLength(-1);
827 ExitButton->Resize(100,50);
828 ExitButton->ChangeBackground(ucolor);
830 fButtons->AddFrame(ExitButton,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
831 ExitButton->MoveResize(784,6,100,50);
834 GCValues_t valousButton;
835 valousButton.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
836 gClient->GetColorByName(
"#000000",valousButton.fForeground);
837 gClient->GetColorByName(
"#c0c0c0",valousButton.fBackground);
838 valousButton.fFillStyle = kFillSolid;
839 valousButton.fFont = ufont->GetFontHandle();
840 valousButton.fGraphicsExposures = kFALSE;
841 uGC = gClient->GetGC(&valousButton, kTRUE);
843 TGTextButton *PreviousButton =
new TGTextButton(fButtons,
"&Previous Event",-1,uGC->GetGC(),ufont->GetFontStruct());
844 PreviousButton->Connect(
"Clicked()",
"QwEventDisplay",
this,
"GoPrevious()");
845 PreviousButton->SetTextJustify(36);
846 PreviousButton->SetMargins(0,0,0,0);
847 PreviousButton->SetWrapLength(-1);
848 PreviousButton->Resize(100,50);
849 PreviousButton->ChangeBackground(ucolor);
851 fButtons->AddFrame(PreviousButton,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
852 PreviousButton->MoveResize(12,6,100,50);
856 valutton.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
857 gClient->GetColorByName(
"#000000",valutton.fForeground);
858 gClient->GetColorByName(
"#c0c0c0",valutton.fBackground);
859 valutton.fFillStyle = kFillSolid;
860 valutton.fFont = ufont->GetFontHandle();
861 valutton.fGraphicsExposures = kFALSE;
862 uGC = gClient->GetGC(&valutton, kTRUE);
864 TGTextButton *NextButton =
new TGTextButton(fButtons,
"&Next Event",-1,uGC->GetGC(),ufont->GetFontStruct());
865 NextButton->Connect(
"Clicked()",
"QwEventDisplay",
this,
"GoNext()");
866 NextButton->SetTextJustify(36);
867 NextButton->SetMargins(0,0,0,0);
868 NextButton->SetWrapLength(-1);
869 NextButton->Resize(100,50);
870 NextButton->ChangeBackground(ucolor);
872 fButtons->AddFrame(NextButton,
new TGLayoutHints(kLHintsNormal));
873 NextButton->MoveResize(125,6,100,50);
876 fMain->AddFrame(fButtons,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
877 fButtons->MoveResize(0,652,900,80);
883 TRootEmbeddedCanvas *fKey =
new TRootEmbeddedCanvas(0,fButtons,280,280);
884 Int_t wKey = fKey->GetCanvasWindowId();
885 TCanvas *cKey =
new TCanvas(
"cKey", 10, 10, wKey);
886 fKey->AdoptCanvas(cKey);
887 fButtons->AddFrame(fKey,
new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
888 fKey->MoveResize(245,6,515,50);
890 fKey->GetCanvas()->cd();
891 fKey->GetCanvas()->SetFillColor(0);
892 TPaveLabel *Label_KeyX =
new TPaveLabel(.01,.05,.24,.95,
" X");
893 Label_KeyX->SetTextAlign(12);
894 Label_KeyX->SetTextColor(
kRed);
895 Label_KeyX->SetShadowColor(0);
897 TLine *Line_KeyX =
new TLine(.1,.5,.2,.5);
898 Line_KeyX->SetLineColor(
kRed);
900 TPaveLabel *Label_KeyY =
new TPaveLabel(.25,.05,.49,.95,
" Y");
901 Label_KeyY->SetTextAlign(12);
902 Label_KeyY->SetTextColor(kViolet);
903 Label_KeyY->SetShadowColor(0);
905 TLine *Line_KeyY =
new TLine(.4,.1,.4,.9);
906 Line_KeyY->SetLineColor(kViolet);
908 TPaveLabel *Label_KeyU =
new TPaveLabel(.5,.05,.74,.95,
" U");
909 Label_KeyU->SetTextAlign(12);
910 Label_KeyU->SetTextColor(
kGreen);
911 Label_KeyU->SetShadowColor(0);
913 TLine *Line_KeyU =
new TLine(.59,.1,.7,.9);
914 Line_KeyU->SetLineColor(
kGreen);
916 TPaveLabel *Label_KeyV =
new TPaveLabel(.75,.05,.99,.95,
" V");
917 Label_KeyV->SetTextAlign(12);
918 Label_KeyV->SetTextColor(
kBlue);
919 Label_KeyV->SetShadowColor(0);
921 TLine *Line_KeyV =
new TLine(.84,.9,.95,.1);
922 Line_KeyV->SetLineColor(
kBlue);
924 fKey->GetCanvas()->SetEditable(kFALSE);
925 fKey->GetCanvas()->Update();
928 fMain->SetMWMHints(kMWMDecorAll,kMWMFuncAll,kMWMInputModeless);
929 fMain->MapSubwindows();
930 fMain->Resize(fMain->GetDefaultSize());
932 fMain->Resize(900,712);
const TString getenv_safe_TString(const char *name)