7#include "BesVisClient/BesClient.h"
8#include "BesVisClient/BesAboutHelp.h"
9#include "BesVisClient/BesMdcPalette.h"
10#include "BesVisLib/BesVisDisplay.h"
11#include "BesVisLib/BesCursor.h"
17#include <TRootEmbeddedCanvas.h>
19#include <TApplication.h>
20#include <TInterpreter.h>
25#include <TGeoManager.h>
29#include <TGStatusBar.h>
30#include <TGFileDialog.h>
31#include <TGNumberEntry.h>
33#include <TGProgressBar.h>
35#include <TGSplitter.h>
38#include <TGListTree.h>
40#include <TGButtonGroup.h>
41#include <TGTextEntry.h>
42#include <TGTextBuffer.h>
50#include <TViewerX3D.h>
53#include <TVirtualViewer3D.h>
56#include <TVirtualGL.h>
57#include <TVirtualGeoPainter.h>
58#include <TRootHelpDialog.h>
59#include <TRootDialog.h>
61#include "RootEventData/TRecTrackEvent.h"
62#include "RootEventData/TDigiEvent.h"
63#include "RootEventData/TDisTrack.h"
64#include "RootEventData/TRecEvTime.h"
65#include "BesVisLib/DstConvert.h"
87const char *OpenGeoTypes[] = {
"ROOT files",
"*.root",
88 "GDML files",
"*.gdml",
94 "ROOT files",
"*.root",
101 "rec files",
"*.rec",
102 "raw files",
"*.rtraw",
103 "dst files",
"*.dst",
104 "ROOT files",
"*.root",
127 "Text file",
"*.txt",
148 UInt_t width, UInt_t height, Option_t *option, Int_t argc,
char **argv) :
149 TGMainFrame(p, width, height) {
153 if ( gDebug ) cout <<
"BesClient ctor called" << endl;
178 fCurGeom = TString(
"");
193 this->SetBackgroundPixmap(
GetPic(
"background.gif"));
197 static char optstring[] =
"g:e:B:";
202 while ((optchar = getopt(argc, argv, optstring)) != -1)
207 cout <<
"Load Geometry file with arguments" << endl;
208 cout <<
"Geometry: " << f_geoFile << endl;
212 cout <<
"Load Event file with argments" << endl;
213 cout <<
"Evtfile: " << f_evtFile << endl;
218 cout <<
"Run in the Boss Framework: " << f_bossMode << endl;
219 cout <<
"parent pid: " << f_pid << endl;
222 cout <<
"Found an option that was not in optstring!" << endl;
228 if (f_evtFile.Length() == 0)
230 f_evtFile = argv[optind];
231 cout <<
"Load Event file with argments" << endl;
232 cout <<
"Evtfile: " << f_evtFile << endl;
240 if (f_bossMode ==
false)
243 if (f_geoFile.Length() != 0)
248 if (f_geoFile.Contains(
"/"))
251 f_geoFile = TString(
"");
256 if (!f_geoFile.EndsWith(
".root") && !f_geoFile.EndsWith(
".gdml"))
257 f_geoFile = TString(
"geom_") + f_geoFile + TString(
".root");
259 f_geoFile = fBesVisPath + TString(
"/geom/") + f_geoFile;
265 f_geoFile = TString(
"");
270 if (f_evtFile.Length() != 0)
281 f_evtFile = TString(
"");
290 else if (f_bossMode ==
true){
291 fAutoDisplayEvent = kTRUE;
293 cout <<
"Load event file: " << f_evtFile << endl;
307 cout <<
"BesClient dtor called" << endl;
325 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 0);
326 fWidgets->Add(fLayout);
327 this->AddFrame(fMenuBar, fLayout);
333 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 0, 0, 1);
334 fWidgets->Add(fLayout);
335 this->AddFrame(fUpButtonBarFrame, fLayout);
341 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsExpandX, 5, 5, 0, 0);
342 fWidgets->Add(fLayout);
343 this->AddFrame(fTitleFrame, fLayout);
349 fLayout =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0);
350 fWidgets->Add(fLayout);
351 this->AddFrame(fMainFrame, fLayout);
355 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 0, 0);
356 fWidgets->Add(fLayout);
357 this->AddFrame(fDisplayModeBarFrame, fLayout);
361 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 3, 0, 1, 0);
362 fWidgets->Add(fLayout);
363 this->AddFrame(fToolBarFrame, fLayout);
367 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0);
368 fWidgets->Add(fLayout);
369 this->AddFrame(fStatusBar, fLayout);
372 TString ttitle(title);
374 ttitle.Append(gSystem->HostName());
375 SetWindowName(ttitle);
378 SetIconPixmap( (fBesVisPath + TString(
"/icons/LogoBesVisMini.gif")).Data() );
379 SetClassHints(
"BesVis",
"Bes Event Visualisation");
381 SetWMPosition(10, 10);
382 SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless);
384 Resize(GetDefaultSize());
385 Resize(width, height);
393 fLayout =
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0);
394 fWidgets->Add(fLayout);
395 this->AddFrame(
new TGHorizontal3DLine(
this), fLayout);
405 fMenuBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
407 fMenuBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
409 fMenuBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsRight,
413 const TGPicture *viewGeometryIcon = gClient->GetPicture(
"viewGeometry.gif");
419 fMenuFile =
new TGPopupMenu(gClient->GetRoot());
425 fMenuFile->AddSeparator();
431 fMenuEdit =
new TGPopupMenu(gClient->GetRoot());
438 fMenuViewOptionHeader =
new TGPopupMenu(gClient->GetRoot());
444 fMenuViewOptionCgem =
new TGPopupMenu(gClient->GetRoot());
452 fMenuViewOptionMdc =
new TGPopupMenu(gClient->GetRoot());
459 fMenuViewOptionTof =
new TGPopupMenu(gClient->GetRoot());
467 fMenuViewOptionEmc =
new TGPopupMenu(gClient->GetRoot());
476 fMenuViewOptionMuc =
new TGPopupMenu(gClient->GetRoot());
485 fMenuViewOptionFull3D =
new TGPopupMenu(gClient->GetRoot());
494 fMenuViewOptionOthers =
new TGPopupMenu(gClient->GetRoot());
495 fMenuViewOptionOthers->AddEntry(
"BeamPipe",
kM_BeamPipe);
497 fMenuViewOptionOthers->AddEntry(
"Axis",
kM_Axis);
501 fMenuViewOptionCgemHits =
new TGPopupMenu(gClient->GetRoot());
511 fMenuViewOptionMdcHits =
new TGPopupMenu(gClient->GetRoot());
516 fMenuViewOptionTofHits =
new TGPopupMenu(gClient->GetRoot());
524 fMenuViewOptionEmcHits =
new TGPopupMenu(gClient->GetRoot());
533 fMenuViewOptionMucHits =
new TGPopupMenu(gClient->GetRoot());
541 fMenuViewOptionTracks =
new TGPopupMenu(gClient->GetRoot());
543 fMenuViewOptionTracks->AddEntry(
"Mdc && CGEM ",
kM_Tracks_Mdc);
549 fMenuViewOptionMC =
new TGPopupMenu(gClient->GetRoot());
554 fMenuView =
new TGPopupMenu(gClient->GetRoot());
556 fMenuView->AddLabel(
"General");
557 fMenuView->AddSeparator();
558 fMenuView->AddPopup(
"Header",fMenuViewOptionHeader);
559 fMenuView->AddSeparator();
560 fMenuView->AddLabel(
"Detector", viewGeometryIcon);
561 fMenuView->AddSeparator();
562 fMenuView->AddPopup(
"Cgem", fMenuViewOptionCgem);
563 fMenuView->AddPopup(
"Mdc",fMenuViewOptionMdc);
564 fMenuView->AddPopup(
"Tof",fMenuViewOptionTof);
565 fMenuView->AddPopup(
"Emc",fMenuViewOptionEmc);
566 fMenuView->AddPopup(
"Muc",fMenuViewOptionMuc);
568 fMenuView->AddPopup(
"Others",fMenuViewOptionOthers);
569 fMenuView->AddSeparator();
571 fMenuView->AddLabel(
"REC");
572 fMenuView->AddSeparator();
573 fMenuView->AddPopup(
"Cgem Hits", fMenuViewOptionCgemHits);
574 fMenuView->AddPopup(
"Mdc Hits",fMenuViewOptionMdcHits);
575 fMenuView->AddPopup(
"Tof Hits",fMenuViewOptionTofHits);
576 fMenuView->AddPopup(
"Emc Hits",fMenuViewOptionEmcHits);
577 fMenuView->AddPopup(
"Muc Hits",fMenuViewOptionMucHits);
578 fMenuView->AddPopup(
"Rec Tracks",fMenuViewOptionTracks);
579 fMenuView->AddPopup(
"MC Tracks", fMenuViewOptionMC);
580 fMenuView->AddSeparator();
581 fMenuView->AddLabel(
"Special Views");
582 fMenuView->AddSeparator();
590 fMenuHelp =
new TGPopupMenu(gClient->GetRoot());
593 fMenuHelp->AddSeparator();
597 fMenuBar =
new BesGMenuBar(
this, 1, 1, kHorizontalFrame);
598 fMenuBar->SetBackgroundPixmap(
GetPic(
"MenuBarBckgnd.gif"));
600 fMenuBar->
AddPopup(
"&File", fMenuFile, fMenuBarFirstItemLayout);
602 fMenuBar->
AddPopup(
"&View", fMenuView, fMenuBarItemLayout);
603 fMenuBar->
AddPopup(
"&Help", fMenuHelp, fMenuBarLastItemLayout);
615 fMenuFile->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
616 fMenuEdit->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
617 fMenuHelp->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
618 fMenuView->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
619 fMenuViewOptionHeader->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
620 fMenuViewOptionMdc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
621 fMenuViewOptionTof->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
622 fMenuViewOptionEmc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
623 fMenuViewOptionMuc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
624 fMenuViewOptionFull3D->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
625 fMenuViewOptionOthers->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
627 fMenuViewOptionCgemHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
628 fMenuViewOptionMdcHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
629 fMenuViewOptionTofHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
630 fMenuViewOptionEmcHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
631 fMenuViewOptionMucHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
632 fMenuViewOptionTracks->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
633 fMenuViewOptionMC->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
667 fUpButtonBarFrame =
new TGCompositeFrame(
this, 300, 25, kHorizontalFrame);
668 fUpButtonBarFrame->SetBackgroundPixmap(
GetPic(
"UpButtonBarBckgnd.gif"));
670 fUpButtonBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 15, 0, 1, 2);
671 fUpButtonBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 2);
672 fUpButtonBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 13, 1, 2);
674 Int_t width = 23, height = 22;
676 Int_t nUpSplitter = 0;
679 for (Int_t i = 0; i < kNUpSplitter; i++) {
681 gClient->GetPicture(
"UpButtonSplitter.gif"));
682 fUpButtonSplitter[i]->SetHeight(20);
683 fUpButtonSplitter[i]->SetWidth(5);
684 fUpButtonSplitter[i]->
SetState(kButtonDisabled);
689 gClient->GetPicture(
"ButtonLoadGeoFile.gif"),
691 fLoadGeoFileButton->
SetPictureHL(gClient->GetPicture(
"ButtonLoadGeoFileHL.gif"));
692 fLoadGeoFileButton->SetToolTipText(
"Load Geometry File");
693 fLoadGeoFileButton->SetHeight(height);
694 fLoadGeoFileButton->SetWidth(width);
695 fLoadGeoFileButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
696 fUpButtonBarFrame->AddFrame(fLoadGeoFileButton, fUpButtonBarFirstItemLayout);
700 gClient->GetPicture(
"ButtonOpenEventFile.gif"),
702 fOpenEventFileButton->
SetPictureHL(gClient->GetPicture(
"ButtonOpenEventFileHL.gif"));
703 fOpenEventFileButton->SetToolTipText(
"Open Event File");
704 fOpenEventFileButton->SetHeight(height);
705 fOpenEventFileButton->SetWidth(width);
706 fOpenEventFileButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
707 fUpButtonBarFrame->AddFrame(fOpenEventFileButton, fUpButtonBarItemLayout);
711 gClient->GetPicture(
"ButtonSavePicAs.gif"),
713 fSavePicAsButton->
SetPictureHL(gClient->GetPicture(
"ButtonSavePicAsHL.gif"));
714 fSavePicAsButton->SetToolTipText(
"Save Picture as");
715 fSavePicAsButton->SetHeight(height);
716 fSavePicAsButton->SetWidth(width);
717 fSavePicAsButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
718 fUpButtonBarFrame->AddFrame(fSavePicAsButton, fUpButtonBarItemLayout);
722 gClient->GetPicture(
"ButtonSavePicAsPS.gif"),
724 fSavePicAsPSButton->
SetPictureHL(gClient->GetPicture(
"ButtonSavePicAsPSHL.gif"));
725 fSavePicAsPSButton->SetToolTipText(
"Save Picture as besvis.ps");
726 fSavePicAsPSButton->SetHeight(height);
727 fSavePicAsPSButton->SetWidth(width);
728 fSavePicAsPSButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
729 fUpButtonBarFrame->AddFrame(fSavePicAsPSButton, fUpButtonBarItemLayout);
732 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
737 gClient->GetPicture(
"ButtonRefresh.gif"),
739 fRefreshButton->
SetPictureHL(gClient->GetPicture(
"ButtonRefreshHL.gif"));
740 fRefreshButton->SetToolTipText(
"Refresh");
741 fRefreshButton->SetHeight(height);
742 fRefreshButton->SetWidth(width);
743 fRefreshButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
744 fUpButtonBarFrame->AddFrame(fRefreshButton, fUpButtonBarItemLayout);
748 gClient->GetPicture(
"ButtonResetCurrent.gif"),
750 fResetCurrentButton->
SetPictureHL(gClient->GetPicture(
"ButtonResetCurrentHL.gif"));
751 fResetCurrentButton->SetToolTipText(
"Reset Current Pad");
752 fResetCurrentButton->SetHeight(height);
753 fResetCurrentButton->SetWidth(width);
754 fResetCurrentButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
755 fUpButtonBarFrame->AddFrame(fResetCurrentButton, fUpButtonBarItemLayout);
759 gClient->GetPicture(
"ButtonResetAll.gif"),
761 fResetAllButton->
SetPictureHL(gClient->GetPicture(
"ButtonResetAllHL.gif"));
762 fResetAllButton->SetToolTipText(
"Reset All Pads");
763 fResetAllButton->SetHeight(height);
764 fResetAllButton->SetWidth(width);
765 fResetAllButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
766 fUpButtonBarFrame->AddFrame(fResetAllButton, fUpButtonBarItemLayout);
769 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
774 gClient->GetPicture(
"ButtonZoomOut.gif"),
776 fZoomOutButton->
SetPictureHL(gClient->GetPicture(
"ButtonZoomOutHL.gif"));
777 fZoomOutButton->SetToolTipText(
"Zoom Out");
778 fZoomOutButton->SetHeight(height);
779 fZoomOutButton->SetWidth(width);
780 fZoomOutButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
781 fUpButtonBarFrame->AddFrame(fZoomOutButton, fUpButtonBarItemLayout);
786 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
787 fZoomRatioNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
788 h = Int_t(fZoomRatioNumber->GetDefaultHeight()/1.2);
789 charw = fZoomRatioNumber->GetCharWidth(
"0123456");
790 w = charw * TMath::Abs(5) / 10 + 8 + 2 * h / 3 + 2;
792 fZoomRatioNumber->Resize(w, h);
794 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
795 fWidgets->Add(fLayout);
796 fUpButtonBarFrame->AddFrame(fZoomRatioNumber, fLayout);
800 gClient->GetPicture(
"ButtonZoomRatioPercent.gif"));
801 fZoomRatioPercentButton->SetHeight(20);
802 fZoomRatioPercentButton->SetWidth(10);
803 fZoomRatioPercentButton->
SetState(kButtonDisabled);
804 fUpButtonBarFrame->AddFrame(fZoomRatioPercentButton, fUpButtonBarItemLayout);
808 gClient->GetPicture(
"ButtonZoomIn.gif"),
810 fZoomInButton->
SetPictureHL(gClient->GetPicture(
"ButtonZoomInHL.gif"));
811 fZoomInButton->SetToolTipText(
"Zoom In");
812 fZoomInButton->SetHeight(height);
813 fZoomInButton->SetWidth(width);
814 fZoomInButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
815 fUpButtonBarFrame->AddFrame(fZoomInButton, fUpButtonBarItemLayout);
819 gClient->GetPicture(
"ButtonCursorPickST.gif"),
822 fCursorButton[0]->
SetPictureHL(gClient->GetPicture(
"ButtonCursorPickHL.gif"));
823 fCursorButton[0]->SetToolTipText(
"Select Tool");
828 gClient->GetPicture(
"ButtonCursorHand.gif"),
830 fCursorButton[1]->
SetPictureHL(gClient->GetPicture(
"ButtonCursorHandHL.gif"));
831 fCursorButton[1]->SetToolTipText(
"Hand Tool");
833 for (
int i = 0; i < kNCursorState; i++) {
834 fCursorButton[i]->SetHeight(height);
835 fCursorButton[i]->SetWidth(width);
836 fCursorButton[i]->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
837 fUpButtonBarFrame->AddFrame(fCursorButton[i], fUpButtonBarItemLayout);
841 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
846 gClient->GetPicture(
"ButtonSwitchDisplayMode.gif"),
848 fSwitchDisplayModeButton->
SetPictureHL(gClient->GetPicture(
"ButtonSwitchDisplayModeHL.gif"));
849 fSwitchDisplayModeButton->SetToolTipText(
"Switch Display Mode");
850 fSwitchDisplayModeButton->SetHeight(height);
851 fSwitchDisplayModeButton->SetWidth(width);
852 fSwitchDisplayModeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
853 fUpButtonBarFrame->AddFrame(fSwitchDisplayModeButton, fUpButtonBarItemLayout);
857 gClient->GetPicture(
"ButtonSetHome.gif"),
859 fSetHomeButton->
SetPictureHL(gClient->GetPicture(
"ButtonSetHomeHL.gif"));
860 fSetHomeButton->SetToolTipText(
"Set home position");
861 fSetHomeButton->SetHeight(height);
862 fSetHomeButton->SetWidth(width);
863 fSetHomeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
864 fUpButtonBarFrame->AddFrame(fSetHomeButton, fUpButtonBarItemLayout);
868 gClient->GetPicture(
"ButtonGoHome.gif"),
870 fGoHomeButton->
SetPictureHL(gClient->GetPicture(
"ButtonGoHomeHL.gif"));
871 fGoHomeButton->SetToolTipText(
"Go to home position");
872 fGoHomeButton->SetHeight(height);
873 fGoHomeButton->SetWidth(width);
874 fGoHomeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
875 fUpButtonBarFrame->AddFrame(fGoHomeButton, fUpButtonBarItemLayout);
879 gClient->GetPicture(
"ButtonSaveMyConfig.gif"),
881 fSaveMyConfigButton->
SetPictureHL(gClient->GetPicture(
"ButtonSaveMyConfigHL.gif"));
882 fSaveMyConfigButton->SetToolTipText(
"Save My Style");
883 fSaveMyConfigButton->SetHeight(height);
884 fSaveMyConfigButton->SetWidth(width);
885 fSaveMyConfigButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
886 fUpButtonBarFrame->AddFrame(fSaveMyConfigButton, fUpButtonBarItemLayout);
890 gClient->GetPicture(
"ButtonLoadMyConfig.gif"),
892 fLoadMyConfigButton->
SetPictureHL(gClient->GetPicture(
"ButtonLoadMyConfigHL.gif"));
893 fLoadMyConfigButton->SetToolTipText(
"Load My Style");
894 fLoadMyConfigButton->SetHeight(height);
895 fLoadMyConfigButton->SetWidth(width);
896 fLoadMyConfigButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
897 fUpButtonBarFrame->AddFrame(fLoadMyConfigButton, fUpButtonBarItemLayout);
901 gClient->GetPicture(
"ButtonPalette.gif"),
903 fPaletteButton->
SetPictureHL(gClient->GetPicture(
"ButtonPaletteHL.gif"));
904 fPaletteButton->SetToolTipText(
"Palette");
905 fPaletteButton->SetHeight(height);
906 fPaletteButton->SetWidth(width);
907 fPaletteButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
908 fUpButtonBarFrame->AddFrame(fPaletteButton, fUpButtonBarItemLayout);
911 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
916 gClient->GetPicture(
"ButtonHelp.gif"),
918 fHelpButton->
SetPictureHL(gClient->GetPicture(
"ButtonHelpHL.gif"));
919 fHelpButton->SetToolTipText(
"Help");
920 fHelpButton->SetHeight(height);
921 fHelpButton->SetWidth(width);
922 fHelpButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
923 fUpButtonBarFrame->AddFrame(fHelpButton, fUpButtonBarLastItemLayout);
930 fDisplayModeBarFrame =
new TGCompositeFrame(
this, 300, 16, kHorizontalFrame);
931 fDisplayModeBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 0, 0);
942 fDisplayModeButton[0]->
SetState(
true);
943 fDisplayModeButton[1]->
SetState(
false);
944 fDisplayModeButton[2]->
SetState(
false);
945 fDisplayModeButton[3]->
SetState(
false);
946 fDisplayModeButton[4]->
SetState(
false);
947 fDisplayModeButton[5]->
SetState(
false);
948 fDisplayModeButton[6]->
SetState(
false);
950 fDisplayModeButton[0]->
SetPictureHL(gClient->GetPicture(
"DisplayMode2DHL.gif"));
951 fDisplayModeButton[1]->
SetPictureHL(gClient->GetPicture(
"DisplayModeXYHL.gif"));
952 fDisplayModeButton[2]->
SetPictureHL(gClient->GetPicture(
"DisplayModeZRHL.gif"));
953 fDisplayModeButton[3]->
SetPictureHL(gClient->GetPicture(
"DisplayMode3DHL.gif"));
954 fDisplayModeButton[4]->
SetPictureHL(gClient->GetPicture(
"DisplayModeAllHL.gif"));
956 fDisplayModeButton[5]->
SetPictureHL(gClient->GetPicture(
"DisplayModeCgemUFHL.gif"));
957 fDisplayModeButton[6]->
SetPictureHL(gClient->GetPicture(
"DisplayModeCgemUFAllHL.gif"));
959 fDisplayModeButton[0]->SetToolTipText(
"XY+ZR view");
960 fDisplayModeButton[1]->SetToolTipText(
"XY view");
961 fDisplayModeButton[2]->SetToolTipText(
"ZR view");
962 fDisplayModeButton[3]->SetToolTipText(
"3D view");
963 fDisplayModeButton[4]->SetToolTipText(
"All view");
965 fDisplayModeButton[5]->SetToolTipText(
"CGEM unfolded view");
966 fDisplayModeButton[6]->SetToolTipText(
"CGEM unfolded all view");
968 Int_t width = 16, height = 16;
969 for (Int_t i = 0; i < kNDisplayMode; i++) {
970 fDisplayModeButton[i]->
SetState(kButtonUp);
971 fDisplayModeButton[i]->SetHeight(height);
972 fDisplayModeButton[i]->SetWidth(width);
973 fDisplayModeButton[i]->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
974 fDisplayModeBarFrame->AddFrame(fDisplayModeButton[i], fDisplayModeBarItemLayout);
982 fToolBarFrame =
new TGCompositeFrame(
this, 300, 25, kHorizontalFrame);
983 fToolBarFrame->SetBackgroundPixmap(
GetPic(
"ToolButtonBarBckgnd.gif"));
985 fToolBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 0, 1, 2);
986 fToolBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 2);
987 fToolBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 14, 1, 2);
989 Int_t width = 23, height = 22;
990 Int_t nToolSplitter = 0;
993 for (Int_t i = 0; i < kNToolSplitter; i++) {
995 gClient->GetPicture(
"ToolButtonSplitter.gif"));
996 fToolButtonSplitter[i]->SetHeight(20);
997 fToolButtonSplitter[i]->SetWidth(5);
998 fToolButtonSplitter[i]->
SetState(kButtonDisabled);
1003 gClient->GetPicture(
"ButtonSwitchPad.gif"),
1005 fSwitchPadButton->
SetPictureHL(gClient->GetPicture(
"ButtonSwitchPadHL.gif"));
1006 fSwitchPadButton->SetToolTipText(
"Switch Among Pads");
1007 fSwitchPadButton->SetHeight(height);
1008 fSwitchPadButton->SetWidth(width);
1009 fSwitchPadButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1010 fToolBarFrame->AddFrame(fSwitchPadButton, fToolBarFirstItemLayout);
1013 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
1018 gClient->GetPicture(
"ButtonShowInfoST.gif"),
1021 fShowInfoButton->
SetPictureHL(gClient->GetPicture(
"ButtonShowInfoHL.gif"));
1022 fShowInfoButton->SetToolTipText(
"Show Info");
1023 fShowInfoButton->SetHeight(height);
1024 fShowInfoButton->SetWidth(width);
1025 fShowInfoButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1026 fToolBarFrame->AddFrame(fShowInfoButton, fToolBarItemLayout);
1030 gClient->GetPicture(
"ButtonShowAxis.gif"),
1032 fShowAxisButton->
SetPictureHL(gClient->GetPicture(
"ButtonShowAxisHL.gif"));
1033 fShowAxisButton->SetToolTipText(
"Show Axis");
1034 fShowAxisButton->SetHeight(height);
1035 fShowAxisButton->SetWidth(width);
1036 fShowAxisButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1037 fToolBarFrame->AddFrame(fShowAxisButton, fToolBarItemLayout);
1040 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
1045 gClient->GetPicture(
"ButtonFishEyeView.gif"),
1047 fFishEyeViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonFishEyeViewHL.gif"));
1048 fFishEyeViewButton->SetToolTipText(
"FishEye View");
1049 fFishEyeViewButton->SetHeight(height);
1050 fFishEyeViewButton->SetWidth(width);
1051 fFishEyeViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1052 fToolBarFrame->AddFrame(fFishEyeViewButton, fToolBarItemLayout);
1056 gClient->GetPicture(
"ButtonParallelViewST.gif"),
1058 fParallelViewButton->
SetState(
true);
1059 fParallelViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonParallelViewHL.gif"));
1060 fParallelViewButton->SetToolTipText(
"Parallel View");
1061 fParallelViewButton->SetHeight(height);
1062 fParallelViewButton->SetWidth(width);
1063 fParallelViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1064 fToolBarFrame->AddFrame(fParallelViewButton, fToolBarItemLayout);
1068 gClient->GetPicture(
"ButtonPerspectiveView.gif"),
1070 fPerspectiveViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonPerspectiveViewHL.gif"));
1071 fPerspectiveViewButton->SetToolTipText(
"Perspective View");
1072 fPerspectiveViewButton->SetHeight(height);
1073 fPerspectiveViewButton->SetWidth(width);
1074 fPerspectiveViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1075 fToolBarFrame->AddFrame(fPerspectiveViewButton, fToolBarItemLayout);
1078 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
1083 gClient->GetPicture(
"ButtonOpenGL.gif"),
1085 fOpenGLButton->
SetPictureHL(gClient->GetPicture(
"ButtonOpenGLHL.gif"));
1086 fOpenGLButton->SetToolTipText(
"OpenGL View");
1087 fOpenGLButton->SetHeight(height);
1088 fOpenGLButton->SetWidth(width);
1089 fOpenGLButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1090 fToolBarFrame->AddFrame(fOpenGLButton, fToolBarItemLayout);
1094 gClient->GetPicture(
"ButtonX3D.gif"),
1096 fX3DButton->
SetPictureHL(gClient->GetPicture(
"ButtonX3DHL.gif"));
1097 fX3DButton->SetToolTipText(
"X3D View");
1098 fX3DButton->SetHeight(height);
1099 fX3DButton->SetWidth(width);
1100 fX3DButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1101 fToolBarFrame->AddFrame(fX3DButton, fToolBarItemLayout);
1104 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarLastItemLayout);
1115 fTitleFrame =
new TGHorizontalFrame(
this, this->GetWidth(), 10);
1124 Int_t parts[] = {40, 50, 10};
1125 fStatusBar =
new TGStatusBar(
this, this->GetWidth(), 20, kHorizontalFrame);
1126 fStatusBar->SetParts(parts, nPart);
1127 fStatusBar->SetBackgroundPixmap(
GetPic(
"StatusBarBckgnd.gif"));
1128 for (Int_t iPart = 0; iPart < nPart; iPart++) {
1129 fStatusBar->GetBarPart(iPart)->SetBackgroundPixmap(
GetPic(
"StatusBarBckgnd.gif"));
1143 fMainFrame =
new TGHorizontalFrame(
this, this->GetWidth(), this->GetHeight()-26);
1146 fV1 =
new TGVerticalFrame(fMainFrame, 250, fMainFrame->GetHeight(), kFixedWidth);
1154 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 2, 0, 0);
1155 fWidgets->Add(fLayout);
1156 fV1->AddFrame(fTabs, fLayout);
1161 fMainFrame->AddFrame(fEmbeddedCanvas, fECLayout);
1163 fLayout =
new TGLayoutHints(kLHintsRight | kLHintsExpandY);
1164 fWidgets->Add(fLayout);
1165 fMainFrame->AddFrame(fV1, fLayout);
1167 TGVSplitter *VSplitter =
new TGVSplitter(fMainFrame);
1168 VSplitter->SetFrame(fV1, kFALSE);
1169 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandY);
1170 fWidgets->Add(fLayout);
1171 fMainFrame->AddFrame(VSplitter, fLayout);
1181 fECLayout =
new TGLayoutHints( kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0);
1182 fEmbeddedCanvas =
new TRootEmbeddedCanvas(0, fMainFrame, fMainFrame->GetWidth()/4*3-12, fMainFrame->GetHeight()-46);
1183 Int_t wid = fEmbeddedCanvas->GetCanvasWindowId();
1184 fCanvas =
new TCanvas(
"BesVis", fEmbeddedCanvas->GetWidth(), fEmbeddedCanvas->GetHeight()-10, wid);
1185 fEmbeddedCanvas->AdoptCanvas(fCanvas);
1200 fTabs =
new TGTab(fV1, fV1->GetWidth(), fV1->GetHeight());
1204 TGCompositeFrame *tf = 0;
1210 tf = fTabs->AddTab(
"View");
1211 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1216 fAutoFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1217 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1218 fWidgets->Add(fLayout);
1219 tf->AddFrame(fAutoFrame, fLayout);
1220 fAutoFrame->SetBackgroundPixmap(
GetPic(
"AutoFrameBckgnd.gif"));
1223 fAutoTextFrame =
new TGCompositeFrame(fAutoFrame, fAutoFrame->GetWidth(), 30, kHorizontalFrame);
1224 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1225 fWidgets->Add(fLayout);
1226 fAutoFrame->AddFrame(fAutoTextFrame, fLayout);
1227 fAutoTextFrame->SetBackgroundPixmap(
GetPic(
"AutoControlBckgnd.gif"));
1229 fAutoTextLabel =
new TGLabel(fAutoTextFrame,
"Auto Control ");
1230 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 0);
1231 fWidgets->Add(fLayout);
1232 fAutoTextFrame->AddFrame(fAutoTextLabel, fLayout);
1233 fAutoTextLabel->SetBackgroundPixmap(
GetPic(
"AutoControlBckgnd.gif"));
1236 fFrameAutoRotate =
new TGGroupFrame(fAutoFrame,
"");
1237 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0);
1239 fWidgets->Add(fLayout);
1240 fAutoFrame->AddFrame(fFrameAutoRotate, fLayout);
1244 fLayout =
new TGLayoutHints(kLHintsExpandX, 5, 5, 3, 2);
1245 fFrameAutoRotate->AddFrame(fChkBtnAutoRotate, fLayout);
1246 fChkBtnAutoRotate->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1249 fRotateSpeedFrame =
new TGCompositeFrame(fFrameAutoRotate, fFrameAutoRotate->GetWidth()-20, 30, kHorizontalFrame);
1250 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 2, 2);
1251 fWidgets->Add(fLayout);
1252 fFrameAutoRotate->AddFrame(fRotateSpeedFrame, fLayout);
1257 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 1 );
1258 h = fNumEntryRotateSpeed->GetDefaultHeight();
1259 charw = fNumEntryRotateSpeed->GetCharWidth(
"0123456");
1260 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1261 fNumEntryRotateSpeed->Resize(w, h);
1264 fNumEntryRotateSpeed->SetHeight(20);
1266 fNumEntryRotateSpeed->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1267 fNumEntryRotateSpeed->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1268 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 2, 2);
1269 fWidgets->Add(fLayout);
1270 fRotateSpeedFrame->AddFrame(fNumEntryRotateSpeed, fLayout);
1273 fRotateSpeedLabel =
new TGLabel(fRotateSpeedFrame,
" deg/sec ");
1274 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 2, 2);
1275 fWidgets->Add(fLayout);
1276 fRotateSpeedFrame->AddFrame(fRotateSpeedLabel, fLayout);
1279 fRotateFPSFrame =
new TGCompositeFrame(fFrameAutoRotate, fFrameAutoRotate->GetWidth()-20, 30, kHorizontalFrame);
1280 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 2, 2);
1281 fWidgets->Add(fLayout);
1282 fFrameAutoRotate->AddFrame(fRotateFPSFrame, fLayout);
1285 fNumEntryRotateFPS =
new TGNumberEntry(fRotateFPSFrame,this->
GetRotateFPS(), 3,
kM_Button_RotateFPS,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1286 fNumEntryRotateFPS->SetHeight(20);
1288 fNumEntryRotateFPS->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1289 fNumEntryRotateFPS->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1290 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 2, 2);
1291 fWidgets->Add(fLayout);
1292 fRotateFPSFrame->AddFrame(fNumEntryRotateFPS, fLayout);
1295 fRotateFPSLabel =
new TGLabel(fRotateFPSFrame,
" fps ");
1296 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 2, 2);
1297 fWidgets->Add(fLayout);
1298 fRotateFPSFrame->AddFrame(fRotateFPSLabel, fLayout);
1304 fViewFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1305 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1306 fWidgets->Add(fLayout);
1307 tf->AddFrame(fViewFrame, fLayout);
1308 fViewFrame->SetBackgroundPixmap(
GetPic(
"ViewFrameBckgnd.gif"));
1311 fViewTextFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth(), 30, kHorizontalFrame);
1312 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1313 fWidgets->Add(fLayout);
1314 fViewFrame->AddFrame(fViewTextFrame, fLayout);
1315 fViewTextFrame->SetBackgroundPixmap(
GetPic(
"ViewControlBckgnd.gif"));
1317 fViewTextLabel =
new TGLabel(fViewTextFrame,
"View Control ");
1318 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 4);
1319 fWidgets->Add(fLayout);
1320 fViewTextFrame->AddFrame(fViewTextLabel, fLayout);
1321 fViewTextLabel->SetBackgroundPixmap(
GetPic(
"ViewControlBckgnd.gif"));
1325 fRotateStepFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth()-20, 30, kHorizontalFrame);
1326 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 8, 5);
1327 fWidgets->Add(fLayout);
1328 fViewFrame->AddFrame(fRotateStepFrame, fLayout);
1331 fRotateStepLabel =
new TGLabel(fRotateStepFrame,
" Step:");
1332 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 10, 2, 0, 0);
1333 fWidgets->Add(fLayout);
1334 fRotateStepFrame->AddFrame(fRotateStepLabel, fLayout);
1339 (TGNumberFormat::EStyle) 2, (TGNumberFormat::EAttribute) 1 );
1340 h = fNumEntryRotateStep->GetDefaultHeight();
1341 charw = fNumEntryRotateStep->GetCharWidth(
"0123456");
1342 w = charw * TMath::Abs(5) / 10 + 8 + 2 * h / 3;
1343 fNumEntryRotateStep->Resize(w, h);
1345 fNumEntryRotateStep->SetHeight(20);
1347 fNumEntryRotateStep->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1348 fNumEntryRotateStep->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1349 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 0, 0, 0);
1350 fWidgets->Add(fLayout);
1351 fRotateStepFrame->AddFrame(fNumEntryRotateStep, fLayout);
1354 fRotateStepUnitLabel =
new TGLabel(fRotateStepFrame,
" deg ");
1355 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 0, 4, 0, 0);
1356 fWidgets->Add(fLayout);
1357 fRotateStepFrame->AddFrame(fRotateStepUnitLabel, fLayout);
1360 fViewContentFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth(), fViewFrame->GetHeight()-30, kVerticalFrame);
1361 fLayout =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY , 0, 0, 0, 0);
1362 fWidgets->Add(fLayout);
1363 fViewFrame->AddFrame(fViewContentFrame, fLayout);
1366 fViewContent1Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 39, kHorizontalFrame);
1367 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 3, 0);
1368 fWidgets->Add(fLayout);
1369 fViewContent1Frame->SetBackgroundPixmap(
GetPic(
"ViewContent1Bckgnd.gif"));
1370 fViewContentFrame->AddFrame(fViewContent1Frame, fLayout);
1374 gClient->GetPicture(
"ViewCounterClockwise.gif"),
1376 fViewCounterClockWiseButton->SetToolTipText(
"Rotate Counter Clockwise");
1377 fViewCounterClockWiseButton->SetHeight(37);
1378 fViewCounterClockWiseButton->SetWidth(37);
1379 fViewCounterClockWiseButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1381 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 22, 0, 0);
1382 fWidgets->Add(fLayout);
1383 fViewContent1Frame->AddFrame(fViewCounterClockWiseButton, fLayout);
1387 gClient->GetPicture(
"ViewMoveUp.gif"),
1389 fViewMoveUpButton->SetToolTipText(
"Move Up");
1390 fViewMoveUpButton->SetHeight(20);
1391 fViewMoveUpButton->SetWidth(23);
1392 fViewMoveUpButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1394 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 5, 5, 0, 0);
1395 fWidgets->Add(fLayout);
1396 fViewContent1Frame->AddFrame(fViewMoveUpButton, fLayout);
1400 gClient->GetPicture(
"ViewClockwise.gif"),
1402 fViewClockWiseButton->SetToolTipText(
"Rotate Clockwise");
1403 fViewClockWiseButton->SetHeight(37);
1404 fViewClockWiseButton->SetWidth(37);
1405 fViewClockWiseButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1407 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 22, 5, 0, 0);
1408 fWidgets->Add(fLayout);
1409 fViewContent1Frame->AddFrame(fViewClockWiseButton, fLayout);
1412 fViewContent2Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 23, kHorizontalFrame);
1413 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 0, 0);
1414 fWidgets->Add(fLayout);
1415 fViewContent2Frame->SetBackgroundPixmap(
GetPic(
"ViewContent2Bckgnd.gif"));
1416 fViewContentFrame->AddFrame(fViewContent2Frame, fLayout);
1420 gClient->GetPicture(
"ViewMoveLeft.gif"),
1422 fViewMoveLeftButton->SetToolTipText(
"Move Left");
1423 fViewMoveLeftButton->SetHeight(23);
1424 fViewMoveLeftButton->SetWidth(23);
1425 fViewMoveLeftButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1427 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 49, 2, 0, 0);
1428 fWidgets->Add(fLayout);
1429 fViewContent2Frame->AddFrame(fViewMoveLeftButton, fLayout);
1433 gClient->GetPicture(
"ViewMoveCenter.gif"),
1435 fViewMoveCenterButton->SetToolTipText(
"Move Center");
1436 fViewMoveCenterButton->SetHeight(13);
1437 fViewMoveCenterButton->SetWidth(13);
1438 fViewMoveCenterButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1440 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX, 0, 0, 0, 0);
1441 fWidgets->Add(fLayout);
1442 fViewContent2Frame->AddFrame(fViewMoveCenterButton, fLayout);
1446 gClient->GetPicture(
"ViewMoveRight.gif"),
1448 fViewMoveRightButton->SetToolTipText(
"Move Right");
1449 fViewMoveRightButton->SetHeight(23);
1450 fViewMoveRightButton->SetWidth(23);
1451 fViewMoveRightButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1453 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 2, 49, 0, 0);
1454 fWidgets->Add(fLayout);
1455 fViewContent2Frame->AddFrame(fViewMoveRightButton, fLayout);
1458 fViewContent3Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 32, kHorizontalFrame);
1459 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 0, 3);
1460 fWidgets->Add(fLayout);
1461 fViewContent3Frame->SetBackgroundPixmap(
GetPic(
"ViewContent3Bckgnd.gif"));
1462 fViewContentFrame->AddFrame(fViewContent3Frame, fLayout);
1466 gClient->GetPicture(
"ViewMoveDown.gif"),
1468 fViewMoveDownButton->SetToolTipText(
"Move Down");
1469 fViewMoveDownButton->SetHeight(32);
1470 fViewMoveDownButton->SetWidth(23);
1471 fViewMoveDownButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1474 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 69, 0, 0, 0);
1475 fWidgets->Add(fLayout);
1476 fViewContent3Frame->AddFrame(fViewMoveDownButton, fLayout);
1480 gClient->GetPicture(
"ViewResetAngle.gif"),
1483 fViewResetAngleButton->SetToolTipText(
"Reset Angles");
1484 fViewResetAngleButton->SetHeight(27);
1485 fViewResetAngleButton->SetWidth(27);
1486 fViewResetAngleButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1488 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 30, 0, 0, 0);
1489 fWidgets->Add(fLayout);
1490 fViewContent3Frame->AddFrame(fViewResetAngleButton, fLayout);
1494 fViewAngleFrame =
new TGCompositeFrame(fViewContentFrame, fViewContentFrame->GetWidth(), 50, kHorizontalFrame);
1495 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 4, 4, 0, 0);
1496 fWidgets->Add(fLayout);
1497 fViewContentFrame->AddFrame(fViewAngleFrame, fLayout);
1500 fViewAngleThetaFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1501 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1502 fWidgets->Add(fLayout);
1503 fViewAngleFrame->AddFrame(fViewAngleThetaFrame, fLayout);
1507 gClient->GetPicture(
"ViewAngleMinus.gif"),
1509 fViewAngleThetaMinusButton->SetToolTipText(
"Theta -");
1510 fViewAngleThetaMinusButton->SetHeight(22);
1511 fViewAngleThetaMinusButton->SetWidth(22);
1512 fViewAngleThetaMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1514 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1515 fWidgets->Add(fLayout);
1516 fViewAngleThetaFrame->AddFrame(fViewAngleThetaMinusButton, fLayout);
1520 fViewAngleThetaSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1521 fViewAngleThetaSlider->SetRange(0, 180);
1522 fViewAngleThetaSlider->SetPosition(0);
1523 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1524 fWidgets->Add(fLayout);
1525 fViewAngleThetaFrame->AddFrame(fViewAngleThetaSlider, fLayout);
1529 gClient->GetPicture(
"ViewAnglePlus.gif"),
1531 fViewAngleThetaPlusButton->SetToolTipText(
"Theta +");
1532 fViewAngleThetaPlusButton->SetHeight(22);
1533 fViewAngleThetaPlusButton->SetWidth(22);
1534 fViewAngleThetaPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1536 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1537 fWidgets->Add(fLayout);
1538 fViewAngleThetaFrame->AddFrame(fViewAngleThetaPlusButton, fLayout);
1544 fViewAngleThetaSlider->GetPosition(),
1545 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1546 fViewAngleThetaNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1547 h = fViewAngleThetaNumber->GetDefaultHeight();
1548 charw = fViewAngleThetaNumber->GetCharWidth(
"0123456");
1549 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1550 fViewAngleThetaNumber->Resize(w, h);
1552 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1553 fWidgets->Add(fLayout);
1554 fViewAngleThetaFrame->AddFrame(fViewAngleThetaNumber, fLayout);
1557 fViewAngleThetaLabel =
new TGLabel(fViewAngleThetaFrame,
"theta");
1558 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1559 fWidgets->Add(fLayout);
1560 fViewAngleThetaFrame->AddFrame(fViewAngleThetaLabel, fLayout);
1563 fViewAnglePhiFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1564 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1565 fWidgets->Add(fLayout);
1566 fViewAngleFrame->AddFrame(fViewAnglePhiFrame, fLayout);
1570 gClient->GetPicture(
"ViewAngleMinus.gif"),
1572 fViewAnglePhiMinusButton->SetToolTipText(
"Phi -");
1573 fViewAnglePhiMinusButton->SetHeight(22);
1574 fViewAnglePhiMinusButton->SetWidth(22);
1575 fViewAnglePhiMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1577 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1578 fWidgets->Add(fLayout);
1579 fViewAnglePhiFrame->AddFrame(fViewAnglePhiMinusButton, fLayout);
1582 fViewAnglePhiSlider =
new TGVSlider(fViewAnglePhiFrame, 120, kSlider2 | kScaleBoth,
kM_Slider_ViewAnglePhi);
1583 fViewAnglePhiSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1584 fViewAnglePhiSlider->SetRange(0, 360);
1585 fViewAnglePhiSlider->SetPosition(0);
1586 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1587 fWidgets->Add(fLayout);
1588 fViewAnglePhiFrame->AddFrame(fViewAnglePhiSlider, fLayout);
1592 gClient->GetPicture(
"ViewAnglePlus.gif"),
1594 fViewAnglePhiPlusButton->SetToolTipText(
"Phi +");
1595 fViewAnglePhiPlusButton->SetHeight(22);
1596 fViewAnglePhiPlusButton->SetWidth(22);
1597 fViewAnglePhiPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1599 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1600 fWidgets->Add(fLayout);
1601 fViewAnglePhiFrame->AddFrame(fViewAnglePhiPlusButton, fLayout);
1607 fViewAnglePhiSlider->GetPosition(),
1608 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1609 fViewAnglePhiNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1610 h = fViewAnglePhiNumber->GetDefaultHeight();
1611 charw = fViewAnglePhiNumber->GetCharWidth(
"0123456");
1612 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1613 fViewAnglePhiNumber->Resize(w, h);
1615 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1616 fWidgets->Add(fLayout);
1617 fViewAnglePhiFrame->AddFrame(fViewAnglePhiNumber, fLayout);
1620 fViewAnglePhiLabel =
new TGLabel(fViewAnglePhiFrame,
"phi");
1621 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1622 fWidgets->Add(fLayout);
1623 fViewAnglePhiFrame->AddFrame(fViewAnglePhiLabel, fLayout);
1626 fViewAnglePsiFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1627 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1628 fWidgets->Add(fLayout);
1629 fViewAngleFrame->AddFrame(fViewAnglePsiFrame, fLayout);
1633 gClient->GetPicture(
"ViewAngleMinus.gif"),
1635 fViewAnglePsiMinusButton->SetToolTipText(
"Psi -");
1636 fViewAnglePsiMinusButton->SetHeight(22);
1637 fViewAnglePsiMinusButton->SetWidth(22);
1638 fViewAnglePsiMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1640 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1641 fWidgets->Add(fLayout);
1642 fViewAnglePsiFrame->AddFrame(fViewAnglePsiMinusButton, fLayout);
1645 fViewAnglePsiSlider =
new TGVSlider(fViewAnglePsiFrame, 120, kSlider2 | kScaleBoth,
kM_Slider_ViewAnglePsi);
1646 fViewAnglePsiSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1647 fViewAnglePsiSlider->SetRange(0, 360);
1648 fViewAnglePsiSlider->SetPosition(270);
1649 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1650 fWidgets->Add(fLayout);
1651 fViewAnglePsiFrame->AddFrame(fViewAnglePsiSlider, fLayout);
1655 gClient->GetPicture(
"ViewAnglePlus.gif"),
1657 fViewAnglePsiPlusButton->SetToolTipText(
"Psi +");
1658 fViewAnglePsiPlusButton->SetHeight(22);
1659 fViewAnglePsiPlusButton->SetWidth(22);
1660 fViewAnglePsiPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1662 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1663 fWidgets->Add(fLayout);
1664 fViewAnglePsiFrame->AddFrame(fViewAnglePsiPlusButton, fLayout);
1670 fViewAnglePsiSlider->GetPosition(),
1671 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1672 fViewAnglePsiNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1673 h = fViewAnglePsiNumber->GetDefaultHeight();
1674 charw = fViewAnglePsiNumber->GetCharWidth(
"0123456");
1675 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1676 fViewAnglePsiNumber->Resize(w, h);
1678 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1679 fWidgets->Add(fLayout);
1680 fViewAnglePsiFrame->AddFrame(fViewAnglePsiNumber, fLayout);
1683 fViewAnglePsiLabel =
new TGLabel(fViewAnglePsiFrame,
"psi");
1684 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1685 fWidgets->Add(fLayout);
1686 fViewAnglePsiFrame->AddFrame(fViewAnglePsiLabel, fLayout);
1691 tf = fTabs->AddTab(
"Event");
1692 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1697 fEventControlFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1698 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1699 fWidgets->Add(fLayout);
1700 tf->AddFrame(fEventControlFrame, fLayout);
1701 fEventControlFrame->SetBackgroundPixmap(
GetPic(
"EventFrameBckgnd.gif"));
1705 fEventControlTextFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1706 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1707 fWidgets->Add(fLayout);
1708 fEventControlFrame->AddFrame(fEventControlTextFrame, fLayout);
1709 fEventControlTextFrame->SetBackgroundPixmap(
GetPic(
"EventControlBckgnd.gif"));
1711 fEventControlTextLabel =
new TGLabel(fEventControlTextFrame,
"Event Control ");
1712 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 4);
1713 fWidgets->Add(fLayout);
1714 fEventControlTextFrame->AddFrame(fEventControlTextLabel, fLayout);
1715 fEventControlTextLabel->SetBackgroundPixmap(
GetPic(
"EventControlBckgnd.gif"));
1718 fBesRunFrame =
new TGHorizontalFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 25);
1719 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 4, 4, 4, 4);
1720 fWidgets->Add(fLayout);
1721 fEventControlFrame->AddFrame(fBesRunFrame, fLayout);
1722 fBesRunFrame->SetBackgroundPixmap(
GetPic(
"EventFrameBckgnd.gif"));
1724 fBesLabelRun =
new TGLabel(fBesRunFrame,
"Run : ");
1725 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1726 fWidgets->Add(fLayout);
1727 fBesRunFrame->AddFrame(fBesLabelRun, fLayout);
1729 fNumEntryRunNo =
new TGNumberEntry(fBesRunFrame,this->
GetBesRunNo(),12,
kM_Button_BesRun,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1730 fNumEntryRunNo->SetHeight(20);
1732 fNumEntryRunNo->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1733 fNumEntryRunNo->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1734 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 4, 4, 4, 4);
1735 fWidgets->Add(fLayout);
1736 fBesRunFrame->AddFrame(fNumEntryRunNo, fLayout);
1739 fBesEventFrame =
new TGHorizontalFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 25);
1740 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 4, 4, 4, 4);
1741 fWidgets->Add(fLayout);
1742 fEventControlFrame->AddFrame(fBesEventFrame, fLayout);
1744 fBesLabelEvent =
new TGLabel(fBesEventFrame,
"Event : ");
1745 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1746 fWidgets->Add(fLayout);
1747 fBesEventFrame->AddFrame(fBesLabelEvent, fLayout);
1749 fNumEntryEventNo =
new TGNumberEntry(fBesEventFrame,this->
GetBesEventNo(),12,
kM_Button_BesEvent,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1750 fNumEntryEventNo->SetHeight(20);
1752 fNumEntryEventNo->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1753 fNumEntryEventNo->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1754 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 4, 4, 4, 4);
1755 fWidgets->Add(fLayout);
1756 fBesEventFrame->AddFrame(fNumEntryEventNo, fLayout);
1763 fEventPlaySlider =
new TGHSlider(fEventControlFrame, 40, kSlider1 | kScaleNo,
kM_Slider_EventPlay);
1764 fEventPlaySlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1765 fEventPlaySlider->SetRange(0, 100);
1766 fEventPlaySlider->SetPosition(0);
1767 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandX, 5, 5, 5, 0);
1768 fWidgets->Add(fLayout);
1769 fEventControlFrame->AddFrame(fEventPlaySlider, fLayout);
1772 fEventPlayButtonFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1774 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 2, 2, 2, 2);
1775 fWidgets->Add(fLayout);
1776 fEventControlFrame->AddFrame(fEventPlayButtonFrame, fLayout);
1780 gClient->GetPicture(
"ButtonEventPrev.gif"),
1782 fPrevEventButton->SetToolTipText(
"Previous Event");
1783 fPrevEventButton->SetHeight(26);
1784 fPrevEventButton->SetWidth(25);
1785 fPrevEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1787 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 8, 0, 0, 4);
1788 fWidgets->Add(fLayout);
1789 fEventPlayButtonFrame->AddFrame(fPrevEventButton, fLayout);
1794 fNextEventButton->SetToolTipText(
"Next Event");
1795 fNextEventButton->SetHeight(26);
1796 fNextEventButton->SetWidth(26);
1797 fNextEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1799 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 10, 0, 4);
1800 fWidgets->Add(fLayout);
1801 fEventPlayButtonFrame->AddFrame(fNextEventButton, fLayout);
1805 gClient->GetPicture(
"ButtonEventPlay.gif"),
1807 fPlayEventButton->SetToolTipText(
"Play Event");
1808 fPlayEventButton->SetHeight(35);
1809 fPlayEventButton->SetWidth(34);
1810 fPlayEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1812 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 0, 0, 4);
1813 fWidgets->Add(fLayout);
1814 fEventPlayButtonFrame->AddFrame(fPlayEventButton, fLayout);
1818 gClient->GetPicture(
"ButtonEventReturn.gif"),
1820 fFirstEventButton->SetToolTipText(
"First Event");
1821 fFirstEventButton->SetHeight(35);
1822 fFirstEventButton->SetWidth(25);
1823 fFirstEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1825 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 8, 0, 4);
1826 fWidgets->Add(fLayout);
1827 fEventPlayButtonFrame->AddFrame(fFirstEventButton, fLayout);
1830 fEventPlayTextFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1831 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 2, 2, 2, 2);
1832 fWidgets->Add(fLayout);
1833 fEventControlFrame->AddFrame(fEventPlayTextFrame, fLayout);
1835 fEventPlayTextLabel =
new TGLabel(fEventPlayTextFrame,
"Prev,Next,Play/Stop,Return");
1836 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 4, 2, 5);
1837 fWidgets->Add(fLayout);
1838 fEventPlayTextFrame->AddFrame(fEventPlayTextLabel, fLayout);
1842 fEventPlaySpeedFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1843 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 4, 4, 4, 4);
1844 fWidgets->Add(fLayout);
1845 fEventControlFrame->AddFrame(fEventPlaySpeedFrame, fLayout);
1848 fNumEntryEventPlaySpeed =
new TGNumberEntry(fEventPlaySpeedFrame,(Double_t)this->
GetEventPlaySpeed()/1000.0,4,
1850 (TGNumberFormat::EStyle) 1,(TGNumberFormat::EAttribute) 1);
1851 fNumEntryEventPlaySpeed->SetHeight(20);
1853 fNumEntryEventPlaySpeed->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1854 fNumEntryEventPlaySpeed->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1855 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1856 fWidgets->Add(fLayout);
1857 fEventPlaySpeedFrame->AddFrame(fNumEntryEventPlaySpeed, fLayout);
1860 fEventPlaySpeedLabel =
new TGLabel(fEventPlaySpeedFrame,
" sec/event ");
1861 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 4, 10);
1862 fWidgets->Add(fLayout);
1863 fEventPlaySpeedFrame->AddFrame(fEventPlaySpeedLabel, fLayout);
1918 tf = fTabs->AddTab(
"REC");
1920 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1923 fFrameHeader =
new TGGroupFrame(tf,
"Header");
1924 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
1925 fWidgets->Add(fLayout);
1926 tf->AddFrame(fFrameHeader, fLayout);
1927 fChkBtnHeaderGlobal =
new TGCheckButton(fFrameHeader,
"Header",
kM_Header_Global);
1928 fFrameHeader->AddFrame(fChkBtnHeaderGlobal);
1929 fChkBtnHeaderGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1932 fFrameHits =
new TGGroupFrame(tf,
"Hits");
1933 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
1934 fWidgets->Add(fLayout);
1935 tf->AddFrame(fFrameHits, fLayout);
1939 fChkBtnCgemHitsGlobal =
new TGCheckButton(fFrameHits,
"CGEM hits",
kM_CgemHits_Global);
1940 fFrameHits->AddFrame(fChkBtnCgemHitsGlobal);
1942 fChkBtnCgemHitsXStrip =
new TGCheckButton(fFrameHits,
" X-strips ",
kM_CgemHits_XStrip);
1943 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1944 fWidgets->Add(fLayout);
1945 fFrameHits->AddFrame(fChkBtnCgemHitsXStrip, fLayout);
1947 fChkBtnCgemHitsVStrip =
new TGCheckButton(fFrameHits,
" V-strips ",
kM_CgemHits_VStrip);
1948 fFrameHits->AddFrame(fChkBtnCgemHitsVStrip, fLayout);
1951 fFrameHits->AddFrame(fChkBtnCgemHitsClusters, fLayout);
1953 fChkBtnCgemHitsFiredHL =
new TGCheckButton(fFrameHits,
" Highlight fired strips ",
kM_CgemHits_FiredHL);
1954 fFrameHits->AddFrame(fChkBtnCgemHitsFiredHL, fLayout);
1958 fChkBtnMdcHitsGlobal =
new TGCheckButton(fFrameHits,
"Mdc hits",
kM_MdcHits_Global);
1959 fFrameHits->AddFrame(fChkBtnMdcHitsGlobal);
1961 fChkBtnTofHitsGlobal =
new TGCheckButton(fFrameHits,
"Tof hits",
kM_TofHits_Global);
1962 fFrameHits->AddFrame(fChkBtnTofHitsGlobal);
1964 fChkBtnTofHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_TofHits_East);
1965 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1966 fWidgets->Add(fLayout);
1967 fFrameHits->AddFrame(fChkBtnTofHitsEast, fLayout);
1969 fChkBtnTofHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_TofHits_Barrel);
1970 fFrameHits->AddFrame(fChkBtnTofHitsBarrel, fLayout);
1972 fChkBtnTofHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_TofHits_West);
1973 fFrameHits->AddFrame(fChkBtnTofHitsWest, fLayout);
1975 fChkBtnEmcHitsGlobal =
new TGCheckButton(fFrameHits,
"Emc hits",
kM_EmcHits_Global);
1976 fFrameHits->AddFrame(fChkBtnEmcHitsGlobal);
1978 fChkBtnEmcHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_EmcHits_East);
1979 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1980 fWidgets->Add(fLayout);
1981 fFrameHits->AddFrame(fChkBtnEmcHitsEast, fLayout);
1983 fChkBtnEmcHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_EmcHits_Barrel);
1984 fFrameHits->AddFrame(fChkBtnEmcHitsBarrel, fLayout);
1986 fChkBtnEmcHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_EmcHits_West);
1987 fFrameHits->AddFrame(fChkBtnEmcHitsWest, fLayout);
1989 fChkBtnEmcHitsSide =
new TGCheckButton(fFrameHits,
" Side ",
kM_EmcHits_Side);
1990 fFrameHits->AddFrame(fChkBtnEmcHitsSide, fLayout);
1992 fChkBtnMucHitsGlobal =
new TGCheckButton(fFrameHits,
"Muc hits",
kM_MucHits_Global);
1993 fFrameHits->AddFrame(fChkBtnMucHitsGlobal);
1995 fChkBtnMucHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_MucHits_East);
1996 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1997 fWidgets->Add(fLayout);
1998 fFrameHits->AddFrame(fChkBtnMucHitsEast, fLayout);
2000 fChkBtnMucHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_MucHits_Barrel);
2001 fFrameHits->AddFrame(fChkBtnMucHitsBarrel, fLayout);
2003 fChkBtnMucHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_MucHits_West);
2004 fFrameHits->AddFrame(fChkBtnMucHitsWest, fLayout);
2007 fChkBtnCgemHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2008 fChkBtnCgemHitsXStrip->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2009 fChkBtnCgemHitsVStrip->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2010 fChkBtnCgemHitsClusters->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2011 fChkBtnCgemHitsFiredHL->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2012 fChkBtnMdcHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2013 fChkBtnTofHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2014 fChkBtnTofHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2015 fChkBtnTofHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2016 fChkBtnTofHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2017 fChkBtnEmcHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2018 fChkBtnEmcHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2019 fChkBtnEmcHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2020 fChkBtnEmcHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2021 fChkBtnEmcHitsSide ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2022 fChkBtnMucHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2023 fChkBtnMucHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2024 fChkBtnMucHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2025 fChkBtnMucHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2028 fFrameTracks =
new TGGroupFrame(tf,
"Tracks");
2029 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
2030 fWidgets->Add(fLayout);
2031 tf->AddFrame(fFrameTracks, fLayout);
2033 fChkBtnTracksGlobal =
new TGCheckButton(fFrameTracks,
"REC Tracks",
kM_Tracks_Global);
2034 fFrameTracks->AddFrame(fChkBtnTracksGlobal);
2036 fChkBtnTracksMdc =
new TGCheckButton(fFrameTracks,
" Mdc && CGEM ",
kM_Tracks_Mdc);
2037 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2038 fWidgets->Add(fLayout);
2039 fFrameTracks->AddFrame(fChkBtnTracksMdc, fLayout);
2041 fChkBtnTracksTof =
new TGCheckButton(fFrameTracks,
" Tof ",
kM_Tracks_Tof);
2042 fFrameTracks->AddFrame(fChkBtnTracksTof, fLayout);
2044 fChkBtnTracksEmc =
new TGCheckButton(fFrameTracks,
" Emc ",
kM_Tracks_Emc);
2045 fFrameTracks->AddFrame(fChkBtnTracksEmc, fLayout);
2047 fChkBtnTracksMuc =
new TGCheckButton(fFrameTracks,
" Muc ",
kM_Tracks_Muc);
2048 fFrameTracks->AddFrame(fChkBtnTracksMuc, fLayout);
2050 fChkBtnTracksExt =
new TGCheckButton(fFrameTracks,
" Ext ",
kM_Tracks_Ext);
2051 fFrameTracks->AddFrame(fChkBtnTracksExt, fLayout);
2053 fChkBtnTracksGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2054 fChkBtnTracksMdc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2055 fChkBtnTracksTof->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2056 fChkBtnTracksEmc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2057 fChkBtnTracksMuc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2058 fChkBtnTracksExt->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2061 fChkBtnMCTruthTrack =
new TGCheckButton(fFrameTracks,
"MC Truth Tracks",
kM_MC_TruthTrack);
2062 fFrameTracks->AddFrame(fChkBtnMCTruthTrack);
2063 fChkBtnMCTruthTrack->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2068 tf = fTabs->AddTab(
"Detector");
2069 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
2072 fFrameSubDetector =
new TGGroupFrame(tf,
"Sub-Detector");
2075 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2076 fWidgets->Add(fLayout);
2077 tf->AddFrame(fFrameSubDetector, fLayout);
2080 fChkBtnCgemGlobal =
new TGCheckButton(fFrameSubDetector,
"CGEM",
kM_Cgem_Global);
2081 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2082 fFrameSubDetector->AddFrame(fChkBtnCgemGlobal, fLayout);
2083 fChkBtnCgemGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2085 fChkBtnCgemLayers =
new TGCheckButton(fFrameSubDetector,
"Layers",
kM_Cgem_Layers);
2086 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2087 fFrameSubDetector->AddFrame(fChkBtnCgemLayers, fLayout);
2088 fChkBtnCgemLayers->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2090 fChkBtnCgemXStrips =
new TGCheckButton(fFrameSubDetector,
"X-strips",
kM_Cgem_XStrips);
2091 fFrameSubDetector->AddFrame(fChkBtnCgemXStrips, fLayout);
2092 fChkBtnCgemXStrips->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2094 fChkBtnCgemVStrips =
new TGCheckButton(fFrameSubDetector,
"V-strips",
kM_Cgem_VStrips);
2095 fFrameSubDetector->AddFrame(fChkBtnCgemVStrips, fLayout);
2096 fChkBtnCgemVStrips->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2099 fChkBtnMdcGlobal =
new TGCheckButton(fFrameSubDetector,
"Mdc",
kM_Mdc_Global);
2100 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2101 fFrameSubDetector->AddFrame(fChkBtnMdcGlobal, fLayout);
2102 fChkBtnMdcGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2104 fChkBtnMdcTubes =
new TGCheckButton(fFrameSubDetector,
"Tubes",
kM_Mdc_Tubes);
2105 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2106 fFrameSubDetector->AddFrame(fChkBtnMdcTubes, fLayout);
2107 fChkBtnMdcTubes->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2109 fChkBtnMdcWires =
new TGCheckButton(fFrameSubDetector,
"Wires",
kM_Mdc_Wires);
2110 fFrameSubDetector->AddFrame(fChkBtnMdcWires, fLayout);
2111 fChkBtnMdcWires->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2114 fChkBtnTofGlobal =
new TGCheckButton(fFrameSubDetector,
"Tof",
kM_Tof_Global);
2115 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2116 fFrameSubDetector->AddFrame(fChkBtnTofGlobal, fLayout);
2117 fChkBtnTofGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2119 fChkBtnTofEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Tof_East);
2120 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2121 fFrameSubDetector->AddFrame(fChkBtnTofEast, fLayout);
2122 fChkBtnTofEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2124 fChkBtnTofBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Tof_Barrel);
2125 fFrameSubDetector->AddFrame(fChkBtnTofBarrel, fLayout);
2126 fChkBtnTofBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2128 fChkBtnTofWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Tof_West);
2129 fFrameSubDetector->AddFrame(fChkBtnTofWest, fLayout);
2130 fChkBtnTofWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2133 fChkBtnEmcGlobal =
new TGCheckButton(fFrameSubDetector,
"Emc",
kM_Emc_Global);
2134 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2135 fFrameSubDetector->AddFrame(fChkBtnEmcGlobal, fLayout);
2136 fChkBtnEmcGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2138 fChkBtnEmcEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Emc_East);
2139 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2140 fFrameSubDetector->AddFrame(fChkBtnEmcEast, fLayout);
2141 fChkBtnEmcEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2143 fChkBtnEmcBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Emc_Barrel);
2144 fFrameSubDetector->AddFrame(fChkBtnEmcBarrel, fLayout);
2145 fChkBtnEmcBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2147 fChkBtnEmcWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Emc_West);
2148 fFrameSubDetector->AddFrame(fChkBtnEmcWest, fLayout);
2149 fChkBtnEmcWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2151 fChkBtnEmcSide =
new TGCheckButton(fFrameSubDetector,
"Side ",
kM_Emc_Side);
2152 fFrameSubDetector->AddFrame(fChkBtnEmcSide, fLayout);
2153 fChkBtnEmcSide->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2156 fChkBtnMucGlobal =
new TGCheckButton(fFrameSubDetector,
"Muc",
kM_Muc_Global);
2157 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2158 fFrameSubDetector->AddFrame(fChkBtnMucGlobal, fLayout);
2159 fChkBtnMucGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2161 fChkBtnMucEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Muc_East);
2162 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2163 fFrameSubDetector->AddFrame(fChkBtnMucEast, fLayout);
2164 fChkBtnMucEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2166 fChkBtnMucBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Muc_Barrel);
2167 fFrameSubDetector->AddFrame(fChkBtnMucBarrel, fLayout);
2168 fChkBtnMucBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2170 fChkBtnMucWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Muc_West);
2171 fFrameSubDetector->AddFrame(fChkBtnMucWest, fLayout);
2172 fChkBtnMucWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2174 fChkBtnMucStrips =
new TGCheckButton(fFrameSubDetector,
"Strips",
kM_Muc_Strips);
2175 fFrameSubDetector->AddFrame(fChkBtnMucStrips, fLayout);
2176 fChkBtnMucStrips->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2179 fFrameOthers =
new TGGroupFrame (tf,
"Others");
2180 fLayout =
new TGLayoutHints (kLHintsExpandX, 15, 15, 15, 15);
2181 fWidgets->Add(fLayout);
2182 tf->AddFrame (fFrameOthers, fLayout);
2184 fChkBtnBeamPipe =
new TGCheckButton (fFrameOthers,
"Beam Pipe",
kM_BeamPipe);
2185 fFrameOthers->AddFrame (fChkBtnBeamPipe);
2186 fChkBtnBeamPipe->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2188 fChkBtnZRPlaneOnXY =
new TGCheckButton (fFrameOthers,
"ZR plane on XY",
kM_ZRPlaneOnXY);
2189 fFrameOthers->AddFrame (fChkBtnZRPlaneOnXY);
2190 fChkBtnZRPlaneOnXY->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2192 fChkBtnAxis =
new TGCheckButton (fFrameOthers,
"Axis",
kM_Axis);
2193 fFrameOthers->AddFrame (fChkBtnAxis);
2194 fChkBtnAxis->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2199 tf = fTabs->AddTab(
"Others");
2200 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
2203 fFrameMdcMatch =
new TGGroupFrame(tf,
"Mdc Status");
2204 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2205 fWidgets->Add(fLayout);
2206 tf->AddFrame(fFrameMdcMatch, fLayout);
2209 fChkBtnMdcTMatchGlobal->SetState(kButtonDown);
2211 fFrameMdcMatch->AddFrame(fChkBtnMdcTMatchGlobal);
2212 fChkBtnMdcTMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2215 fChkBtnMdcQMatchGlobal->SetState(kButtonDown);
2217 fFrameMdcMatch->AddFrame(fChkBtnMdcQMatchGlobal);
2218 fChkBtnMdcQMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2221 fChkBtnMdcQOverflowGlobal->SetState(kButtonUp);
2223 fFrameMdcMatch->AddFrame(fChkBtnMdcQOverflowGlobal);
2224 fChkBtnMdcQOverflowGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2228 fChkBtnMdcColorfulWireGlobal->SetState(kButtonUp);
2229 fFrameMdcMatch->AddFrame(fChkBtnMdcColorfulWireGlobal);
2230 fChkBtnMdcColorfulWireGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2234 fChkBtnMdcTimeSubEvTimeGlobal->SetState(kButtonUp);
2235 fFrameMdcMatch->AddFrame(fChkBtnMdcTimeSubEvTimeGlobal);
2236 fChkBtnMdcTimeSubEvTimeGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2239 fFrameTofMatch =
new TGGroupFrame(tf,
"Tof TQ Match");
2240 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2241 fWidgets->Add(fLayout);
2242 tf->AddFrame(fFrameTofMatch, fLayout);
2245 fChkBtnTofTMatchGlobal->SetState(kButtonDown);
2247 fFrameTofMatch->AddFrame(fChkBtnTofTMatchGlobal);
2248 fChkBtnTofTMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2251 fChkBtnTofQMatchGlobal->SetState(kButtonDown);
2253 fFrameTofMatch->AddFrame(fChkBtnTofQMatchGlobal);
2254 fChkBtnTofQMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2257 fFrameMagnetic =
new TGGroupFrame(tf,
"Magnetic Field(Tesla)");
2258 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2259 fWidgets->Add(fLayout);
2260 tf->AddFrame(fFrameMagnetic, fLayout);
2263 fNumEntryMagnetic =
new TGNumberEntry(fFrameMagnetic,
2266 TGNumberFormat::kNESRealTwo,
2267 TGNumberFormat::kNEAAnyNumber);
2268 fNumEntryMagnetic->SetHeight(20);
2269 fNumEntryMagnetic->SetNumber(1.0);
2270 fNumEntryMagnetic->GetNumberEntry()
2271 ->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
2272 fNumEntryMagnetic->GetNumberEntry()
2273 ->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
2274 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
2275 fWidgets->Add(fLayout);
2276 fFrameMagnetic->AddFrame(fNumEntryMagnetic, fLayout);
2279 for (Int_t iTab = 0; iTab < fTabs->GetNumberOfTabs(); iTab++) {
2280 fTabs->GetTabTab(iTab)->SetBackgroundPixmap(
GetPic(
"8.gif"));
2284void BesClient::SetMdcQNotOverflow(Bool_t input){
2291void BesClient::SetMdcTFire(Bool_t input){
2297void BesClient::SetMdcQFire(Bool_t input){
2303void BesClient::SetMdcColorfulWire(Bool_t input){
2309void BesClient::SetMdcTimeSubEvTime(Bool_t input){
2315void BesClient::SetTofTMatch(Bool_t input){
2321void BesClient::SetTofQMatch(Bool_t input){
2331 if (gDebug) cout <<
"BesClient::InitLocal called!" << endl;
2334 fWidgets =
new TList();
2342 fAutoDisplayEventTimer =
new TTimer(fEventPlaySpeed);
2343 Connect(fAutoDisplayEventTimer,
"Timeout()",
"BesClient",
this,
"AutoDisplayEventCommand()");
2345 fAutoRotateTimer =
new TTimer((Int_t)1000/fRotateFPS);
2346 Connect(fAutoRotateTimer,
"Timeout()",
"BesClient",
this,
"AutoRotateCommand()");
2349 new TColor(1001, 1.0, 1.0, 225/255.0);
2351 new TColor(1002, 227/255.0, 186/255.0, 227/255.0);
2353 new TColor(1003, 232/255.0, 234/255.0, 117/255.0);
2355 new TColor(1004, 254/255.0, 216/255.0, 31/255.0);
2357 new TColor(1005, 175/255.0, 192/255.0, 227/255.0);
2359 new TColor(1006, 192/255.0, 227/255.0, 226/255.0);
2361 new TColor(1007, 225/255.0, 199/255.0, 162/255.0);
2369 if (gDebug) cout <<
"BesClient::InitParameter called!" << endl;
2372 fWindowWidth = 1000;
2373 fWindowHeight = 710;
2375 fBesVisPath = TString(getenv(
"BESVISLIBROOT"));
2377 fEventPlaySpeed = 1000;
2378 fAutoDisplayEvent = kFALSE;
2380 for (Int_t i = 0; i < 3; i++) {
2387 fRotateSpeed = 10.0;
2390 fAutoRotate = kFALSE;
2391 fAutoRotateClockWise = 0;
2392 fAutoRotateTheta = 0;
2402 TString docfile = fBesVisPath +
"/docs/help.txt";
2403 ifstream ifile(docfile.Data());
2408 while ((ch = ifile.get()) != EOF)
2410 ss << static_cast<char>(ch);
2412 f_HelpText = ss.str();
2416 docfile = fBesVisPath +
"/docs/geom_sel.txt";
2424 ifstream ifile(geomsel_file);
2431 while ((ich = ifile.get()) != EOF)
2433 char ch =
static_cast<char>(ich);
2434 if (ch ==
'\n' || ch ==
'\r')
2437 if (line.length() == 0 || line.find(
'#') != string::npos)
2464 if (gDebug) cout <<
"BesClient::InitConnections called!" << endl;
2467 Connect((TCanvas*)fEmbeddedCanvas->GetCanvas(),
"ProcessedEvent(Int_t, Int_t, Int_t, TObject*)",
"BesClient",
2468 this,
"ExecuteEvent(Int_t, Int_t, Int_t, TObject*)");
2471 Connect(
"CloseWindow()",
"BesClient",
this,
"CloseWindow()");
2496 gInterpreter->DeleteGlobal(
this);
2505 fEmbeddedCanvas->GetCanvas()->EditorBar();
2519 cerr <<
"Menu item" <<
id <<
"selected" << endl;
2531 cout <<
"BesClient::HandleViewOptionMenu(), BesView does not exist in this pad" << endl;
2614 if ( fMenuViewOptionMdc->IsEntryChecked(
kM_Mdc_Tubes) ) {
2624 if ( fMenuViewOptionMdc->IsEntryChecked(
kM_Mdc_Wires) ) {
2644 if ( fMenuViewOptionTof->IsEntryChecked(
kM_Tof_East) ) {
2664 if ( fMenuViewOptionTof->IsEntryChecked(
kM_Tof_West) ) {
2684 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_East) ) {
2704 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_West) ) {
2714 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_Side) ) {
2734 if ( fMenuViewOptionMuc->IsEntryChecked(
kM_Muc_East) ) {
2754 if ( fMenuViewOptionMuc->IsEntryChecked(
kM_Muc_West) ) {
2794 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Mdc) ) {
2809 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Tof) ) {
2824 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Emc) ) {
2839 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Muc) ) {
2854 if ( fMenuViewOptionOthers->IsEntryChecked(
kM_BeamPipe) ) {
2874 if ( fMenuViewOptionOthers->IsEntryChecked(
kM_Axis) ) {
2875 fMenuViewOptionOthers->UnCheckEntry(
kM_Axis);
2878 fMenuViewOptionOthers->CheckEntry(
kM_Axis);
3098 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Mdc) ) {
3108 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Tof) ) {
3118 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Emc) ) {
3128 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Muc) ) {
3138 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Ext) ) {
3167 cerr <<
"MenuViewOption item" <<
id <<
"selected" << endl;
3174 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Modified();
3175 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Update();
3183 new TGMsgBox(gClient->GetRoot(),
this,
3185 gClient->GetPicture(
"mb_stop_s.xpm"),
3194 fStatusBar->SetText(msg, 1);
3202 fStatusBar->SetText(msg, 0);
3227 static TString GeoDir = fBesVisPath + TString(
"/geom/");
3229 fi.fFileTypes = OpenGeoTypes;
3230 fi.fIniDir = StrDup(GeoDir);
3232 sprintf(msg,
"Loading Geometry File");
3234 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3235 if (&fi == 0)
return;
3236 GeoDir = fi.fIniDir;
3248 if (fname.Length() == 0)
return;
3250 if (gDebug) cout << fname <<
" fname Length " << fname.Length() << endl;
3253 TString fpath, fpurename;
3254 if (fname.Contains(
"/"))
3256 Ssiz_t posLastSlash = fname.Last(
'/');
3259 fpath = fpath.Remove(posLastSlash+1, fname.Length()-posLastSlash-1);
3261 fpurename = fpurename.Remove(0, posLastSlash + 1);
3262 if (fpath.Length() == 0)
return;
3266 fpath = TString(
"");
3271 TString geompath = fBesVisPath + TString(
"/geom/");
3272 if (fname.BeginsWith(geompath))
3276 fCurGeom = fpurename;
3277 cout <<
"Open a default geometry " << fpurename.Data() << endl;
3281 fCurGeom = TString(
"");
3282 cout <<
"Open a user-defined geometry " << fpurename.Data() << endl;
3287 fCurGeom = TString(
"");
3288 cout <<
"Open a user-defined geometry " << fpurename.Data() << endl;
3302 if ( fname.EndsWith(
".gdml") ) {
3304 bool mrpc =
false, cgem =
false;
3305 fpurename.ToUpper();
3306 if (fpurename.Contains(
"MRPC")) mrpc =
true;
3307 if (fpurename.Contains(
"CGEM")) cgem =
true;
3315 if ( fname.EndsWith(
".root") ) {
3316 fGeoFile = TFile::Open(fname,
"read");
3318 TGeoVolume *volBes = (TGeoVolume*)(fGeoFile->Get(
"volBes"));
3327 this->
HandleError(
"This File is not a valid BesVis geometry file : \n TopVolume \"volBes\" not found!");
3328 sprintf(msg,
"This File is not a valid BesVis geometry file");
3348 this->
HandleError(
"Bes Geometry not found, Load from ROOT or GDML files first !");
3355 static TString EventDir(
".");
3358 fi.fIniDir = StrDup(EventDir);
3360 sprintf(msg,
"Saving Geometry ----> BUSY!");
3362 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3368 TString filename = fi.fFilename;
3370 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3371 TFile *f =
new TFile(filename.Data() ,
"RECREATE");
3377 this->
HandleError(
"TGeoVolume \"volBes\" not found !");
3391 sprintf(msg,
"Loading Event File");
3395 static TString EventDir(
".");
3398 fi.fIniDir = StrDup(EventDir);
3399 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3400 EventDir = fi.fIniDir;
3414 std::cout <<
"OpenEventFile: " << fname << std::endl;
3421 if (fname.EndsWith(
".root") || fname.EndsWith(
".rtraw") || fname.EndsWith(
".rec") || fname.EndsWith(
".dst"))
3424 if (fEventFile) fEventFile->Close();
3432 fEventFile = TFile::Open(fname,
"read");
3437 if (fname.EndsWith(
".rec")) isRecEvent =
true;
3438 else isRecEvent =
false;
3441 TString ttitle(fTitleText);
3442 ttitle.Append(
" - ");
3443 ttitle.Append(fname);
3444 SetWindowName(ttitle);
3448 fEventTree = (TTree*)fEventFile->Get(
"Event");
3453 Long64_t nEvents = fEventTree->GetEntries();
3459 if(f_bossMode ==
false)
3468 fEventTree->SetBranchAddress(
"TDigiEvent" , &fDigiEvent);
3469 fEventTree->SetBranchAddress(
"TRecEvent" , &fRecEvent_1);
3470 fEventTree->SetBranchAddress(
"TEvtHeader" , &fEvtHeader);
3471 fEventTree->SetBranchAddress(
"TDstEvent", &fDstEvent);
3473 fEventTree->SetBranchAddress(
"TMcEvent", &fMcEvent);
3475 GetEvent(fBesEventNo,
true, auto_sel_geom);
3476 fEventPlaySlider->SetRange(0, nEvents-1);
3477 fEventPlaySlider->SetPosition(0);
3481 fEventPlaySlider->SetRange(0, 0);
3482 fEventPlaySlider->SetPosition(0);
3487 this->
HandleError(
"This File is not a valid BesVis ROOT Event File : \n Event Tree \"Event\" not found!");
3488 sprintf(msg,
"This File contains no Event Tree \"Event\"");
3495 this->
HandleError(
"This File is not a valid BesVis ROOT Event File!");
3496 sprintf(msg,
"This File is not valid");
3513 static TString EventDir(
".");
3516 fi.fIniDir = StrDup(EventDir);
3518 sprintf(msg,
"Saving Picture ----> BUSY!");
3520 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3522 if ( fi.fFilename ) {
3523 TString filename = fi.fFilename;
3527 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3529 if ( filename.EndsWith(
"gif") || filename.EndsWith(
"GIF") ) {
3530 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"gif");
3532 else if ( filename.EndsWith(
"jpg") || filename.EndsWith(
"JPG") ) {
3533 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"jpg");
3535 else if ( filename.EndsWith(
"eps") || filename.EndsWith(
"EPS") ) {
3536 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"eps");
3538 else if ( filename.EndsWith(
"ps") || filename.EndsWith(
"PS") ) {
3539 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3541 else if ( filename.EndsWith(
"xpm") || filename.EndsWith(
"XPM") ) {
3542 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"xmp");
3544 else if ( filename.EndsWith(
"png") || filename.EndsWith(
"PNG") ) {
3545 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"png");
3547 else if ( filename.EndsWith(
"tiff") || filename.EndsWith(
"TIFF") ) {
3548 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"tiff");
3550 else if ( filename.EndsWith(
"cxx") || filename.EndsWith(
"CXX") ) {
3551 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"cxx");
3553 else if ( filename.EndsWith(
"xml") || filename.EndsWith(
"XML") ) {
3554 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"xml");
3556 else if ( filename.EndsWith(
"root") || filename.EndsWith(
"ROOT") ) {
3557 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"root");
3572 static TString PSEventDir(
".");
3575 fi.fIniDir = StrDup(PSEventDir);
3577 sprintf(msg,
"Saving Picture as PS ----> BUSY!");
3579 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3581 if ( fi.fFilename ) {
3582 TString filename = fi.fFilename;
3583 if ( filename.EndsWith(
"ps") || filename.EndsWith(
"PS") ) {
3584 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3588 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3600 Double_t x1, y1, x2, y2;
3607 fHomeX[iPad] = 0.5*(x1+x2);
3608 fHomeY[iPad] = 0.5*(y1+y2);
3618 Double_t x1, y1, x2, y2, dx, dy;
3628 gPad->Range(fHomeX[iPad]-0.5*dx, fHomeY[iPad]-0.5*dy, fHomeX[iPad]+0.5*dx, fHomeY[iPad]+0.5*dy);
3645 if (!fDisplay)
return;
3648 static TString EventDir(
".");
3651 fi.fIniDir = StrDup(EventDir);
3653 sprintf(msg,
"Saving Style ----> BUSY!");
3655 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3660 TString filename = fi.fFilename;
3662 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3663 ofstream fileMyConfig(filename.Data(), ios_base::out);
3666 fileMyConfig <<
"BesVisStyle";
3671 fileMyConfig << *status;
3678 fileMyConfig << *status;
3685 fileMyConfig << *status;
3690 for (
int i = 0; i < 3; ++i)
3696 fileMyConfig << *status;
3700 fileMyConfig.close();
3701 cout <<
"Save my style finished." << endl;
3715 if (!fDisplay)
return;
3718 static TString EventDir(
".");
3721 fi.fIniDir = StrDup(EventDir);
3723 sprintf(msg,
"Loading Style File");
3725 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3726 EventDir = fi.fIniDir;
3730 ifstream fileMyConfig(fi.fFilename);
3734 fileMyConfig >> header;
3735 if (header !=
"BesVisStyle")
3737 HandleError(
"This file is not a BesVis style file!");
3744 fileMyConfig >> status;
3751 fileMyConfig >> status;
3757 fileMyConfig >> status;
3762 for (
int i = 0; i < 3; ++i)
3768 fileMyConfig >> status;
3775 fileMyConfig.close();
3785 cout<<
"BesClient Loading PaletteAxis ... "<<endl;
3802 TRootHelpDialog * hd =
new TRootHelpDialog(
this,
"Help on BesVis...", 600, 400);
3803 hd->SetText(f_HelpText.c_str());
3811 fDisplayModeButton[0]->
SetPicture(gClient->GetPicture(
"DisplayMode2D.gif"));
3812 fDisplayModeButton[1]->
SetPicture(gClient->GetPicture(
"DisplayModeXY.gif"));
3813 fDisplayModeButton[2]->
SetPicture(gClient->GetPicture(
"DisplayModeZR.gif"));
3814 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3D.gif"));
3815 fDisplayModeButton[4]->
SetPicture(gClient->GetPicture(
"DisplayModeAll.gif"));
3817 fDisplayModeButton[5]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUF.gif"));
3818 fDisplayModeButton[6]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUFAll.gif"));
3820 for (Int_t i = 0; i < kNDisplayMode; i++) fDisplayModeButton[i]->
SetState(
false);
3846 TViewerX3D *x3d =
dynamic_cast<TViewerX3D*
>(gPad->GetViewer3D(
"x3d"));
3847 if (!x3d) cout <<
" x3d does not exist "<< endl;
3848 else x3d->ExecCommand(0,0,
'r');
3854 fDisplayModeButton[3]->
SetState(
true);
3855 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
3876 TGLViewer *ogl =
dynamic_cast<TGLViewer*
>(gPad->GetViewer3D(
"ogl"));
3879 ogl->SetResetCamerasOnUpdate(
false);
3880 ogl->SetClearColor(kWhite);
3882 else cout <<
" ogl does not exist " << endl;
3889 fDisplayModeButton[3]->
SetState(
true);
3890 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
3906 TGMainFrame::CloseWindow();
3907 gApplication->Terminate(0);
3917 Long64_t nEvents = fEventTree->GetEntries();
3918 if (i >= 0 && i < nEvents) {
3926 if (f_bossMode ==
true)
3928 TBranch *digiEvent = fEventTree->GetBranch(
"TDigiEvent");
3929 TBranch *evtHeader = fEventTree->GetBranch(
"TEvtHeader");
3931 TBranch *disTrack = fEventTree->GetBranch(
"TDisTrack");
3932 digiEvent->SetAddress(&fDigiEvent);
3934 disTrack->SetAddress(&fRecEvent);
3935 disTrack->GetEntry(i);
3936 digiEvent->GetEntry(i);
3937 evtHeader->GetEntry(i);
3941 if (f_bossMode ==
false)
3944 cout <<
"[DEBUG] Get Event Entry test begin" << endl;
3945 fEventTree->GetEntry(i);
3946 cout <<
"[DEBUG] Successfully get Event Entry" << endl;
3975 fBesRunNo = fEvtHeader->
getRunId();
3976 cout <<
"Run Number: " << fBesRunNo << endl;
3986 HandleError(
"There is no suitable delector geometry! Please select a geometry file.");
3991 cout <<
"Select geometry file: " << ret << endl;
3992 TString geomfile = fBesVisPath + TString(
"/geom/");
4000 if (fCurGeom.Length() > 0)
4002 TString ts_ret = TString(ret);
4003 if (ts_ret != fCurGeom)
4010 new TGMsgBox(gClient->GetRoot(),
this,
"BesVis",
4011 "Maybe you have selected an unsuitable detector geometry. Do you still want to use current geometry?\n Click [Yes] to use current geometry, and click [No] to reselect geometry automatically.",
4012 kMBIconExclamation, kMBYes | kMBNo, &clkbtn);
4013 if (clkbtn & kMBYes) fAutoGeom =
false;
4018 HandleError(
"There is no suitable delector geometry! Please select a geometry file.");
4023 cout <<
"Select geometry file: " << ret << endl;
4024 TString geomfile = fBesVisPath + TString(
"/geom/");
4041 cout<<
"WARNING:EsTimeCol size!=1, size="<<fRecEvent_1->
getEvTimeCol()->GetEntries()<<endl;
4052 cout <<
"BesClient Construct REC tracks" << endl;
4056 delete [] recTrack1;
4061 for (
int i = 0; i < no; i++){
4094 for (
int i = 0; i < no; i++){
4109 for (
int i = 0; i < no; i++){
4124 for (
int i = 0; i < no; i++){
4132 delete [] emcshower;
4139 for (
int i = 0; i < no; i++){
4147 delete[] cgemCluster;
4154 for (
int i = 0; i < NCluster; ++i)
4157 if (!cluster)
continue;
4163 cout <<
"\tTYPE: X-cluster" << endl;
4166 cout <<
"\tTYPE: V-cluster" << endl;
4169 cout <<
"\tTYPE XV-cluster" << endl;
4175 cout <<
"\tPhi: " << cluster->
getrecphi() << endl;
4176 cout <<
"\tV: " << cluster->
getrecv() << endl;
4187 cout <<
"BesClient Construct DST tracks" << endl;
4190 delete [] recTrack1;
4194 for (
int i = 0; i < no; i++)
4206 for (
int i = 0; i < no; i++)
4214 delete [] emcshower;
4218 for (
int i = 0; i < no; i++)
4230 for (
int i = 0; i < no; i++)
4241 fEvent->
SetEvent(fDigiEvent, fRecEvent, fEvtHeader, fRecEvTime, isRecEvent, fMcEvent);
4249 fAutoDisplayEvent = kFALSE;
4250 if (fAutoDisplayEventTimer) {
4251 fAutoDisplayEventTimer->TurnOff();
4252 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventPlay.gif"));
4256 s <<
"Request event entry " << i
4257 <<
" does not exist ! \n valid ("
4258 << 0 <<
"~" << nEvents - 1 <<
")";
4264 fAutoDisplayEvent = kFALSE;
4265 if (fAutoDisplayEventTimer) fAutoDisplayEventTimer->TurnOff();
4272 int semid, shmid,
n,
runNo;
4274 int sem_value_F, sem_value_O;
4277 if (fAutoDisplayEvent){
4278 if (fAutoDisplayEventTimer)
4279 fAutoDisplayEventTimer->TurnOn();
4280 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventStop.gif"));
4284 if ((semid = semget(f_pid, 2, 0)) == -1){
4285 perror(
"concumer -- access -- semget");
4312 if ((sem_value_O = semctl(semid,
OUTPUT_STORE, GETVAL, 0)) == -1){
4313 perror(
"Can not get OUTPUT_STORE");
4316 if (sem_value_O == 0)
return true;
4319 if (semop(semid, &
release, 1) == -1){
4320 perror(
"consumer -- increase -- freeSpace");
4323 std::cout <<
"read data error " << std::endl;
4329 if (semop(semid, &
acquire, 1) == -1){
4330 perror(
"consumer -- decrease -- storage");
4352 if (fCurrentEvent >= 1){
4359 fEvtHeader->
Clear();
4379 if (fEventFile == NULL){
4384 fEventFile->Close();
4415 if (semop(semid, &
release, 1) == -1){
4416 perror(
"consumer -- increase -- freeSpace");
4419 std::cout <<
"Current Event No. : " << fCurrentEvent++ << std::endl;
4446 if (!fEventTree)
return false;
4447 if (fBesEventNo + 1 >= fEventTree->GetEntries())
return false;
4451 if ( f_bossMode ==
false) {
4454 else if ( f_bossMode ==
true) {
4455 std::cout <<
"In Boss Mode, execute NextEvent()" << std::endl;
4458 if (!status) fBesEventNo--;
4467 if (!fEventTree)
return false;
4468 if (fBesEventNo <= 0)
return false;
4472 if ( f_bossMode ==
false){
4475 else if ( f_bossMode ==
true){
4477 this->
HandleError(
"Boss Mode can not get previous event!");
4479 if (!status) fBesEventNo++;
4488 if ( f_bossMode ==
false){
4492 else if ( f_bossMode ==
true){
4494 this->
HandleError(
"Boss Mode can not get first event!");
4504 if ( f_bossMode ==
false){
4505 fBesEventNo = fEventTree->GetEntries() - 1;
4508 else if ( f_bossMode ==
true){
4510 this->
HandleError(
"Boss Mode can not get last event!");
4520 fAutoDisplayEvent = !fAutoDisplayEvent;
4521 std::cout <<
"(AutoDisplayEvent)fAutoDisplayEvent: " << fAutoDisplayEvent << std::endl;
4522 if (fAutoDisplayEventTimer) {
4523 if (fAutoDisplayEvent) {
4524 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventStop.gif"));
4525 fAutoDisplayEventTimer->TurnOn();
4528 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventPlay.gif"));
4529 fAutoDisplayEventTimer->TurnOff();
4554 fAutoRotate = !fAutoRotate;
4557 fAutoRotateClockWise = 0;
4558 fAutoRotateTheta = 0;
4563 if (fAutoRotateTimer) {
4564 if (fAutoRotate) fAutoRotateTimer->TurnOn();
4565 else fAutoRotateTimer->TurnOff();
4573 if (fAutoRotateClockWise != 0) {
4577 if (fAutoRotateTheta != 0) {
4581 if (fAutoRotatePhi != 0) {
4585 if (fAutoRotatePsi != 0) {
4617 if (fDisplay->
GetPadXY()->GetView()) {
4618 phi = fDisplay->
GetPadXY()->GetView()->GetLongitude();
4619 phi += clockwise * fRotateStep;
4620 fDisplay->
GetPadXY()->GetView()->SetView(phi,
4621 fDisplay->
GetPadXY()->GetView()->GetLatitude(),
4622 fDisplay->
GetPadXY()->GetView()->GetPsi(), iret);
4626 if (fDisplay->
GetPadZR()->GetView()) {
4630 fDisplay->
GetPadZR()->GetView()->SetView(phi,
4631 fDisplay->
GetPadZR()->GetView()->GetLatitude(),
4632 fDisplay->
GetPadZR()->GetView()->GetPsi(), iret);
4645 Double_t theta = view->
GetLatitude() + pn*fRotateStep;
4677 Double_t psi = view->
GetPsi() + pn*fRotateStep;
4692 if ( entry->GetFirstChild() != 0 ) {
4694 if ( entry->IsOpen() ) {
4695 fEventListTree->CloseItem(entry);
4697 fEventListTree->OpenItem(entry);
4700 fEventListTree->HighlightItem(entry);
4701 gClient->NeedRedraw(fEventListTree);
4705 fRunItem = entry->GetParent();
4706 TString msg1(
"Displaying Run ");
4711 TString msg2(
"Run ");
4716 TCanvas *canvas = (TCanvas*)fEmbeddedCanvas->GetCanvas();
4743 if ( py <= 0 ) py = 1;
4780 fEmbeddedCanvas->GetCanvas()->Update();
4787 fEmbeddedCanvas->GetCanvas()->Update();
4792 fEmbeddedCanvas->GetCanvas()->Update();
4797 fEmbeddedCanvas->GetCanvas()->Update();
4802 fEmbeddedCanvas->GetCanvas()->Update();
4807 fEmbeddedCanvas->GetCanvas()->Update();
4812 fEmbeddedCanvas->GetCanvas()->Update();
4820 if ( gPad->GetName() != TString(
"PadHeader")) {
4821 TString info(sel->GetTitle());
4823 info.Append(sel->GetObjectInfo(px, py));
4840 TGButton *btn = (TGButton *) gTQSender;
4841 id = btn->WidgetId();
4850 fDisplay->
SetVisHeader(fChkBtnHeaderGlobal->GetState());
5052 this->SetMdcTFire(fChkBtnMdcTMatchGlobal->GetState());
5056 this->SetMdcQFire(fChkBtnMdcQMatchGlobal->GetState());
5064 this->SetMdcQNotOverflow(fChkBtnMdcQOverflowGlobal->GetState());
5068 this->SetMdcColorfulWire(fChkBtnMdcColorfulWireGlobal->GetState());
5072 this->SetMdcTimeSubEvTime(fChkBtnMdcTimeSubEvTimeGlobal->GetState());
5076 this->SetTofTMatch(fChkBtnTofTMatchGlobal->GetState());
5080 this->SetTofQMatch(fChkBtnTofQMatchGlobal->GetState());
5092 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Modified();
5093 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Update();
5422 fMenuViewOptionOthers->CheckEntry(
kM_Axis);
5423 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxisST.gif"));
5427 fMenuViewOptionOthers->UnCheckEntry(
kM_Axis);
5428 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxis.gif"));
5586 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeViewST.gif"));
5589 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeView.gif"));
5594 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelView.gif"));
5595 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveViewST.gif"));
5598 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelViewST.gif"));
5599 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveView.gif"));
5611 TGButton *btn = (TGButton *) gTQSender;
5612 id = btn->WidgetId();
5617 Int_t displayMode = 0;
5619 Double_t xmin=0.0, ymin=0.0, xmax=0.0, ymax=0.0;
5621 xmin = gPad->GetX1();
5622 ymin = gPad->GetY1();
5623 xmax = gPad->GetX2();
5624 ymax = gPad->GetY2();
5628 if (gPad) view =
dynamic_cast<BesView*
>(gPad->GetView());
5636 fLoadGeoFileButton->
SetPicture(gClient->GetPicture(
"ButtonLoadGeoFile.gif"));
5641 fOpenEventFileButton->
SetPicture(gClient->GetPicture(
"ButtonOpenEventFile.gif"));
5646 fSavePicAsButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAs.gif"));
5650 fSavePicAsPSButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAsPSHL.gif"));
5652 fEmbeddedCanvas->GetCanvas()->Print(
"besvis.ps",
"ps");
5653 fSavePicAsPSButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAsPS.gif"));
5658 if (view) fDisplay->
Refresh();
5664 if (view) view->
Reset();
5668 if (view) fDisplay->
Reset();
5673 fCursorButton[0]->
SetPicture(gClient->GetPicture(
"ButtonCursorPickST.gif"));
5675 fCursorButton[1]->
SetPicture(gClient->GetPicture(
"ButtonCursorHand.gif"));
5683 fCursorButton[0]->
SetPicture(gClient->GetPicture(
"ButtonCursorPick.gif"));
5685 fCursorButton[1]->
SetPicture(gClient->GetPicture(
"ButtonCursorHandST.gif"));
5694 if (view) view->
ZoomIn();
5707 fSaveMyConfigButton->
SetPicture(gClient->GetPicture(
"ButtonSaveMyConfig.gif"));
5712 fLoadMyConfigButton->
SetPicture(gClient->GetPicture(
"ButtonLoadMyConfig.gif"));
5717 fPaletteButton->
SetPicture(gClient->GetPicture(
"ButtonPalette.gif"));
5728 fShowInfoButton->
SetPicture(gClient->GetPicture(
"ButtonShowInfoST.gif"));
5732 fShowInfoButton->
SetPicture(gClient->GetPicture(
"ButtonShowInfo.gif"));
5740 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxisST.gif"));
5744 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxis.gif"));
5755 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeViewST.gif"));
5756 fFishEyeViewButton->
SetState(
true);
5759 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeView.gif"));
5760 fFishEyeViewButton->
SetState(
false);
5767 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelViewST.gif"));
5768 fParallelViewButton->
SetState(
true);
5769 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveView.gif"));
5770 fPerspectiveViewButton->
SetState(
false);
5781 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelView.gif"));
5782 fParallelViewButton->
SetState(
false);
5783 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveViewST.gif"));
5784 fPerspectiveViewButton->
SetState(
true);
5792 fX3DButton->
SetPicture(gClient->GetPicture(
"ButtonX3D.gif"));
5797 fOpenGLButton->
SetPicture(gClient->GetPicture(
"ButtonOpenGL.gif"));
5828 if (fAutoRotateClockWise != -1) {
5829 fAutoRotateClockWise = -1;
5832 else fAutoRotateClockWise = 0;
5839 if (fAutoRotateClockWise != 1) {
5840 fAutoRotateClockWise = 1;
5843 else fAutoRotateClockWise = 0;
5849 if (view) view->
Move(0,-10);
5855 if (view) view->
Move(0,10);
5859 if (view) view->
Move(-10,0);
5863 if (view) view->
Move(10,0);
5867 if (view) view->
Center();
5873 if (fAutoRotateTheta != 1) fAutoRotateTheta = 1;
5874 else fAutoRotateTheta = 0;
5881 if (fAutoRotateTheta != -1) fAutoRotateTheta = -1;
5882 else fAutoRotateTheta = 0;
5889 if (fAutoRotatePhi != 1) {
5891 fAutoRotateClockWise = 0;
5893 else fAutoRotatePhi = 0;
5900 if (fAutoRotatePhi != -1) {
5901 fAutoRotatePhi = -1;
5902 fAutoRotateClockWise = 0;
5904 else fAutoRotatePhi = 0;
5913 if (fAutoRotatePsi != 1) fAutoRotatePsi = 1;
5914 else fAutoRotatePsi = 0;
5924 if (fAutoRotatePsi != -1) fAutoRotatePsi = -1;
5925 else fAutoRotatePsi = 0;
5936 fDisplayModeButton[0]->
SetState(
true);
5937 fDisplayModeButton[0]->
SetPicture(gClient->GetPicture(
"DisplayMode2DST.gif"));
5944 fDisplayModeButton[1]->
SetState(
true);
5945 fDisplayModeButton[1]->
SetPicture(gClient->GetPicture(
"DisplayModeXYST.gif"));
5952 fDisplayModeButton[2]->
SetState(
true);
5953 fDisplayModeButton[2]->
SetPicture(gClient->GetPicture(
"DisplayModeZRST.gif"));
5960 fDisplayModeButton[3]->
SetState(
true);
5961 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
5968 fDisplayModeButton[4]->
SetState(
true);
5969 fDisplayModeButton[4]->
SetPicture(gClient->GetPicture(
"DisplayModeAllST.gif"));
5977 fDisplayModeButton[5]->
SetState(
true);
5978 fDisplayModeButton[5]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUFST.gif"));
5986 fDisplayModeButton[6]->
SetState(
true);
5987 fDisplayModeButton[6]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUFAllST.gif"));
5995 if (displayMode >= kNDisplayMode) displayMode = 0;
6000 switch (displayMode)
6003 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayMode2DST.gif"));
6006 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeXYST.gif"));
6009 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeZRST.gif"));
6012 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
6015 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeAllST.gif"));
6018 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUFST.gif"));
6021 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeCgemUFAllST.gif"));
6045 if (gDebug) cout <<
"BesClient::DoSlider called!" << endl;
6047 TGButton *btn = (TGButton *) gTQSender;
6048 Int_t
id = btn->WidgetId();
6056 fEventPlaySlider->SetPosition(slider);
6058 fBesEventNo = slider;
6090 TCanvas *canvas = (TCanvas*)fEmbeddedCanvas->GetCanvas();
6091 TPad *curPad = (TPad*)gPad;
6097 cout <<
"update xy view" << endl;
6099 else cout <<
"no xy view" << endl;
6105 cout <<
"update zr view" << endl;
6107 else cout <<
"no zr view" << endl;
6113 cout <<
"update 3d view" << endl;
6115 else cout <<
"no 3d view" << endl;
6118 for (
int i = 0; i < 3; ++i)
6124 cout <<
"update CGEM unfolded view, Layer" << i << endl;
6126 else cout <<
"no CGEM unfolded Layer" << i << endl;
6226 fZoomRatioNumber->SetNumber(view->
GetZoomRatio()*100.0);
6230 Double_t psi = view->
GetPsi();
6234 fViewAngleThetaNumber->SetNumber(theta);
6235 fViewAnglePhiNumber->SetNumber(phi);
6236 fViewAnglePsiNumber->SetNumber(psi);
6238 fViewAngleThetaSlider->SetPosition((Int_t)fViewAngleThetaNumber->GetNumber());
6239 fViewAnglePhiSlider->SetPosition((Int_t)fViewAnglePhiNumber->GetNumber());
6240 fViewAnglePsiSlider->SetPosition((Int_t)fViewAnglePsiNumber->GetNumber());
6242 fChkBtnAutoRotate->SetOn(fAutoRotate);
6250 if (gDebug) cout <<
"BesClient::ChangeFocus called!" << endl;
6252 if ( gTQSender == fNumEntryRunNo->GetNumberEntry() ) {
6253 fNumEntryEventNo->GetNumberEntry()->SelectAll();
6254 fNumEntryEventNo->GetNumberEntry()->SetFocus();
6256 else if ( gTQSender == fNumEntryEventPlaySpeed->GetNumberEntry() ) {
6257 fNumEntryEventPlaySpeed->GetNumberEntry()->SelectAll();
6258 fNumEntryEventPlaySpeed->GetNumberEntry()->SetFocus();
6260 else if ( gTQSender == fNumEntryMagnetic->GetNumberEntry() ) {
6261 fNumEntryMagnetic->GetNumberEntry()->SelectAll();
6262 fNumEntryMagnetic->GetNumberEntry()->SetFocus();
6271 if (gDebug) cout <<
"BesClient::ExecuteReturn called!" << endl;
6277 if ( gTQSender == fZoomRatioNumber ) {
6278 if (view) view->
SetZoomRatio(fZoomRatioNumber->GetNumber()/100.0);
6281 if ( gTQSender == fNumEntryEventNo->GetNumberEntry() ) {
6286 Long64_t tempno = fBesEventNo;
6287 fBesEventNo = fNumEntryEventNo->GetIntNumber();
6288 if (!this->
GetEvent(fBesEventNo)) fBesEventNo = tempno;
6291 else if ( gTQSender == fNumEntryEventPlaySpeed->GetNumberEntry() ) {
6292 fEventPlaySpeed = Int_t(fNumEntryEventPlaySpeed->GetNumber() * 1000);
6293 fAutoDisplayEventTimer->SetTime(fEventPlaySpeed);
6296 else if ( gTQSender == fNumEntryRotateSpeed ) {
6297 fRotateSpeed = fNumEntryRotateSpeed->GetNumber();
6299 cout <<
"fRotateSpeed " << fRotateSpeed <<
" fRotateStep " << fRotateStep << endl;
6303 else if ( gTQSender == fNumEntryRotateFPS->GetNumberEntry() ) {
6304 fRotateFPS = fNumEntryRotateFPS->GetIntNumber();
6306 fAutoRotateTimer->SetTime((Int_t)1000/fRotateFPS);
6307 cout <<
"fRotateFPS " << fRotateFPS <<
" fRotateStep " << fRotateStep << endl;
6310 else if ( gTQSender == fNumEntryMagnetic->GetNumberEntry() ) {
6313 GetEvent(fBesEventNo,
false,
false);
6317 else if ( gTQSender == fNumEntryRotateStep ) {
6318 fRotateStep = fNumEntryRotateStep->GetNumber();
6319 fRotateSpeed = fRotateStep * fRotateFPS;
6320 cout <<
"fRotateSpeed " << fRotateSpeed <<
" fRotateStep " << fRotateStep << endl;
6323 else if ( gTQSender == fViewAngleThetaNumber ) {
6329 else if ( gTQSender == fViewAnglePhiNumber ) {
6335 else if ( gTQSender == fViewAnglePsiNumber ) {
6341 fEmbeddedCanvas->RequestFocus();
6348 TString filePath = fBesVisPath;
6349 filePath +=
"/icons/";
6352 TASImage asImage(filePath);
6353 Pixmap_t pic = asImage.GetPixmap();
6361 return (!gSystem->AccessPathName(fname, kFileExists));
6367 Double_t range = max - min;
6372 while (input < min);
6379 while (input >= max);
6386 if ((TPad*)gPad == fDisplay->
GetPadXY())
return "XY view";
6387 else if ((TPad*)gPad == fDisplay->
GetPadZR())
return "ZR view";
6388 else if ((TPad*)gPad == fDisplay->
GetPad3D())
return "3D view";
6389 else if ((TPad*)gPad == fDisplay->
GetPadCgemUF(0))
return "CGEM unfolded layer 0";
6390 else if ((TPad*)gPad == fDisplay->
GetPadCgemUF(1))
return "CGEM unfolded layer 1";
6391 else if ((TPad*)gPad == fDisplay->
GetPadCgemUF(2))
return "CGEM unfolded layer 2";
6392 else return "Ready";
const char * OpenEventTypes[]
ClassImp(BesClient) const char *OpenGeoTypes[]
const char * StyleTypes[]
const char * SavePicTypes[]
const char * SaveGeoTypes[]
R__EXTERN BesCursor * gBesCursor
R__EXTERN BesEvent * gEvent
R__EXTERN BesGeometry * gBesGeometry
void cvtMucDst2MucRec(TRecMucTrack *dist, const TMucTrack *src)
void cvtMdcDst2MdcRec(TRecMdcTrack *dist, const TMdcTrack *src)
void cvtEmcDst2EmcRec(TRecEmcShower *dist, const TEmcTrack *src)
void cvtTofDst2TofRec(TRecTofTrack *dist, const TTofTrack *src)
string::const_iterator ptype
@ kM_Mdc_QNotOverflow_Global
@ kM_Mdc_ColorfulWire_Global
@ kM_Mdc_MdcTimeSubEvTime_Global
@ kM_Button_SwitchDisplayMode
@ kM_Button_ViewAnglePhiMinus
@ kM_Button_ViewAnglePsiNumber
@ kM_Button_ViewAnglePhiNumber
@ kM_Button_ViewResetAngle
@ kM_Slider_ViewAngleTheta
@ kM_Button_OpenEventFile
@ kM_Button_ViewAnglePhiPlus
@ kM_Button_DisplayMode2D
@ kM_Button_DisplayModeZR
@ kM_Button_ZoomRatioNumber
@ kM_Button_DisplayModeCgemUF
@ kM_Button_ViewMoveRight
@ kM_Button_DisplayMode3D
@ kM_Button_ViewMoveCenter
@ kM_Button_DisplayModeCgemUFAll
@ kM_Button_EventPlaySpeed
@ kM_Button_ViewClockWise
@ kM_Button_ViewAngleThetaMinus
@ kM_Button_ViewAnglePsiMinus
@ kM_Button_ViewAnglePsiPlus
@ kM_Button_DisplayModeXY
@ kM_Button_PerspectiveView
@ kM_Button_DisplayModeAll
@ kM_Button_ViewCounterClockWise
@ kM_Button_ViewAngleThetaPlus
@ kM_Button_ViewAngleThetaNumber
Int_t GetEventPlaySpeed()
virtual void CreateMainFrame()
virtual void CreateTitleBar()
virtual void UpdateAllView()
virtual void HandleMenu(Int_t id)
virtual void SetAllDisplayModeButtonUnHL()
virtual void CreateToolBar()
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
virtual void SavePicAsPS()
virtual void CreateDisplayModeBar()
virtual void HandleSliders(Int_t id)
virtual void CreateTabs()
virtual Bool_t LastEvent()
virtual void SaveMyConfig()
virtual void RotatePsi(int pn)
virtual void RotateClockWise(int clockwise)
virtual void CreateMenuBar()
BesClient(const TGWindow *p, const char *title, UInt_t width, UInt_t height, Option_t *option="", Int_t argc=0, char **argv=0)
virtual void RotateTheta(int pn)
virtual void RotatePhi(int pn)
virtual void HandleViewOptionMenu(Int_t id)
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
virtual void OpenEventFile()
virtual void HandleStatusBar(const char *msg)
virtual Pixmap_t GetPic(const char *file)
virtual void AutoRotateCommand()
virtual void UpdateStatus()
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
virtual void CloseWindow()
virtual void CreateHorizontalRuler()
virtual void InitGeoSelector(const char *geomsel_file)
virtual void InitConnections()
virtual void UpdateCurrentPad()
virtual void HandleError(const char *msg)
virtual void CreateCanvas()
virtual void HandleInfoBar(const char *msg)
virtual Bool_t FirstEvent()
virtual void LoadMdcPalette()
virtual Bool_t GetRecEvent()
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
virtual void AutoDisplayEvent()
virtual Bool_t NextEvent()
virtual void CreateStatusBar()
virtual void CreateUpButtonBar()
virtual void AutoDisplayEventCommand()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
virtual void ExecuteReturn()
virtual void LoadMyConfig()
virtual Bool_t PrevEvent()
virtual void HandleButtons(Int_t id=-1)
virtual Bool_t FileExists(TString fname)
virtual void SetState(Int_t id=-1)
virtual void AutoRotate()
virtual void OpenGeoFile(TString filename)
virtual void ChangeFocus()
virtual const char * GetCurrentPadString()
Double_t GetRotateSpeed()
virtual void InitParameter()
virtual void UpdateBesInputFields()
virtual void LoadGeoFile()
void SetType(EBESCursorType cursorType)
void SetShowInfo(Bool_t show)
void SetMagnetic(Double_t input)
virtual void SetCgemClusters(const TRecCgemCluster *recCluster, int ncluster)
virtual void SetEvent(TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TRecEvTime *recEvTime, Bool_t isRec, TMcEvent *mcEvt=0)
const char * getGeomFileNameFromRunNo(int run_no)
bool hasGeomFile(const char *fname)
void addGeomFile(const char *fname, int startno)
CgemROOTGeo * GetCgemROOTGeo()
EmcROOTGeo * GetEmcROOTGeo()
MdcROOTGeo * GetMdcROOTGeo()
virtual void SetPhysicalDefaultVis()
MucROOTGeo * GetMucROOTGeo()
TofROOTGeo * GetTofROOTGeo()
void Transfer(BesStatus *right, Bool_t set)
Bool_t IsPerspective() const
virtual void SetParallel()
virtual void GetRange(Float_t *min, Float_t *max)
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
virtual void SetPerspective()
void SetVisEmcGlobal(Bool_t input)
void SetVisMucHitsBarrel(Bool_t input)
Bool_t GetVisMucHitsWest()
void SetVisTofWest(Bool_t input)
BesStatus * GetStatusCurrent()
void SetVisEmcSide(Bool_t input)
void SetVisEmcHitsWest(Bool_t input)
Bool_t GetVisMucHitsGlobal()
void SetVisTofHitsBarrel(Bool_t input)
Bool_t GetVisCgemXStrips()
void SetVisEmcHitsGlobal(Bool_t input)
void SetVisEmcEast(Bool_t input)
Bool_t GetVisMucHitsEast()
void SetVisCgemVStrips(Bool_t input)
Bool_t GetVisCgemVStrips()
void SetVisTracksExt(Bool_t input)
void SetVisMdcHits(Bool_t input)
void SetVisTracksTof(Bool_t input)
void SetVisCgemHitsGlobal(Bool_t input)
void SetVisMucWest(Bool_t input)
Bool_t GetVisTracksGlobal()
void SetVisTracksMdc(Bool_t input)
Bool_t GetVisMdcHitsGlobal()
void SetVisMdcGlobal(Bool_t input)
void SetVisTofBarrel(Bool_t input)
BesStatus * GetStatus3D()
Bool_t GetVisCgemHitsXStrip()
void SetVisTofHitsWest(Bool_t input)
Bool_t GetVisEmcHitsBarrel()
Bool_t GetVisEmcHitsGlobal()
void Move(Int_t px, Int_t py)
void SetVisMucHitsEast(Bool_t input)
void SetVisMucEast(Bool_t input)
void SetVisTofHitsGlobal(Bool_t input)
virtual void UpdateView(Bool_t resetview=kFALSE)
void SetVisCgemXStrips(Bool_t input)
Bool_t GetVisCgemGlobal()
void SetVisCgemGlobal(Bool_t input)
void SetVisFull3DTof(Bool_t input)
Bool_t GetVisCgemHitsFiredHL()
Bool_t GetVisEmcHitsSide()
virtual char * GetObjectInfo(Int_t px, Int_t py) const
void SetVisMdcTubes(Bool_t input)
BesStatus * GetStatusZR()
Bool_t GetVisMucHitsBarrel()
void SetVisMucStrips(Bool_t input)
Bool_t GetFishEyeStatus()
void SetFishEye(Bool_t input=0)
void SetVisFull3DEmc(Bool_t input)
void SetVisTracksGlobal(Bool_t input)
void SetVisEmcHitsEast(Bool_t input)
BesStatus * GetStatusCgemUF(int layer)
Bool_t GetVisCgemHitsVStrip()
void SetVisTofGlobal(Bool_t input)
Bool_t GetVisEmcHitsWest()
void SetVisEmcHitsSide(Bool_t input)
EBESViewType GetViewType()
void SetVisMucHitsGlobal(Bool_t input)
void SetVisEmcBarrel(Bool_t input)
void SetVisTracksEmc(Bool_t input)
void SetVisCgemHitsXStrip(Bool_t input)
void SetVisFull3DCgem(Bool_t input)
void SetVisTofHitsEast(Bool_t input)
void SetVisZRPlaneOnXY(Bool_t input)
void SetVisTracksMuc(Bool_t input)
void SetVisAxis(Bool_t input)
void SetVisMdcWires(Bool_t input)
void SetVisCgemHitsClusters(Bool_t input)
void SetVisEmcHitsBarrel(Bool_t input)
BesStatus * GetStatusXY()
void SetVisCgemHitsVStrip(Bool_t input)
Bool_t GetVisTofHitsWest()
void SetVisCgemLayers(Bool_t input)
Bool_t GetVisTofHitsGlobal()
void SetVisFull3DMuc(Bool_t input)
Bool_t GetVisZRPlaneOnXY()
Bool_t GetVisCgemHitsClusters()
void SetVisFull3DMdc(Bool_t input)
void SetZoomRatio(Double_t ratio)
void SetVisBeamPipe(Bool_t input)
void SetVisTofEast(Bool_t input)
void SetVisCgemHitsFiredHL(Bool_t input)
void SetVisMCTruthTrack(Bool_t input)
Bool_t GetVisEmcHitsEast()
Bool_t GetVisCgemLayers()
void SetVisMdcHitsGlobal(Bool_t input)
void SetVisMucHitsWest(Bool_t input)
void SetVisMucBarrel(Bool_t input)
Bool_t GetVisCgemHitsGlobal()
void SetVisMucGlobal(Bool_t input)
Bool_t GetVisTofHitsBarrel()
void SetVisEmcWest(Bool_t input)
Bool_t GetVisMCTruthTrack()
Bool_t GetVisTofHitsEast()
BesGeometry * GetBesGeometry()
Bool_t GetVisHeader() const
virtual void InitGeometryFromGDML(const TString fPath, bool mrpc=false, bool cgem=false)
virtual void DrawHeader()
virtual void Draw(Option_t *option="")
TPad * GetPadCgemUF(int layer)
virtual void InitGeometryFromROOT(TGeoVolume *bes)
virtual void SetVisHeader(Bool_t val)
virtual void SwitchDisplayMode(Int_t mode)
virtual void SetCanvas(TCanvas *c=0)
void SetVisCgemDetector()
void SetVisEmcDetector()
Set Emc detector visibility;.
void SetDetector()
Set Detecor (what is detector depends on you)
void SetTFire(Bool_t input)
void SetMdcTimeSubEvTime(Bool_t input)
void SetQFire(Bool_t input)
void SetQNotOverflow(Bool_t input)
void SetColorfulWire(Bool_t input)
void SetVisMdcDetector()
Set Mdc default detector visibility;.
void SetDetector()
Draw Detecor (what is detector depends on you)
void SetDetector()
Set Detecor (what is detector depends on you)
void SetVisMucDetector()
Set Muc detector visibility;.
void addRecMdcTrack(TRecMdcTrack *Track)
Add a TkrTrack into the Mdc data collection.
void addTofTrack(TRecTofTrack *Track)
void addMucTrack(TRecMucTrack *Track)
Add a MucTrack into the TOF Data collection.
void addRecMdcHit(TRecMdcHit *Hit)
Add a Rec Mdc Hit into the Mdc data collection.
void addEmcShower(TRecEmcShower *Track)
Add a TkrTrack into the Emc data collection.
const TObjArray * getEmcTrackCol() const
retrieve the whole TObjArray of EmcTrack Data
const TEmcTrack * getEmcTrack(Int_t i) const
retrieve a EmcTrack from the collection, using the index into the array
const TObjArray * getMucTrackCol() const
retrieve the whole TObjArray of MucTrack Data
const TTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
const TMdcTrack * getMdcTrack(Int_t i) const
retrieve a Mdctrack from the collection, using the index into the array
const TObjArray * getTofTrackCol() const
retrieve the whole TObjArray of TofTrack Data
const TObjArray * getMdcTrackCol() const
retrieve the whole TObjArray of MdcTrack Data
void setTRecCgemCluster(const TRecCgemCluster *cgemcluster)
Int_t getsheetid(void) const
Int_t getlayerid(void) const
Double_t getrecphi(void) const
Int_t getflag(void) const
Double_t getrecv(void) const
Int_t getclusterid(void) const
void setTRecEmcShower(const TRecEmcShower *emcshower)
void setTRecMdcHit(const TRecMdcHit *mdchit)
void setTRecMdcTrack(const TRecMdcTrack *mdcTrk)
void setTRecMucTrack(const TRecMucTrack *muctrk)
void setTRecTofTrack(const TRecTofTrack *toftrk)
const TObjArray * getTofTrackCol() const
retrieve the whole TObjArray of TofTrack Data
const TObjArray * getEvTimeCol() const
const TRecTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TObjArray * getRecCgemClusterCol() const
retrive the whole TObjArray of RecCgemCluster Data
const TRecMdcTrack * getRecMdcTrack(Int_t i) const
retrieve a MdcTrack from the collection, using the index into the array
const TObjArray * getEmcShowerCol() const
retrieve the whole TObjArray of EmcShower Data
const TObjArray * getRecMdcTrackCol() const
retrieve the whole TObjArray of RecMdcTrack Data
const TRecCgemCluster * getRecCgemCluster(Int_t i) const
retrieve a RecCgemCluster from the collection,using the index into the array
const TRecEmcShower * getEmcShower(Int_t i) const
retrieve a EmcShower from the collection, using the index into the array */
const TObjArray * getMucTrackCol() const
retrieve the whole TObjArray of MucTrack Data
const TRecMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
const TRecMdcHit * getRecMdcHit(Int_t i) const
retrieve a RecMdcHit from the collection, using the index into the array
const TObjArray * getRecMdcHitCol() const
retrieve the whole TObjArray of RecMdcHit Data
void SetQMatch(Bool_t input)
void SetDetector()
Draw Detecor (what is detector depends on you)
void SetVisTofDetector()
Set Tof detector visibility;.
void SetTMatch(Bool_t input)