6#include "BesVisClient/BesClient.h"
7#include "BesVisClient/BesAboutHelp.h"
8#include "BesVisClient/BesMdcPalette.h"
9#include "BesVisLib/BesVisDisplay.h"
10#include "BesVisLib/BesCursor.h"
16#include <TRootEmbeddedCanvas.h>
18#include <TApplication.h>
19#include <TInterpreter.h>
24#include <TGeoManager.h>
28#include <TGStatusBar.h>
29#include <TGFileDialog.h>
30#include <TGNumberEntry.h>
32#include <TGProgressBar.h>
34#include <TGSplitter.h>
37#include <TGListTree.h>
39#include <TGButtonGroup.h>
40#include <TGTextEntry.h>
41#include <TGTextBuffer.h>
49#include <TViewerX3D.h>
52#include <TVirtualViewer3D.h>
55#include <TVirtualGL.h>
56#include <TVirtualGeoPainter.h>
57#include <TRootHelpDialog.h>
58#include <TRootDialog.h>
60#include "RootEventData/TRecTrackEvent.h"
61#include "RootEventData/TDigiEvent.h"
62#include "RootEventData/TDisTrack.h"
63#include "RootEventData/TRecEvTime.h"
64#include "BesVisLib/DstConvert.h"
86const char *OpenGeoTypes[] = {
"ROOT files",
"*.root",
87 "GDML files",
"*.gdml",
93 "ROOT files",
"*.root",
100 "rec files",
"*.rec",
101 "raw files",
"*.rtraw",
102 "dst files",
"*.dst",
103 "ROOT files",
"*.root",
126 "Text file",
"*.txt",
147 UInt_t width, UInt_t height, Option_t *option, Int_t argc,
char **argv) :
148 TGMainFrame(p, width, height) {
152 if ( gDebug ) cout <<
"BesClient ctor called" << endl;
176 fCurGeom = TString(
"");
191 this->SetBackgroundPixmap(
GetPic(
"background.gif"));
195 static char optstring[] =
"e:g:B:";
200 while ((optchar = getopt(argc, argv, optstring)) != -1)
205 cout <<
"Load Geometry file with arguments" << endl;
206 cout <<
"Geometry: " << f_geoFile << endl;
210 cout <<
"Load Event file with argments" << endl;
211 cout <<
"Evtfile: " << f_evtFile << endl;
216 cout <<
"Run in the Boss Framework: " << f_bossMode << endl;
217 cout <<
"parent pid: " << f_pid << endl;
220 cout <<
"Found an option that was not in optstring!" << endl;
226 if (f_evtFile.Length() == 0)
228 f_evtFile = argv[optind];
229 cout <<
"Load Event file with argments" << endl;
230 cout <<
"Evtfile: " << f_evtFile << endl;
238 if (f_bossMode ==
false)
241 if (f_geoFile.Length() != 0)
246 if (f_geoFile.Contains(
"/"))
249 f_geoFile = TString(
"");
254 if (!f_geoFile.EndsWith(
".root") && !f_geoFile.EndsWith(
".gdml"))
255 f_geoFile = TString(
"geom_") + f_geoFile + TString(
".root");
257 f_geoFile = fBesVisPath + TString(
"/geom/") + f_geoFile;
263 f_geoFile = TString(
"");
268 if (f_evtFile.Length() != 0)
279 f_evtFile = TString(
"");
288 else if (f_bossMode ==
true){
289 fAutoDisplayEvent = kTRUE;
291 cout <<
"Load event file: " << f_evtFile << endl;
305 cout <<
"BesClient dtor called" << endl;
323 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 0);
324 fWidgets->Add(fLayout);
325 this->AddFrame(fMenuBar, fLayout);
331 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 0, 0, 1);
332 fWidgets->Add(fLayout);
333 this->AddFrame(fUpButtonBarFrame, fLayout);
339 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsExpandX, 5, 5, 0, 0);
340 fWidgets->Add(fLayout);
341 this->AddFrame(fTitleFrame, fLayout);
347 fLayout =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0);
348 fWidgets->Add(fLayout);
349 this->AddFrame(fMainFrame, fLayout);
353 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 0, 0);
354 fWidgets->Add(fLayout);
355 this->AddFrame(fDisplayModeBarFrame, fLayout);
359 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 3, 0, 1, 0);
360 fWidgets->Add(fLayout);
361 this->AddFrame(fToolBarFrame, fLayout);
365 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0);
366 fWidgets->Add(fLayout);
367 this->AddFrame(fStatusBar, fLayout);
370 TString ttitle(
title);
372 ttitle.Append(gSystem->HostName());
373 SetWindowName(ttitle);
375 SetIconPixmap( (fBesVisPath + TString(
"/icons/LogoBesVisMini.gif")).Data() );
376 SetClassHints(
"BesVis",
"Bes Event Visualisation");
378 SetWMPosition(10, 10);
379 SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless);
381 Resize(GetDefaultSize());
382 Resize(width, height);
390 fLayout =
new TGLayoutHints(kLHintsExpandX, 2, 2, 0, 0);
391 fWidgets->Add(fLayout);
392 this->AddFrame(
new TGHorizontal3DLine(
this), fLayout);
402 fMenuBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
404 fMenuBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft,
406 fMenuBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsRight,
410 const TGPicture *viewGeometryIcon = gClient->GetPicture(
"viewGeometry.gif");
416 fMenuFile =
new TGPopupMenu(gClient->GetRoot());
422 fMenuFile->AddSeparator();
428 fMenuEdit =
new TGPopupMenu(gClient->GetRoot());
435 fMenuViewOptionHeader =
new TGPopupMenu(gClient->GetRoot());
441 fMenuViewOptionMdc =
new TGPopupMenu(gClient->GetRoot());
448 fMenuViewOptionTof =
new TGPopupMenu(gClient->GetRoot());
456 fMenuViewOptionEmc =
new TGPopupMenu(gClient->GetRoot());
465 fMenuViewOptionMuc =
new TGPopupMenu(gClient->GetRoot());
474 fMenuViewOptionFull3D =
new TGPopupMenu(gClient->GetRoot());
482 fMenuViewOptionOthers =
new TGPopupMenu(gClient->GetRoot());
483 fMenuViewOptionOthers->AddEntry(
"BeamPipe",
kM_BeamPipe);
485 fMenuViewOptionOthers->AddEntry(
"Axis",
kM_Axis);
490 fMenuViewOptionMdcHits =
new TGPopupMenu(gClient->GetRoot());
495 fMenuViewOptionTofHits =
new TGPopupMenu(gClient->GetRoot());
503 fMenuViewOptionEmcHits =
new TGPopupMenu(gClient->GetRoot());
512 fMenuViewOptionMucHits =
new TGPopupMenu(gClient->GetRoot());
520 fMenuViewOptionTracks =
new TGPopupMenu(gClient->GetRoot());
531 fMenuView =
new TGPopupMenu(gClient->GetRoot());
533 fMenuView->AddLabel(
"General");
534 fMenuView->AddSeparator();
535 fMenuView->AddPopup(
"Header",fMenuViewOptionHeader);
536 fMenuView->AddSeparator();
537 fMenuView->AddLabel(
"Detector", viewGeometryIcon);
538 fMenuView->AddSeparator();
539 fMenuView->AddPopup(
"Mdc",fMenuViewOptionMdc);
540 fMenuView->AddPopup(
"Tof",fMenuViewOptionTof);
541 fMenuView->AddPopup(
"Emc",fMenuViewOptionEmc);
542 fMenuView->AddPopup(
"Muc",fMenuViewOptionMuc);
544 fMenuView->AddPopup(
"Others",fMenuViewOptionOthers);
545 fMenuView->AddSeparator();
547 fMenuView->AddLabel(
"REC");
548 fMenuView->AddSeparator();
549 fMenuView->AddPopup(
"Mdc Hits",fMenuViewOptionMdcHits);
550 fMenuView->AddPopup(
"Tof Hits",fMenuViewOptionTofHits);
551 fMenuView->AddPopup(
"Emc Hits",fMenuViewOptionEmcHits);
552 fMenuView->AddPopup(
"Muc Hits",fMenuViewOptionMucHits);
553 fMenuView->AddPopup(
"Tracks",fMenuViewOptionTracks);
554 fMenuView->AddSeparator();
555 fMenuView->AddLabel(
"Special Views");
556 fMenuView->AddSeparator();
564 fMenuHelp =
new TGPopupMenu(gClient->GetRoot());
567 fMenuHelp->AddSeparator();
571 fMenuBar =
new BesGMenuBar(
this, 1, 1, kHorizontalFrame);
572 fMenuBar->SetBackgroundPixmap(
GetPic(
"MenuBarBckgnd.gif"));
574 fMenuBar->
AddPopup(
"&File", fMenuFile, fMenuBarFirstItemLayout);
576 fMenuBar->
AddPopup(
"&View", fMenuView, fMenuBarItemLayout);
577 fMenuBar->
AddPopup(
"&Help", fMenuHelp, fMenuBarLastItemLayout);
589 fMenuFile->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
590 fMenuEdit->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
591 fMenuHelp->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleMenu(Int_t)");
592 fMenuView->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
593 fMenuViewOptionHeader->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
594 fMenuViewOptionMdc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
595 fMenuViewOptionTof->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
596 fMenuViewOptionEmc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
597 fMenuViewOptionMuc->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
598 fMenuViewOptionFull3D->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
599 fMenuViewOptionOthers->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
600 fMenuViewOptionMdcHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
601 fMenuViewOptionTofHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
602 fMenuViewOptionEmcHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
603 fMenuViewOptionMucHits->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
604 fMenuViewOptionTracks->Connect(
"Activated(Int_t)",
"BesClient",
this,
"HandleViewOptionMenu(Int_t)");
638 fUpButtonBarFrame =
new TGCompositeFrame(
this, 300, 25, kHorizontalFrame);
639 fUpButtonBarFrame->SetBackgroundPixmap(
GetPic(
"UpButtonBarBckgnd.gif"));
641 fUpButtonBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 15, 0, 1, 2);
642 fUpButtonBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 2);
643 fUpButtonBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 13, 1, 2);
645 Int_t width = 23, height = 22;
647 Int_t nUpSplitter = 0;
650 for (Int_t i = 0; i < kNUpSplitter; i++) {
652 gClient->GetPicture(
"UpButtonSplitter.gif"));
653 fUpButtonSplitter[i]->SetHeight(20);
654 fUpButtonSplitter[i]->SetWidth(5);
655 fUpButtonSplitter[i]->
SetState(kButtonDisabled);
660 gClient->GetPicture(
"ButtonLoadGeoFile.gif"),
662 fLoadGeoFileButton->
SetPictureHL(gClient->GetPicture(
"ButtonLoadGeoFileHL.gif"));
663 fLoadGeoFileButton->SetToolTipText(
"Load Geometry File");
664 fLoadGeoFileButton->SetHeight(height);
665 fLoadGeoFileButton->SetWidth(width);
666 fLoadGeoFileButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
667 fUpButtonBarFrame->AddFrame(fLoadGeoFileButton, fUpButtonBarFirstItemLayout);
671 gClient->GetPicture(
"ButtonOpenEventFile.gif"),
673 fOpenEventFileButton->
SetPictureHL(gClient->GetPicture(
"ButtonOpenEventFileHL.gif"));
674 fOpenEventFileButton->SetToolTipText(
"Open Event File");
675 fOpenEventFileButton->SetHeight(height);
676 fOpenEventFileButton->SetWidth(width);
677 fOpenEventFileButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
678 fUpButtonBarFrame->AddFrame(fOpenEventFileButton, fUpButtonBarItemLayout);
682 gClient->GetPicture(
"ButtonSavePicAs.gif"),
684 fSavePicAsButton->
SetPictureHL(gClient->GetPicture(
"ButtonSavePicAsHL.gif"));
685 fSavePicAsButton->SetToolTipText(
"Save Picture as");
686 fSavePicAsButton->SetHeight(height);
687 fSavePicAsButton->SetWidth(width);
688 fSavePicAsButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
689 fUpButtonBarFrame->AddFrame(fSavePicAsButton, fUpButtonBarItemLayout);
693 gClient->GetPicture(
"ButtonSavePicAsPS.gif"),
695 fSavePicAsPSButton->
SetPictureHL(gClient->GetPicture(
"ButtonSavePicAsPSHL.gif"));
696 fSavePicAsPSButton->SetToolTipText(
"Save Picture as besvis.ps");
697 fSavePicAsPSButton->SetHeight(height);
698 fSavePicAsPSButton->SetWidth(width);
699 fSavePicAsPSButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
700 fUpButtonBarFrame->AddFrame(fSavePicAsPSButton, fUpButtonBarItemLayout);
703 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
708 gClient->GetPicture(
"ButtonRefresh.gif"),
710 fRefreshButton->
SetPictureHL(gClient->GetPicture(
"ButtonRefreshHL.gif"));
711 fRefreshButton->SetToolTipText(
"Refresh");
712 fRefreshButton->SetHeight(height);
713 fRefreshButton->SetWidth(width);
714 fRefreshButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
715 fUpButtonBarFrame->AddFrame(fRefreshButton, fUpButtonBarItemLayout);
719 gClient->GetPicture(
"ButtonResetCurrent.gif"),
721 fResetCurrentButton->
SetPictureHL(gClient->GetPicture(
"ButtonResetCurrentHL.gif"));
722 fResetCurrentButton->SetToolTipText(
"Reset Current Pad");
723 fResetCurrentButton->SetHeight(height);
724 fResetCurrentButton->SetWidth(width);
725 fResetCurrentButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
726 fUpButtonBarFrame->AddFrame(fResetCurrentButton, fUpButtonBarItemLayout);
730 gClient->GetPicture(
"ButtonResetAll.gif"),
732 fResetAllButton->
SetPictureHL(gClient->GetPicture(
"ButtonResetAllHL.gif"));
733 fResetAllButton->SetToolTipText(
"Reset All Pads");
734 fResetAllButton->SetHeight(height);
735 fResetAllButton->SetWidth(width);
736 fResetAllButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
737 fUpButtonBarFrame->AddFrame(fResetAllButton, fUpButtonBarItemLayout);
740 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
745 gClient->GetPicture(
"ButtonZoomOut.gif"),
747 fZoomOutButton->
SetPictureHL(gClient->GetPicture(
"ButtonZoomOutHL.gif"));
748 fZoomOutButton->SetToolTipText(
"Zoom Out");
749 fZoomOutButton->SetHeight(height);
750 fZoomOutButton->SetWidth(width);
751 fZoomOutButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
752 fUpButtonBarFrame->AddFrame(fZoomOutButton, fUpButtonBarItemLayout);
757 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
758 fZoomRatioNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
759 h = Int_t(fZoomRatioNumber->GetDefaultHeight()/1.2);
760 charw = fZoomRatioNumber->GetCharWidth(
"0123456");
761 w = charw * TMath::Abs(5) / 10 + 8 + 2 * h / 3 + 2;
763 fZoomRatioNumber->Resize(
w, h);
765 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsCenterY);
766 fWidgets->Add(fLayout);
767 fUpButtonBarFrame->AddFrame(fZoomRatioNumber, fLayout);
771 gClient->GetPicture(
"ButtonZoomRatioPercent.gif"));
772 fZoomRatioPercentButton->SetHeight(20);
773 fZoomRatioPercentButton->SetWidth(10);
774 fZoomRatioPercentButton->
SetState(kButtonDisabled);
775 fUpButtonBarFrame->AddFrame(fZoomRatioPercentButton, fUpButtonBarItemLayout);
779 gClient->GetPicture(
"ButtonZoomIn.gif"),
781 fZoomInButton->
SetPictureHL(gClient->GetPicture(
"ButtonZoomInHL.gif"));
782 fZoomInButton->SetToolTipText(
"Zoom In");
783 fZoomInButton->SetHeight(height);
784 fZoomInButton->SetWidth(width);
785 fZoomInButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
786 fUpButtonBarFrame->AddFrame(fZoomInButton, fUpButtonBarItemLayout);
790 gClient->GetPicture(
"ButtonCursorPickST.gif"),
793 fCursorButton[0]->
SetPictureHL(gClient->GetPicture(
"ButtonCursorPickHL.gif"));
794 fCursorButton[0]->SetToolTipText(
"Select Tool");
799 gClient->GetPicture(
"ButtonCursorHand.gif"),
801 fCursorButton[1]->
SetPictureHL(gClient->GetPicture(
"ButtonCursorHandHL.gif"));
802 fCursorButton[1]->SetToolTipText(
"Hand Tool");
804 for (
int i = 0; i < kNCursorState; i++) {
805 fCursorButton[i]->SetHeight(height);
806 fCursorButton[i]->SetWidth(width);
807 fCursorButton[i]->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
808 fUpButtonBarFrame->AddFrame(fCursorButton[i], fUpButtonBarItemLayout);
812 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
817 gClient->GetPicture(
"ButtonSwitchDisplayMode.gif"),
819 fSwitchDisplayModeButton->
SetPictureHL(gClient->GetPicture(
"ButtonSwitchDisplayModeHL.gif"));
820 fSwitchDisplayModeButton->SetToolTipText(
"Switch Display Mode");
821 fSwitchDisplayModeButton->SetHeight(height);
822 fSwitchDisplayModeButton->SetWidth(width);
823 fSwitchDisplayModeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
824 fUpButtonBarFrame->AddFrame(fSwitchDisplayModeButton, fUpButtonBarItemLayout);
828 gClient->GetPicture(
"ButtonSetHome.gif"),
830 fSetHomeButton->
SetPictureHL(gClient->GetPicture(
"ButtonSetHomeHL.gif"));
831 fSetHomeButton->SetToolTipText(
"Set home position");
832 fSetHomeButton->SetHeight(height);
833 fSetHomeButton->SetWidth(width);
834 fSetHomeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
835 fUpButtonBarFrame->AddFrame(fSetHomeButton, fUpButtonBarItemLayout);
839 gClient->GetPicture(
"ButtonGoHome.gif"),
841 fGoHomeButton->
SetPictureHL(gClient->GetPicture(
"ButtonGoHomeHL.gif"));
842 fGoHomeButton->SetToolTipText(
"Go to home position");
843 fGoHomeButton->SetHeight(height);
844 fGoHomeButton->SetWidth(width);
845 fGoHomeButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
846 fUpButtonBarFrame->AddFrame(fGoHomeButton, fUpButtonBarItemLayout);
850 gClient->GetPicture(
"ButtonSaveMyConfig.gif"),
852 fSaveMyConfigButton->
SetPictureHL(gClient->GetPicture(
"ButtonSaveMyConfigHL.gif"));
853 fSaveMyConfigButton->SetToolTipText(
"Save My Style");
854 fSaveMyConfigButton->SetHeight(height);
855 fSaveMyConfigButton->SetWidth(width);
856 fSaveMyConfigButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
857 fUpButtonBarFrame->AddFrame(fSaveMyConfigButton, fUpButtonBarItemLayout);
861 gClient->GetPicture(
"ButtonLoadMyConfig.gif"),
863 fLoadMyConfigButton->
SetPictureHL(gClient->GetPicture(
"ButtonLoadMyConfigHL.gif"));
864 fLoadMyConfigButton->SetToolTipText(
"Load My Style");
865 fLoadMyConfigButton->SetHeight(height);
866 fLoadMyConfigButton->SetWidth(width);
867 fLoadMyConfigButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
868 fUpButtonBarFrame->AddFrame(fLoadMyConfigButton, fUpButtonBarItemLayout);
872 gClient->GetPicture(
"ButtonPalette.gif"),
874 fPaletteButton->
SetPictureHL(gClient->GetPicture(
"ButtonPaletteHL.gif"));
875 fPaletteButton->SetToolTipText(
"Palette");
876 fPaletteButton->SetHeight(height);
877 fPaletteButton->SetWidth(width);
878 fPaletteButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
879 fUpButtonBarFrame->AddFrame(fPaletteButton, fUpButtonBarItemLayout);
882 fUpButtonBarFrame->AddFrame(fUpButtonSplitter[nUpSplitter], fUpButtonBarItemLayout);
887 gClient->GetPicture(
"ButtonHelp.gif"),
889 fHelpButton->
SetPictureHL(gClient->GetPicture(
"ButtonHelpHL.gif"));
890 fHelpButton->SetToolTipText(
"Help");
891 fHelpButton->SetHeight(height);
892 fHelpButton->SetWidth(width);
893 fHelpButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
894 fUpButtonBarFrame->AddFrame(fHelpButton, fUpButtonBarLastItemLayout);
901 fDisplayModeBarFrame =
new TGCompositeFrame(
this, 300, 16, kHorizontalFrame);
902 fDisplayModeBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 0, 0);
910 fDisplayModeButton[0]->
SetState(
true);
911 fDisplayModeButton[1]->
SetState(
false);
912 fDisplayModeButton[2]->
SetState(
false);
913 fDisplayModeButton[3]->
SetState(
false);
914 fDisplayModeButton[4]->
SetState(
false);
916 fDisplayModeButton[0]->
SetPictureHL(gClient->GetPicture(
"DisplayMode2DHL.gif"));
917 fDisplayModeButton[1]->
SetPictureHL(gClient->GetPicture(
"DisplayModeXYHL.gif"));
918 fDisplayModeButton[2]->
SetPictureHL(gClient->GetPicture(
"DisplayModeZRHL.gif"));
919 fDisplayModeButton[3]->
SetPictureHL(gClient->GetPicture(
"DisplayMode3DHL.gif"));
920 fDisplayModeButton[4]->
SetPictureHL(gClient->GetPicture(
"DisplayModeAllHL.gif"));
922 fDisplayModeButton[0]->SetToolTipText(
"XY+ZR view");
923 fDisplayModeButton[1]->SetToolTipText(
"XY view");
924 fDisplayModeButton[2]->SetToolTipText(
"ZR view");
925 fDisplayModeButton[3]->SetToolTipText(
"3D view");
926 fDisplayModeButton[4]->SetToolTipText(
"All view");
928 Int_t width = 16, height = 16;
929 for (Int_t i = 0; i < kNDisplayMode; i++) {
930 fDisplayModeButton[i]->
SetState(kButtonUp);
931 fDisplayModeButton[i]->SetHeight(height);
932 fDisplayModeButton[i]->SetWidth(width);
933 fDisplayModeButton[i]->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
934 fDisplayModeBarFrame->AddFrame(fDisplayModeButton[i], fDisplayModeBarItemLayout);
942 fToolBarFrame =
new TGCompositeFrame(
this, 300, 25, kHorizontalFrame);
943 fToolBarFrame->SetBackgroundPixmap(
GetPic(
"ToolButtonBarBckgnd.gif"));
945 fToolBarFirstItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 10, 0, 1, 2);
946 fToolBarItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 0, 1, 2);
947 fToolBarLastItemLayout =
new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 14, 1, 2);
949 Int_t width = 23, height = 22;
950 Int_t nToolSplitter = 0;
953 for (Int_t i = 0; i < kNToolSplitter; i++) {
955 gClient->GetPicture(
"ToolButtonSplitter.gif"));
956 fToolButtonSplitter[i]->SetHeight(20);
957 fToolButtonSplitter[i]->SetWidth(5);
958 fToolButtonSplitter[i]->
SetState(kButtonDisabled);
963 gClient->GetPicture(
"ButtonSwitchPad.gif"),
965 fSwitchPadButton->
SetPictureHL(gClient->GetPicture(
"ButtonSwitchPadHL.gif"));
966 fSwitchPadButton->SetToolTipText(
"Switch Among Pads");
967 fSwitchPadButton->SetHeight(height);
968 fSwitchPadButton->SetWidth(width);
969 fSwitchPadButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
970 fToolBarFrame->AddFrame(fSwitchPadButton, fToolBarFirstItemLayout);
973 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
978 gClient->GetPicture(
"ButtonShowInfoST.gif"),
981 fShowInfoButton->
SetPictureHL(gClient->GetPicture(
"ButtonShowInfoHL.gif"));
982 fShowInfoButton->SetToolTipText(
"Show Info");
983 fShowInfoButton->SetHeight(height);
984 fShowInfoButton->SetWidth(width);
985 fShowInfoButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
986 fToolBarFrame->AddFrame(fShowInfoButton, fToolBarItemLayout);
990 gClient->GetPicture(
"ButtonShowAxis.gif"),
992 fShowAxisButton->
SetPictureHL(gClient->GetPicture(
"ButtonShowAxisHL.gif"));
993 fShowAxisButton->SetToolTipText(
"Show Axis");
994 fShowAxisButton->SetHeight(height);
995 fShowAxisButton->SetWidth(width);
996 fShowAxisButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
997 fToolBarFrame->AddFrame(fShowAxisButton, fToolBarItemLayout);
1000 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
1005 gClient->GetPicture(
"ButtonFishEyeView.gif"),
1007 fFishEyeViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonFishEyeViewHL.gif"));
1008 fFishEyeViewButton->SetToolTipText(
"FishEye View");
1009 fFishEyeViewButton->SetHeight(height);
1010 fFishEyeViewButton->SetWidth(width);
1011 fFishEyeViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1012 fToolBarFrame->AddFrame(fFishEyeViewButton, fToolBarItemLayout);
1016 gClient->GetPicture(
"ButtonParallelViewST.gif"),
1018 fParallelViewButton->
SetState(
true);
1019 fParallelViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonParallelViewHL.gif"));
1020 fParallelViewButton->SetToolTipText(
"Parallel View");
1021 fParallelViewButton->SetHeight(height);
1022 fParallelViewButton->SetWidth(width);
1023 fParallelViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1024 fToolBarFrame->AddFrame(fParallelViewButton, fToolBarItemLayout);
1028 gClient->GetPicture(
"ButtonPerspectiveView.gif"),
1030 fPerspectiveViewButton->
SetPictureHL(gClient->GetPicture(
"ButtonPerspectiveViewHL.gif"));
1031 fPerspectiveViewButton->SetToolTipText(
"Perspective View");
1032 fPerspectiveViewButton->SetHeight(height);
1033 fPerspectiveViewButton->SetWidth(width);
1034 fPerspectiveViewButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1035 fToolBarFrame->AddFrame(fPerspectiveViewButton, fToolBarItemLayout);
1038 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarItemLayout);
1043 gClient->GetPicture(
"ButtonOpenGL.gif"),
1045 fOpenGLButton->
SetPictureHL(gClient->GetPicture(
"ButtonOpenGLHL.gif"));
1046 fOpenGLButton->SetToolTipText(
"OpenGL View");
1047 fOpenGLButton->SetHeight(height);
1048 fOpenGLButton->SetWidth(width);
1049 fOpenGLButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1050 fToolBarFrame->AddFrame(fOpenGLButton, fToolBarItemLayout);
1054 gClient->GetPicture(
"ButtonX3D.gif"),
1056 fX3DButton->
SetPictureHL(gClient->GetPicture(
"ButtonX3DHL.gif"));
1057 fX3DButton->SetToolTipText(
"X3D View");
1058 fX3DButton->SetHeight(height);
1059 fX3DButton->SetWidth(width);
1060 fX3DButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1061 fToolBarFrame->AddFrame(fX3DButton, fToolBarItemLayout);
1064 fToolBarFrame->AddFrame(fToolButtonSplitter[nToolSplitter], fToolBarLastItemLayout);
1075 fTitleFrame =
new TGHorizontalFrame(
this, this->GetWidth(), 10);
1084 Int_t parts[] = {40, 50, 10};
1085 fStatusBar =
new TGStatusBar(
this, this->GetWidth(), 20, kHorizontalFrame);
1086 fStatusBar->SetParts(parts, nPart);
1087 fStatusBar->SetBackgroundPixmap(
GetPic(
"StatusBarBckgnd.gif"));
1088 for (Int_t iPart = 0; iPart < nPart; iPart++) {
1089 fStatusBar->GetBarPart(iPart)->SetBackgroundPixmap(
GetPic(
"StatusBarBckgnd.gif"));
1103 fMainFrame =
new TGHorizontalFrame(
this, this->GetWidth(), this->GetHeight()-26);
1106 fV1 =
new TGVerticalFrame(fMainFrame, 250, fMainFrame->GetHeight(), kFixedWidth);
1114 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 2, 0, 0);
1115 fWidgets->Add(fLayout);
1116 fV1->AddFrame(fTabs, fLayout);
1121 fMainFrame->AddFrame(fEmbeddedCanvas, fECLayout);
1123 fLayout =
new TGLayoutHints(kLHintsRight | kLHintsExpandY);
1124 fWidgets->Add(fLayout);
1125 fMainFrame->AddFrame(fV1, fLayout);
1127 TGVSplitter *VSplitter =
new TGVSplitter(fMainFrame);
1128 VSplitter->SetFrame(fV1, kFALSE);
1129 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandY);
1130 fWidgets->Add(fLayout);
1131 fMainFrame->AddFrame(VSplitter, fLayout);
1141 fECLayout =
new TGLayoutHints( kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0);
1142 fEmbeddedCanvas =
new TRootEmbeddedCanvas(0, fMainFrame, fMainFrame->GetWidth()/4*3-12, fMainFrame->GetHeight()-46);
1143 Int_t wid = fEmbeddedCanvas->GetCanvasWindowId();
1144 fCanvas =
new TCanvas(
"BesVis", fEmbeddedCanvas->GetWidth(), fEmbeddedCanvas->GetHeight()-10, wid);
1145 fEmbeddedCanvas->AdoptCanvas(fCanvas);
1160 fTabs =
new TGTab(fV1, fV1->GetWidth(), fV1->GetHeight());
1164 TGCompositeFrame *tf = 0;
1170 tf = fTabs->AddTab(
"View");
1171 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1176 fAutoFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1177 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1178 fWidgets->Add(fLayout);
1179 tf->AddFrame(fAutoFrame, fLayout);
1180 fAutoFrame->SetBackgroundPixmap(
GetPic(
"AutoFrameBckgnd.gif"));
1183 fAutoTextFrame =
new TGCompositeFrame(fAutoFrame, fAutoFrame->GetWidth(), 30, kHorizontalFrame);
1184 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1185 fWidgets->Add(fLayout);
1186 fAutoFrame->AddFrame(fAutoTextFrame, fLayout);
1187 fAutoTextFrame->SetBackgroundPixmap(
GetPic(
"AutoControlBckgnd.gif"));
1189 fAutoTextLabel =
new TGLabel(fAutoTextFrame,
"Auto Control ");
1190 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 0);
1191 fWidgets->Add(fLayout);
1192 fAutoTextFrame->AddFrame(fAutoTextLabel, fLayout);
1193 fAutoTextLabel->SetBackgroundPixmap(
GetPic(
"AutoControlBckgnd.gif"));
1196 fFrameAutoRotate =
new TGGroupFrame(fAutoFrame,
"");
1197 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 0, 0);
1199 fWidgets->Add(fLayout);
1200 fAutoFrame->AddFrame(fFrameAutoRotate, fLayout);
1204 fLayout =
new TGLayoutHints(kLHintsExpandX, 5, 5, 3, 2);
1205 fFrameAutoRotate->AddFrame(fChkBtnAutoRotate, fLayout);
1206 fChkBtnAutoRotate->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1209 fRotateSpeedFrame =
new TGCompositeFrame(fFrameAutoRotate, fFrameAutoRotate->GetWidth()-20, 30, kHorizontalFrame);
1210 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 2, 2);
1211 fWidgets->Add(fLayout);
1212 fFrameAutoRotate->AddFrame(fRotateSpeedFrame, fLayout);
1217 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 1 );
1218 h = fNumEntryRotateSpeed->GetDefaultHeight();
1219 charw = fNumEntryRotateSpeed->GetCharWidth(
"0123456");
1220 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1221 fNumEntryRotateSpeed->Resize(
w, h);
1224 fNumEntryRotateSpeed->SetHeight(20);
1226 fNumEntryRotateSpeed->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1227 fNumEntryRotateSpeed->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1228 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 2, 2);
1229 fWidgets->Add(fLayout);
1230 fRotateSpeedFrame->AddFrame(fNumEntryRotateSpeed, fLayout);
1233 fRotateSpeedLabel =
new TGLabel(fRotateSpeedFrame,
" deg/sec ");
1234 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 2, 2);
1235 fWidgets->Add(fLayout);
1236 fRotateSpeedFrame->AddFrame(fRotateSpeedLabel, fLayout);
1239 fRotateFPSFrame =
new TGCompositeFrame(fFrameAutoRotate, fFrameAutoRotate->GetWidth()-20, 30, kHorizontalFrame);
1240 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 2, 2);
1241 fWidgets->Add(fLayout);
1242 fFrameAutoRotate->AddFrame(fRotateFPSFrame, fLayout);
1245 fNumEntryRotateFPS =
new TGNumberEntry(fRotateFPSFrame,this->
GetRotateFPS(), 3,
kM_Button_RotateFPS,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1246 fNumEntryRotateFPS->SetHeight(20);
1248 fNumEntryRotateFPS->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1249 fNumEntryRotateFPS->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1250 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 2, 2);
1251 fWidgets->Add(fLayout);
1252 fRotateFPSFrame->AddFrame(fNumEntryRotateFPS, fLayout);
1255 fRotateFPSLabel =
new TGLabel(fRotateFPSFrame,
" fps ");
1256 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 2, 2);
1257 fWidgets->Add(fLayout);
1258 fRotateFPSFrame->AddFrame(fRotateFPSLabel, fLayout);
1264 fViewFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1265 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1266 fWidgets->Add(fLayout);
1267 tf->AddFrame(fViewFrame, fLayout);
1268 fViewFrame->SetBackgroundPixmap(
GetPic(
"ViewFrameBckgnd.gif"));
1271 fViewTextFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth(), 30, kHorizontalFrame);
1272 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1273 fWidgets->Add(fLayout);
1274 fViewFrame->AddFrame(fViewTextFrame, fLayout);
1275 fViewTextFrame->SetBackgroundPixmap(
GetPic(
"ViewControlBckgnd.gif"));
1277 fViewTextLabel =
new TGLabel(fViewTextFrame,
"View Control ");
1278 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 4);
1279 fWidgets->Add(fLayout);
1280 fViewTextFrame->AddFrame(fViewTextLabel, fLayout);
1281 fViewTextLabel->SetBackgroundPixmap(
GetPic(
"ViewControlBckgnd.gif"));
1285 fRotateStepFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth()-20, 30, kHorizontalFrame);
1286 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop, 0, 0, 8, 5);
1287 fWidgets->Add(fLayout);
1288 fViewFrame->AddFrame(fRotateStepFrame, fLayout);
1291 fRotateStepLabel =
new TGLabel(fRotateStepFrame,
" Step:");
1292 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 10, 2, 0, 0);
1293 fWidgets->Add(fLayout);
1294 fRotateStepFrame->AddFrame(fRotateStepLabel, fLayout);
1299 (TGNumberFormat::EStyle) 2, (TGNumberFormat::EAttribute) 1 );
1300 h = fNumEntryRotateStep->GetDefaultHeight();
1301 charw = fNumEntryRotateStep->GetCharWidth(
"0123456");
1302 w = charw * TMath::Abs(5) / 10 + 8 + 2 * h / 3;
1303 fNumEntryRotateStep->Resize(
w, h);
1305 fNumEntryRotateStep->SetHeight(20);
1307 fNumEntryRotateStep->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1308 fNumEntryRotateStep->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1309 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 0, 0, 0);
1310 fWidgets->Add(fLayout);
1311 fRotateStepFrame->AddFrame(fNumEntryRotateStep, fLayout);
1314 fRotateStepUnitLabel =
new TGLabel(fRotateStepFrame,
" deg ");
1315 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 0, 4, 0, 0);
1316 fWidgets->Add(fLayout);
1317 fRotateStepFrame->AddFrame(fRotateStepUnitLabel, fLayout);
1320 fViewContentFrame =
new TGCompositeFrame(fViewFrame, fViewFrame->GetWidth(), fViewFrame->GetHeight()-30, kVerticalFrame);
1321 fLayout =
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY , 0, 0, 0, 0);
1322 fWidgets->Add(fLayout);
1323 fViewFrame->AddFrame(fViewContentFrame, fLayout);
1326 fViewContent1Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 39, kHorizontalFrame);
1327 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 3, 0);
1328 fWidgets->Add(fLayout);
1329 fViewContent1Frame->SetBackgroundPixmap(
GetPic(
"ViewContent1Bckgnd.gif"));
1330 fViewContentFrame->AddFrame(fViewContent1Frame, fLayout);
1334 gClient->GetPicture(
"ViewCounterClockwise.gif"),
1336 fViewCounterClockWiseButton->SetToolTipText(
"Rotate Counter Clockwise");
1337 fViewCounterClockWiseButton->SetHeight(37);
1338 fViewCounterClockWiseButton->SetWidth(37);
1339 fViewCounterClockWiseButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1341 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 22, 0, 0);
1342 fWidgets->Add(fLayout);
1343 fViewContent1Frame->AddFrame(fViewCounterClockWiseButton, fLayout);
1347 gClient->GetPicture(
"ViewMoveUp.gif"),
1349 fViewMoveUpButton->SetToolTipText(
"Move Up");
1350 fViewMoveUpButton->SetHeight(20);
1351 fViewMoveUpButton->SetWidth(23);
1352 fViewMoveUpButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1354 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 5, 5, 0, 0);
1355 fWidgets->Add(fLayout);
1356 fViewContent1Frame->AddFrame(fViewMoveUpButton, fLayout);
1360 gClient->GetPicture(
"ViewClockwise.gif"),
1362 fViewClockWiseButton->SetToolTipText(
"Rotate Clockwise");
1363 fViewClockWiseButton->SetHeight(37);
1364 fViewClockWiseButton->SetWidth(37);
1365 fViewClockWiseButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1367 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 22, 5, 0, 0);
1368 fWidgets->Add(fLayout);
1369 fViewContent1Frame->AddFrame(fViewClockWiseButton, fLayout);
1372 fViewContent2Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 23, kHorizontalFrame);
1373 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 0, 0);
1374 fWidgets->Add(fLayout);
1375 fViewContent2Frame->SetBackgroundPixmap(
GetPic(
"ViewContent2Bckgnd.gif"));
1376 fViewContentFrame->AddFrame(fViewContent2Frame, fLayout);
1380 gClient->GetPicture(
"ViewMoveLeft.gif"),
1382 fViewMoveLeftButton->SetToolTipText(
"Move Left");
1383 fViewMoveLeftButton->SetHeight(23);
1384 fViewMoveLeftButton->SetWidth(23);
1385 fViewMoveLeftButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1387 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 49, 2, 0, 0);
1388 fWidgets->Add(fLayout);
1389 fViewContent2Frame->AddFrame(fViewMoveLeftButton, fLayout);
1393 gClient->GetPicture(
"ViewMoveCenter.gif"),
1395 fViewMoveCenterButton->SetToolTipText(
"Move Center");
1396 fViewMoveCenterButton->SetHeight(13);
1397 fViewMoveCenterButton->SetWidth(13);
1398 fViewMoveCenterButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1400 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX, 0, 0, 0, 0);
1401 fWidgets->Add(fLayout);
1402 fViewContent2Frame->AddFrame(fViewMoveCenterButton, fLayout);
1406 gClient->GetPicture(
"ViewMoveRight.gif"),
1408 fViewMoveRightButton->SetToolTipText(
"Move Right");
1409 fViewMoveRightButton->SetHeight(23);
1410 fViewMoveRightButton->SetWidth(23);
1411 fViewMoveRightButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1413 fLayout =
new TGLayoutHints(kLHintsBottom | kLHintsCenterX, 2, 49, 0, 0);
1414 fWidgets->Add(fLayout);
1415 fViewContent2Frame->AddFrame(fViewMoveRightButton, fLayout);
1418 fViewContent3Frame =
new TGCompositeFrame(fViewContentFrame, fViewFrame->GetWidth(), 32, kHorizontalFrame);
1419 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 0, 0, 0, 3);
1420 fWidgets->Add(fLayout);
1421 fViewContent3Frame->SetBackgroundPixmap(
GetPic(
"ViewContent3Bckgnd.gif"));
1422 fViewContentFrame->AddFrame(fViewContent3Frame, fLayout);
1426 gClient->GetPicture(
"ViewMoveDown.gif"),
1428 fViewMoveDownButton->SetToolTipText(
"Move Down");
1429 fViewMoveDownButton->SetHeight(32);
1430 fViewMoveDownButton->SetWidth(23);
1431 fViewMoveDownButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1434 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 69, 0, 0, 0);
1435 fWidgets->Add(fLayout);
1436 fViewContent3Frame->AddFrame(fViewMoveDownButton, fLayout);
1440 gClient->GetPicture(
"ViewResetAngle.gif"),
1443 fViewResetAngleButton->SetToolTipText(
"Reset Angles");
1444 fViewResetAngleButton->SetHeight(27);
1445 fViewResetAngleButton->SetWidth(27);
1446 fViewResetAngleButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1448 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 30, 0, 0, 0);
1449 fWidgets->Add(fLayout);
1450 fViewContent3Frame->AddFrame(fViewResetAngleButton, fLayout);
1454 fViewAngleFrame =
new TGCompositeFrame(fViewContentFrame, fViewContentFrame->GetWidth(), 50, kHorizontalFrame);
1455 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 4, 4, 0, 0);
1456 fWidgets->Add(fLayout);
1457 fViewContentFrame->AddFrame(fViewAngleFrame, fLayout);
1460 fViewAngleThetaFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1461 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1462 fWidgets->Add(fLayout);
1463 fViewAngleFrame->AddFrame(fViewAngleThetaFrame, fLayout);
1467 gClient->GetPicture(
"ViewAngleMinus.gif"),
1469 fViewAngleThetaMinusButton->SetToolTipText(
"Theta -");
1470 fViewAngleThetaMinusButton->SetHeight(22);
1471 fViewAngleThetaMinusButton->SetWidth(22);
1472 fViewAngleThetaMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1474 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1475 fWidgets->Add(fLayout);
1476 fViewAngleThetaFrame->AddFrame(fViewAngleThetaMinusButton, fLayout);
1480 fViewAngleThetaSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1481 fViewAngleThetaSlider->SetRange(0, 180);
1482 fViewAngleThetaSlider->SetPosition(0);
1483 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1484 fWidgets->Add(fLayout);
1485 fViewAngleThetaFrame->AddFrame(fViewAngleThetaSlider, fLayout);
1489 gClient->GetPicture(
"ViewAnglePlus.gif"),
1491 fViewAngleThetaPlusButton->SetToolTipText(
"Theta +");
1492 fViewAngleThetaPlusButton->SetHeight(22);
1493 fViewAngleThetaPlusButton->SetWidth(22);
1494 fViewAngleThetaPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1496 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1497 fWidgets->Add(fLayout);
1498 fViewAngleThetaFrame->AddFrame(fViewAngleThetaPlusButton, fLayout);
1504 fViewAngleThetaSlider->GetPosition(),
1505 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1506 fViewAngleThetaNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1507 h = fViewAngleThetaNumber->GetDefaultHeight();
1508 charw = fViewAngleThetaNumber->GetCharWidth(
"0123456");
1509 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1510 fViewAngleThetaNumber->Resize(
w, h);
1512 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1513 fWidgets->Add(fLayout);
1514 fViewAngleThetaFrame->AddFrame(fViewAngleThetaNumber, fLayout);
1517 fViewAngleThetaLabel =
new TGLabel(fViewAngleThetaFrame,
"theta");
1518 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1519 fWidgets->Add(fLayout);
1520 fViewAngleThetaFrame->AddFrame(fViewAngleThetaLabel, fLayout);
1523 fViewAnglePhiFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1524 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1525 fWidgets->Add(fLayout);
1526 fViewAngleFrame->AddFrame(fViewAnglePhiFrame, fLayout);
1530 gClient->GetPicture(
"ViewAngleMinus.gif"),
1532 fViewAnglePhiMinusButton->SetToolTipText(
"Phi -");
1533 fViewAnglePhiMinusButton->SetHeight(22);
1534 fViewAnglePhiMinusButton->SetWidth(22);
1535 fViewAnglePhiMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1537 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1538 fWidgets->Add(fLayout);
1539 fViewAnglePhiFrame->AddFrame(fViewAnglePhiMinusButton, fLayout);
1542 fViewAnglePhiSlider =
new TGVSlider(fViewAnglePhiFrame, 120, kSlider2 | kScaleBoth,
kM_Slider_ViewAnglePhi);
1543 fViewAnglePhiSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1544 fViewAnglePhiSlider->SetRange(0, 360);
1545 fViewAnglePhiSlider->SetPosition(0);
1546 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1547 fWidgets->Add(fLayout);
1548 fViewAnglePhiFrame->AddFrame(fViewAnglePhiSlider, fLayout);
1552 gClient->GetPicture(
"ViewAnglePlus.gif"),
1554 fViewAnglePhiPlusButton->SetToolTipText(
"Phi +");
1555 fViewAnglePhiPlusButton->SetHeight(22);
1556 fViewAnglePhiPlusButton->SetWidth(22);
1557 fViewAnglePhiPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1559 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1560 fWidgets->Add(fLayout);
1561 fViewAnglePhiFrame->AddFrame(fViewAnglePhiPlusButton, fLayout);
1567 fViewAnglePhiSlider->GetPosition(),
1568 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1569 fViewAnglePhiNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1570 h = fViewAnglePhiNumber->GetDefaultHeight();
1571 charw = fViewAnglePhiNumber->GetCharWidth(
"0123456");
1572 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1573 fViewAnglePhiNumber->Resize(
w, h);
1575 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1576 fWidgets->Add(fLayout);
1577 fViewAnglePhiFrame->AddFrame(fViewAnglePhiNumber, fLayout);
1580 fViewAnglePhiLabel =
new TGLabel(fViewAnglePhiFrame,
"phi");
1581 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1582 fWidgets->Add(fLayout);
1583 fViewAnglePhiFrame->AddFrame(fViewAnglePhiLabel, fLayout);
1586 fViewAnglePsiFrame =
new TGCompositeFrame(fViewAngleFrame, fViewAngleFrame->GetWidth(), 50, kVerticalFrame);
1587 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop , 3, 3, 3, 3);
1588 fWidgets->Add(fLayout);
1589 fViewAngleFrame->AddFrame(fViewAnglePsiFrame, fLayout);
1593 gClient->GetPicture(
"ViewAngleMinus.gif"),
1595 fViewAnglePsiMinusButton->SetToolTipText(
"Psi -");
1596 fViewAnglePsiMinusButton->SetHeight(22);
1597 fViewAnglePsiMinusButton->SetWidth(22);
1598 fViewAnglePsiMinusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1600 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1601 fWidgets->Add(fLayout);
1602 fViewAnglePsiFrame->AddFrame(fViewAnglePsiMinusButton, fLayout);
1605 fViewAnglePsiSlider =
new TGVSlider(fViewAnglePsiFrame, 120, kSlider2 | kScaleBoth,
kM_Slider_ViewAnglePsi);
1606 fViewAnglePsiSlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1607 fViewAnglePsiSlider->SetRange(0, 360);
1608 fViewAnglePsiSlider->SetPosition(270);
1609 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandY, 5, 5, 0, 0);
1610 fWidgets->Add(fLayout);
1611 fViewAnglePsiFrame->AddFrame(fViewAnglePsiSlider, fLayout);
1615 gClient->GetPicture(
"ViewAnglePlus.gif"),
1617 fViewAnglePsiPlusButton->SetToolTipText(
"Psi +");
1618 fViewAnglePsiPlusButton->SetHeight(22);
1619 fViewAnglePsiPlusButton->SetWidth(22);
1620 fViewAnglePsiPlusButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1622 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 5, 5, 0, 0);
1623 fWidgets->Add(fLayout);
1624 fViewAnglePsiFrame->AddFrame(fViewAnglePsiPlusButton, fLayout);
1630 fViewAnglePsiSlider->GetPosition(),
1631 (TGNumberFormat::EStyle) 1, (TGNumberFormat::EAttribute) 0 );
1632 fViewAnglePsiNumber->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1633 h = fViewAnglePsiNumber->GetDefaultHeight();
1634 charw = fViewAnglePsiNumber->GetCharWidth(
"0123456");
1635 w = charw * TMath::Abs(4) / 10 + 8 + 2 * h / 3;
1636 fViewAnglePsiNumber->Resize(
w, h);
1638 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 0);
1639 fWidgets->Add(fLayout);
1640 fViewAnglePsiFrame->AddFrame(fViewAnglePsiNumber, fLayout);
1643 fViewAnglePsiLabel =
new TGLabel(fViewAnglePsiFrame,
"psi");
1644 fLayout =
new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 2, 2, 2);
1645 fWidgets->Add(fLayout);
1646 fViewAnglePsiFrame->AddFrame(fViewAnglePsiLabel, fLayout);
1651 tf = fTabs->AddTab(
"Event");
1652 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1657 fEventControlFrame =
new TGCompositeFrame(tf, tf->GetWidth(), tf->GetHeight(), kVerticalFrame);
1658 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX , 15, 15, 15, 10);
1659 fWidgets->Add(fLayout);
1660 tf->AddFrame(fEventControlFrame, fLayout);
1661 fEventControlFrame->SetBackgroundPixmap(
GetPic(
"EventFrameBckgnd.gif"));
1665 fEventControlTextFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1666 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 0, 0, 0, 0);
1667 fWidgets->Add(fLayout);
1668 fEventControlFrame->AddFrame(fEventControlTextFrame, fLayout);
1669 fEventControlTextFrame->SetBackgroundPixmap(
GetPic(
"EventControlBckgnd.gif"));
1671 fEventControlTextLabel =
new TGLabel(fEventControlTextFrame,
"Event Control ");
1672 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX , 2, 73, 4, 4);
1673 fWidgets->Add(fLayout);
1674 fEventControlTextFrame->AddFrame(fEventControlTextLabel, fLayout);
1675 fEventControlTextLabel->SetBackgroundPixmap(
GetPic(
"EventControlBckgnd.gif"));
1678 fBesRunFrame =
new TGHorizontalFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 25);
1679 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 4, 4, 4, 4);
1680 fWidgets->Add(fLayout);
1681 fEventControlFrame->AddFrame(fBesRunFrame, fLayout);
1682 fBesRunFrame->SetBackgroundPixmap(
GetPic(
"EventFrameBckgnd.gif"));
1684 fBesLabelRun =
new TGLabel(fBesRunFrame,
"Run : ");
1685 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1686 fWidgets->Add(fLayout);
1687 fBesRunFrame->AddFrame(fBesLabelRun, fLayout);
1689 fNumEntryRunNo =
new TGNumberEntry(fBesRunFrame,this->
GetBesRunNo(),12,
kM_Button_BesRun,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1690 fNumEntryRunNo->SetHeight(20);
1692 fNumEntryRunNo->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1693 fNumEntryRunNo->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1694 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 4, 4, 4, 4);
1695 fWidgets->Add(fLayout);
1696 fBesRunFrame->AddFrame(fNumEntryRunNo, fLayout);
1699 fBesEventFrame =
new TGHorizontalFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 25);
1700 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsExpandX , 4, 4, 4, 4);
1701 fWidgets->Add(fLayout);
1702 fEventControlFrame->AddFrame(fBesEventFrame, fLayout);
1704 fBesLabelEvent =
new TGLabel(fBesEventFrame,
"Event : ");
1705 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1706 fWidgets->Add(fLayout);
1707 fBesEventFrame->AddFrame(fBesLabelEvent, fLayout);
1709 fNumEntryEventNo =
new TGNumberEntry(fBesEventFrame,this->
GetBesEventNo(),12,
kM_Button_BesEvent,(TGNumberFormat::EStyle) 0,(TGNumberFormat::EAttribute) 1);
1710 fNumEntryEventNo->SetHeight(20);
1712 fNumEntryEventNo->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1713 fNumEntryEventNo->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1714 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 4, 4, 4, 4);
1715 fWidgets->Add(fLayout);
1716 fBesEventFrame->AddFrame(fNumEntryEventNo, fLayout);
1723 fEventPlaySlider =
new TGHSlider(fEventControlFrame, 40, kSlider1 | kScaleNo,
kM_Slider_EventPlay);
1724 fEventPlaySlider->Connect(
"PositionChanged(Int_t)",
"BesClient",
this,
"HandleSliders(Int_t)");
1725 fEventPlaySlider->SetRange(0, 100);
1726 fEventPlaySlider->SetPosition(0);
1727 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsCenterX | kLHintsExpandX, 5, 5, 5, 0);
1728 fWidgets->Add(fLayout);
1729 fEventControlFrame->AddFrame(fEventPlaySlider, fLayout);
1732 fEventPlayButtonFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1734 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 2, 2, 2, 2);
1735 fWidgets->Add(fLayout);
1736 fEventControlFrame->AddFrame(fEventPlayButtonFrame, fLayout);
1740 gClient->GetPicture(
"ButtonEventPrev.gif"),
1742 fPrevEventButton->SetToolTipText(
"Previous Event");
1743 fPrevEventButton->SetHeight(26);
1744 fPrevEventButton->SetWidth(25);
1745 fPrevEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1747 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 8, 0, 0, 4);
1748 fWidgets->Add(fLayout);
1749 fEventPlayButtonFrame->AddFrame(fPrevEventButton, fLayout);
1754 fNextEventButton->SetToolTipText(
"Next Event");
1755 fNextEventButton->SetHeight(26);
1756 fNextEventButton->SetWidth(26);
1757 fNextEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1759 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 10, 0, 4);
1760 fWidgets->Add(fLayout);
1761 fEventPlayButtonFrame->AddFrame(fNextEventButton, fLayout);
1765 gClient->GetPicture(
"ButtonEventPlay.gif"),
1767 fPlayEventButton->SetToolTipText(
"Play Event");
1768 fPlayEventButton->SetHeight(35);
1769 fPlayEventButton->SetWidth(34);
1770 fPlayEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1772 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 0, 0, 4);
1773 fWidgets->Add(fLayout);
1774 fEventPlayButtonFrame->AddFrame(fPlayEventButton, fLayout);
1778 gClient->GetPicture(
"ButtonEventReturn.gif"),
1780 fFirstEventButton->SetToolTipText(
"First Event");
1781 fFirstEventButton->SetHeight(35);
1782 fFirstEventButton->SetWidth(25);
1783 fFirstEventButton->Connect(
"Clicked()",
"BesClient",
this,
"HandleButtons()");
1785 fLayout =
new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 0, 8, 0, 4);
1786 fWidgets->Add(fLayout);
1787 fEventPlayButtonFrame->AddFrame(fFirstEventButton, fLayout);
1790 fEventPlayTextFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1791 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 2, 2, 2, 2);
1792 fWidgets->Add(fLayout);
1793 fEventControlFrame->AddFrame(fEventPlayTextFrame, fLayout);
1795 fEventPlayTextLabel =
new TGLabel(fEventPlayTextFrame,
"Prev,Next,Play/Stop,Return");
1796 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 5, 4, 2, 5);
1797 fWidgets->Add(fLayout);
1798 fEventPlayTextFrame->AddFrame(fEventPlayTextLabel, fLayout);
1802 fEventPlaySpeedFrame =
new TGCompositeFrame(fEventControlFrame, fEventControlFrame->GetWidth(), 30, kHorizontalFrame);
1803 fLayout =
new TGLayoutHints(kLHintsCenterX | kLHintsTop, 4, 4, 4, 4);
1804 fWidgets->Add(fLayout);
1805 fEventControlFrame->AddFrame(fEventPlaySpeedFrame, fLayout);
1808 fNumEntryEventPlaySpeed =
new TGNumberEntry(fEventPlaySpeedFrame,(Double_t)this->
GetEventPlaySpeed()/1000.0,4,
1810 (TGNumberFormat::EStyle) 1,(TGNumberFormat::EAttribute) 1);
1811 fNumEntryEventPlaySpeed->SetHeight(20);
1813 fNumEntryEventPlaySpeed->GetNumberEntry()->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
1814 fNumEntryEventPlaySpeed->GetNumberEntry()->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
1815 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
1816 fWidgets->Add(fLayout);
1817 fEventPlaySpeedFrame->AddFrame(fNumEntryEventPlaySpeed, fLayout);
1820 fEventPlaySpeedLabel =
new TGLabel(fEventPlaySpeedFrame,
" sec/event ");
1821 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2, 4, 4, 10);
1822 fWidgets->Add(fLayout);
1823 fEventPlaySpeedFrame->AddFrame(fEventPlaySpeedLabel, fLayout);
1878 tf = fTabs->AddTab(
"REC");
1880 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
1883 fFrameHeader =
new TGGroupFrame(tf,
"Header");
1884 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
1885 fWidgets->Add(fLayout);
1886 tf->AddFrame(fFrameHeader, fLayout);
1887 fChkBtnHeaderGlobal =
new TGCheckButton(fFrameHeader,
"Header",
kM_Header_Global);
1888 fFrameHeader->AddFrame(fChkBtnHeaderGlobal);
1889 fChkBtnHeaderGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1892 fFrameHits =
new TGGroupFrame(tf,
"Hits");
1893 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
1894 fWidgets->Add(fLayout);
1895 tf->AddFrame(fFrameHits, fLayout);
1899 fChkBtnMdcHitsGlobal =
new TGCheckButton(fFrameHits,
"Mdc hits",
kM_MdcHits_Global);
1900 fFrameHits->AddFrame(fChkBtnMdcHitsGlobal);
1902 fChkBtnTofHitsGlobal =
new TGCheckButton(fFrameHits,
"Tof hits",
kM_TofHits_Global);
1903 fFrameHits->AddFrame(fChkBtnTofHitsGlobal);
1905 fChkBtnTofHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_TofHits_East);
1906 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1907 fWidgets->Add(fLayout);
1908 fFrameHits->AddFrame(fChkBtnTofHitsEast, fLayout);
1910 fChkBtnTofHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_TofHits_Barrel);
1911 fFrameHits->AddFrame(fChkBtnTofHitsBarrel, fLayout);
1913 fChkBtnTofHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_TofHits_West);
1914 fFrameHits->AddFrame(fChkBtnTofHitsWest, fLayout);
1916 fChkBtnEmcHitsGlobal =
new TGCheckButton(fFrameHits,
"Emc hits",
kM_EmcHits_Global);
1917 fFrameHits->AddFrame(fChkBtnEmcHitsGlobal);
1919 fChkBtnEmcHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_EmcHits_East);
1920 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1921 fWidgets->Add(fLayout);
1922 fFrameHits->AddFrame(fChkBtnEmcHitsEast, fLayout);
1924 fChkBtnEmcHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_EmcHits_Barrel);
1925 fFrameHits->AddFrame(fChkBtnEmcHitsBarrel, fLayout);
1927 fChkBtnEmcHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_EmcHits_West);
1928 fFrameHits->AddFrame(fChkBtnEmcHitsWest, fLayout);
1930 fChkBtnEmcHitsSide =
new TGCheckButton(fFrameHits,
" Side ",
kM_EmcHits_Side);
1931 fFrameHits->AddFrame(fChkBtnEmcHitsSide, fLayout);
1933 fChkBtnMucHitsGlobal =
new TGCheckButton(fFrameHits,
"Muc hits",
kM_MucHits_Global);
1934 fFrameHits->AddFrame(fChkBtnMucHitsGlobal);
1936 fChkBtnMucHitsEast =
new TGCheckButton(fFrameHits,
" East ",
kM_MucHits_East);
1937 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1938 fWidgets->Add(fLayout);
1939 fFrameHits->AddFrame(fChkBtnMucHitsEast, fLayout);
1941 fChkBtnMucHitsBarrel =
new TGCheckButton(fFrameHits,
" Barrel ",
kM_MucHits_Barrel);
1942 fFrameHits->AddFrame(fChkBtnMucHitsBarrel, fLayout);
1944 fChkBtnMucHitsWest =
new TGCheckButton(fFrameHits,
" West ",
kM_MucHits_West);
1945 fFrameHits->AddFrame(fChkBtnMucHitsWest, fLayout);
1947 fChkBtnMdcHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1948 fChkBtnTofHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1949 fChkBtnTofHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1950 fChkBtnTofHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1951 fChkBtnTofHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1952 fChkBtnEmcHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1953 fChkBtnEmcHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1954 fChkBtnEmcHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1955 fChkBtnEmcHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1956 fChkBtnEmcHitsSide ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1957 fChkBtnMucHitsGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1958 fChkBtnMucHitsEast ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1959 fChkBtnMucHitsBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1960 fChkBtnMucHitsWest ->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1963 fFrameTracks =
new TGGroupFrame(tf,
"Tracks");
1964 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 5);
1965 fWidgets->Add(fLayout);
1966 tf->AddFrame(fFrameTracks, fLayout);
1968 fChkBtnTracksGlobal =
new TGCheckButton(fFrameTracks,
"Tracks",
kM_Tracks_Global);
1969 fFrameTracks->AddFrame(fChkBtnTracksGlobal);
1971 fChkBtnTracksMdc =
new TGCheckButton(fFrameTracks,
" Mdc ",
kM_Tracks_Mdc);
1972 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
1973 fWidgets->Add(fLayout);
1974 fFrameTracks->AddFrame(fChkBtnTracksMdc, fLayout);
1976 fChkBtnTracksTof =
new TGCheckButton(fFrameTracks,
" Tof ",
kM_Tracks_Tof);
1977 fFrameTracks->AddFrame(fChkBtnTracksTof, fLayout);
1979 fChkBtnTracksEmc =
new TGCheckButton(fFrameTracks,
" Emc ",
kM_Tracks_Emc);
1980 fFrameTracks->AddFrame(fChkBtnTracksEmc, fLayout);
1982 fChkBtnTracksMuc =
new TGCheckButton(fFrameTracks,
" Muc ",
kM_Tracks_Muc);
1983 fFrameTracks->AddFrame(fChkBtnTracksMuc, fLayout);
1985 fChkBtnTracksExt =
new TGCheckButton(fFrameTracks,
" Ext ",
kM_Tracks_Ext);
1986 fFrameTracks->AddFrame(fChkBtnTracksExt, fLayout);
1988 fChkBtnTracksGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1989 fChkBtnTracksMdc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1990 fChkBtnTracksTof->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1991 fChkBtnTracksEmc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1992 fChkBtnTracksMuc->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1993 fChkBtnTracksExt->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
1998 tf = fTabs->AddTab(
"Detector");
1999 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
2002 fFrameSubDetector =
new TGGroupFrame(tf,
"Sub-Detector");
2005 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2006 fWidgets->Add(fLayout);
2007 tf->AddFrame(fFrameSubDetector, fLayout);
2010 fChkBtnMdcGlobal =
new TGCheckButton(fFrameSubDetector,
"Mdc",
kM_Mdc_Global);
2011 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2012 fFrameSubDetector->AddFrame(fChkBtnMdcGlobal, fLayout);
2013 fChkBtnMdcGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2015 fChkBtnMdcTubes =
new TGCheckButton(fFrameSubDetector,
"Tubes",
kM_Mdc_Tubes);
2016 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2017 fFrameSubDetector->AddFrame(fChkBtnMdcTubes, fLayout);
2018 fChkBtnMdcTubes->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2020 fChkBtnMdcWires =
new TGCheckButton(fFrameSubDetector,
"Wires",
kM_Mdc_Wires);
2021 fFrameSubDetector->AddFrame(fChkBtnMdcWires, fLayout);
2022 fChkBtnMdcWires->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2025 fChkBtnTofGlobal =
new TGCheckButton(fFrameSubDetector,
"Tof",
kM_Tof_Global);
2026 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2027 fFrameSubDetector->AddFrame(fChkBtnTofGlobal, fLayout);
2028 fChkBtnTofGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2030 fChkBtnTofEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Tof_East);
2031 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2032 fFrameSubDetector->AddFrame(fChkBtnTofEast, fLayout);
2033 fChkBtnTofEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2035 fChkBtnTofBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Tof_Barrel);
2036 fFrameSubDetector->AddFrame(fChkBtnTofBarrel, fLayout);
2037 fChkBtnTofBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2039 fChkBtnTofWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Tof_West);
2040 fFrameSubDetector->AddFrame(fChkBtnTofWest, fLayout);
2041 fChkBtnTofWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2044 fChkBtnEmcGlobal =
new TGCheckButton(fFrameSubDetector,
"Emc",
kM_Emc_Global);
2045 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2046 fFrameSubDetector->AddFrame(fChkBtnEmcGlobal, fLayout);
2047 fChkBtnEmcGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2049 fChkBtnEmcEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Emc_East);
2050 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2051 fFrameSubDetector->AddFrame(fChkBtnEmcEast, fLayout);
2052 fChkBtnEmcEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2054 fChkBtnEmcBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Emc_Barrel);
2055 fFrameSubDetector->AddFrame(fChkBtnEmcBarrel, fLayout);
2056 fChkBtnEmcBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2058 fChkBtnEmcWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Emc_West);
2059 fFrameSubDetector->AddFrame(fChkBtnEmcWest, fLayout);
2060 fChkBtnEmcWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2062 fChkBtnEmcSide =
new TGCheckButton(fFrameSubDetector,
"Side ",
kM_Emc_Side);
2063 fFrameSubDetector->AddFrame(fChkBtnEmcSide, fLayout);
2064 fChkBtnEmcSide->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2067 fChkBtnMucGlobal =
new TGCheckButton(fFrameSubDetector,
"Muc",
kM_Muc_Global);
2068 fLayout =
new TGLayoutHints(kLHintsExpandX, 0, 0, 10, 0);
2069 fFrameSubDetector->AddFrame(fChkBtnMucGlobal, fLayout);
2070 fChkBtnMucGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2072 fChkBtnMucEast =
new TGCheckButton(fFrameSubDetector,
"East EC",
kM_Muc_East);
2073 fLayout =
new TGLayoutHints(kLHintsLeft, 20, 0, 0, 0);
2074 fFrameSubDetector->AddFrame(fChkBtnMucEast, fLayout);
2075 fChkBtnMucEast->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2077 fChkBtnMucBarrel =
new TGCheckButton(fFrameSubDetector,
"Barrel",
kM_Muc_Barrel);
2078 fFrameSubDetector->AddFrame(fChkBtnMucBarrel, fLayout);
2079 fChkBtnMucBarrel->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2081 fChkBtnMucWest =
new TGCheckButton(fFrameSubDetector,
"West EC",
kM_Muc_West);
2082 fFrameSubDetector->AddFrame(fChkBtnMucWest, fLayout);
2083 fChkBtnMucWest->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2085 fChkBtnMucStrips =
new TGCheckButton(fFrameSubDetector,
"Strips",
kM_Muc_Strips);
2086 fFrameSubDetector->AddFrame(fChkBtnMucStrips, fLayout);
2087 fChkBtnMucStrips->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2090 fFrameOthers =
new TGGroupFrame (tf,
"Others");
2091 fLayout =
new TGLayoutHints (kLHintsExpandX, 15, 15, 15, 15);
2092 fWidgets->Add(fLayout);
2093 tf->AddFrame (fFrameOthers, fLayout);
2095 fChkBtnBeamPipe =
new TGCheckButton (fFrameOthers,
"Beam Pipe",
kM_BeamPipe);
2096 fFrameOthers->AddFrame (fChkBtnBeamPipe);
2097 fChkBtnBeamPipe->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2099 fChkBtnZRPlaneOnXY =
new TGCheckButton (fFrameOthers,
"ZR plane on XY",
kM_ZRPlaneOnXY);
2100 fFrameOthers->AddFrame (fChkBtnZRPlaneOnXY);
2101 fChkBtnZRPlaneOnXY->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2103 fChkBtnAxis =
new TGCheckButton (fFrameOthers,
"Axis",
kM_Axis);
2104 fFrameOthers->AddFrame (fChkBtnAxis);
2105 fChkBtnAxis->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2110 tf = fTabs->AddTab(
"Others");
2111 tf->SetBackgroundPixmap(
GetPic(
"8.gif"));
2114 fFrameMdcMatch =
new TGGroupFrame(tf,
"Mdc Status");
2115 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2116 fWidgets->Add(fLayout);
2117 tf->AddFrame(fFrameMdcMatch, fLayout);
2120 fChkBtnMdcTMatchGlobal->SetState(kButtonDown);
2122 fFrameMdcMatch->AddFrame(fChkBtnMdcTMatchGlobal);
2123 fChkBtnMdcTMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2126 fChkBtnMdcQMatchGlobal->SetState(kButtonDown);
2128 fFrameMdcMatch->AddFrame(fChkBtnMdcQMatchGlobal);
2129 fChkBtnMdcQMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2132 fChkBtnMdcQOverflowGlobal->SetState(kButtonUp);
2134 fFrameMdcMatch->AddFrame(fChkBtnMdcQOverflowGlobal);
2135 fChkBtnMdcQOverflowGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2139 fChkBtnMdcColorfulWireGlobal->SetState(kButtonUp);
2140 fFrameMdcMatch->AddFrame(fChkBtnMdcColorfulWireGlobal);
2141 fChkBtnMdcColorfulWireGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2145 fChkBtnMdcTimeSubEvTimeGlobal->SetState(kButtonUp);
2146 fFrameMdcMatch->AddFrame(fChkBtnMdcTimeSubEvTimeGlobal);
2147 fChkBtnMdcTimeSubEvTimeGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2150 fFrameTofMatch =
new TGGroupFrame(tf,
"Tof TQ Match");
2151 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2152 fWidgets->Add(fLayout);
2153 tf->AddFrame(fFrameTofMatch, fLayout);
2156 fChkBtnTofTMatchGlobal->SetState(kButtonDown);
2158 fFrameTofMatch->AddFrame(fChkBtnTofTMatchGlobal);
2159 fChkBtnTofTMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2162 fChkBtnTofQMatchGlobal->SetState(kButtonDown);
2164 fFrameTofMatch->AddFrame(fChkBtnTofQMatchGlobal);
2165 fChkBtnTofQMatchGlobal->Connect(
"Clicked()",
"BesClient",
this,
"SetState()");
2168 fFrameMagnetic =
new TGGroupFrame(tf,
"Magnetic Field(Tesla)");
2169 fLayout =
new TGLayoutHints(kLHintsExpandX, 15, 15, 15, 15);
2170 fWidgets->Add(fLayout);
2171 tf->AddFrame(fFrameMagnetic, fLayout);
2174 fNumEntryMagnetic =
new TGNumberEntry(fFrameMagnetic,
2177 TGNumberFormat::kNESRealTwo,
2178 TGNumberFormat::kNEAAnyNumber);
2179 fNumEntryMagnetic->SetHeight(20);
2180 fNumEntryMagnetic->SetNumber(1.0);
2181 fNumEntryMagnetic->GetNumberEntry()
2182 ->Connect(
"ReturnPressed()",
"BesClient",
this,
"ExecuteReturn()");
2183 fNumEntryMagnetic->GetNumberEntry()
2184 ->Connect(
"TabPressed()",
"BesClient",
this,
"ChangeFocus()");
2185 fLayout =
new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 4, 4, 4, 4);
2186 fWidgets->Add(fLayout);
2187 fFrameMagnetic->AddFrame(fNumEntryMagnetic, fLayout);
2190 for (Int_t iTab = 0; iTab < fTabs->GetNumberOfTabs(); iTab++) {
2191 fTabs->GetTabTab(iTab)->SetBackgroundPixmap(
GetPic(
"8.gif"));
2195void BesClient::SetMdcQNotOverflow(Bool_t input){
2202void BesClient::SetMdcTFire(Bool_t input){
2208void BesClient::SetMdcQFire(Bool_t input){
2214void BesClient::SetMdcColorfulWire(Bool_t input){
2220void BesClient::SetMdcTimeSubEvTime(Bool_t input){
2226void BesClient::SetTofTMatch(Bool_t input){
2232void BesClient::SetTofQMatch(Bool_t input){
2242 if (gDebug) cout <<
"BesClient::InitLocal called!" << endl;
2245 fWidgets =
new TList();
2253 fAutoDisplayEventTimer =
new TTimer(fEventPlaySpeed);
2254 Connect(fAutoDisplayEventTimer,
"Timeout()",
"BesClient",
this,
"AutoDisplayEventCommand()");
2256 fAutoRotateTimer =
new TTimer((Int_t)1000/fRotateFPS);
2257 Connect(fAutoRotateTimer,
"Timeout()",
"BesClient",
this,
"AutoRotateCommand()");
2260 new TColor(1001, 1.0, 1.0, 225/255.0);
2262 new TColor(1002, 227/255.0, 186/255.0, 227/255.0);
2264 new TColor(1003, 232/255.0, 234/255.0, 117/255.0);
2266 new TColor(1004, 254/255.0, 216/255.0, 31/255.0);
2268 new TColor(1005, 175/255.0, 192/255.0, 227/255.0);
2270 new TColor(1006, 192/255.0, 227/255.0, 226/255.0);
2272 new TColor(1007, 225/255.0, 199/255.0, 162/255.0);
2280 if (gDebug) cout <<
"BesClient::InitParameter called!" << endl;
2283 fWindowWidth = 1000;
2284 fWindowHeight = 710;
2286 fBesVisPath = TString(getenv(
"BESVISLIBROOT"));
2288 fEventPlaySpeed = 1000;
2289 fAutoDisplayEvent = kFALSE;
2291 for (Int_t i = 0; i < 3; i++) {
2298 fRotateSpeed = 10.0;
2301 fAutoRotate = kFALSE;
2302 fAutoRotateClockWise = 0;
2303 fAutoRotateTheta = 0;
2313 TString docfile = fBesVisPath +
"/docs/help.txt";
2314 ifstream ifile(docfile.Data());
2319 while ((ch = ifile.get()) != EOF)
2321 ss << static_cast<char>(ch);
2323 f_HelpText = ss.str();
2328 docfile = fBesVisPath +
"/docs/geom_sel.txt";
2336 ifstream ifile(geomsel_file);
2343 while ((ich = ifile.get()) != EOF)
2345 char ch =
static_cast<char>(ich);
2346 if (ch ==
'\n' || ch ==
'\r')
2349 if (line.length() == 0 || line.find(
'#') != string::npos)
2376 if (gDebug) cout <<
"BesClient::InitConnections called!" << endl;
2379 Connect((TCanvas*)fEmbeddedCanvas->GetCanvas(),
"ProcessedEvent(Int_t, Int_t, Int_t, TObject*)",
"BesClient",
2380 this,
"ExecuteEvent(Int_t, Int_t, Int_t, TObject*)");
2383 Connect(
"CloseWindow()",
"BesClient",
this,
"CloseWindow()");
2408 gInterpreter->DeleteGlobal(
this);
2417 fEmbeddedCanvas->GetCanvas()->EditorBar();
2431 cerr <<
"Menu item" <<
id <<
"selected" << endl;
2443 cout <<
"BesClient::HandleViewOptionMenu(), BesView does not exist in this pad" << endl;
2473 if ( fMenuViewOptionMdc->IsEntryChecked(
kM_Mdc_Tubes) ) {
2483 if ( fMenuViewOptionMdc->IsEntryChecked(
kM_Mdc_Wires) ) {
2503 if ( fMenuViewOptionTof->IsEntryChecked(
kM_Tof_East) ) {
2523 if ( fMenuViewOptionTof->IsEntryChecked(
kM_Tof_West) ) {
2543 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_East) ) {
2563 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_West) ) {
2573 if ( fMenuViewOptionEmc->IsEntryChecked(
kM_Emc_Side) ) {
2593 if ( fMenuViewOptionMuc->IsEntryChecked(
kM_Muc_East) ) {
2613 if ( fMenuViewOptionMuc->IsEntryChecked(
kM_Muc_West) ) {
2633 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Mdc) ) {
2648 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Tof) ) {
2663 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Emc) ) {
2678 if ( fMenuViewOptionFull3D->IsEntryChecked(
kM_Full3D_Muc) ) {
2693 if ( fMenuViewOptionOthers->IsEntryChecked(
kM_BeamPipe) ) {
2713 if ( fMenuViewOptionOthers->IsEntryChecked(
kM_Axis) ) {
2714 fMenuViewOptionOthers->UnCheckEntry(
kM_Axis);
2717 fMenuViewOptionOthers->CheckEntry(
kM_Axis);
2873 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Mdc) ) {
2883 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Tof) ) {
2893 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Emc) ) {
2903 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Muc) ) {
2913 if ( fMenuViewOptionTracks->IsEntryChecked(
kM_Tracks_Ext) ) {
2932 cerr <<
"MenuViewOption item" <<
id <<
"selected" << endl;
2939 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Modified();
2940 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Update();
2948 new TGMsgBox(gClient->GetRoot(),
this,
2950 gClient->GetPicture(
"mb_stop_s.xpm"),
2959 fStatusBar->SetText(msg, 1);
2967 fStatusBar->SetText(msg, 0);
2992 static TString GeoDir = fBesVisPath + TString(
"/geom/");
2994 fi.fFileTypes = OpenGeoTypes;
2995 fi.fIniDir = StrDup(GeoDir);
2997 sprintf(msg,
"Loading Geometry File");
2999 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3000 if (&fi == 0)
return;
3001 GeoDir = fi.fIniDir;
3013 if (fname.Length() == 0)
return;
3015 if (gDebug) cout << fname <<
" fname Length " << fname.Length() << endl;
3018 TString fpath, fpurename;
3019 if (fname.Contains(
"/"))
3021 Ssiz_t posLastSlash = fname.Last(
'/');
3024 fpath = fpath.Remove(posLastSlash+1, fname.Length()-posLastSlash-1);
3026 fpurename = fpurename.Remove(0, posLastSlash + 1);
3027 if (fpath.Length() == 0)
return;
3031 fpath = TString(
"");
3036 TString geompath = fBesVisPath + TString(
"/geom/");
3037 if (fname.BeginsWith(geompath))
3041 fCurGeom = fpurename;
3042 cout <<
"Open a default geometry " << fpurename.Data() << endl;
3046 fCurGeom = TString(
"");
3047 cout <<
"Open a user-defined geometry " << fpurename.Data() << endl;
3052 fCurGeom = TString(
"");
3053 cout <<
"Open a user-defined geometry " << fpurename.Data() << endl;
3067 if ( fname.EndsWith(
".gdml") ) {
3069 bool mrpc =
false, cgem =
false;
3070 fpurename.ToUpper();
3071 if (fpurename.Contains(
"MRPC")) mrpc =
true;
3080 if ( fname.EndsWith(
".root") ) {
3081 fGeoFile = TFile::Open(fname,
"read");
3083 TGeoVolume *volBes = (TGeoVolume*)(fGeoFile->Get(
"volBes"));
3092 this->
HandleError(
"This File is not a valid BesVis geometry file : \n TopVolume \"volBes\" not found!");
3093 sprintf(msg,
"This File is not a valid BesVis geometry file");
3113 this->
HandleError(
"Bes Geometry not found, Load from ROOT or GDML files first !");
3120 static TString EventDir(
".");
3123 fi.fIniDir = StrDup(EventDir);
3125 sprintf(msg,
"Saving Geometry ----> BUSY!");
3127 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3133 TString filename = fi.fFilename;
3135 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3136 TFile *
f =
new TFile(filename.Data() ,
"RECREATE");
3142 this->
HandleError(
"TGeoVolume \"volBes\" not found !");
3154 bool auto_sel_geom =
true;
3158 new TGMsgBox(gClient->GetRoot(),
this,
"BesVis",
3159 "Detector geometry has existed. Do you want to use current geometry?",
3160 gClient->GetPicture(
"mb_question_s.xpm"), kMBYes | kMBNo | kMBCancel, &clkbtn);
3161 if (clkbtn & kMBYes)
3163 auto_sel_geom =
false;
3166 else if (clkbtn & kMBNo) auto_sel_geom =
true;
3171 static TString EventDir(
".");
3174 fi.fIniDir = StrDup(EventDir);
3176 sprintf(msg,
"Loading Event File");
3178 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3179 EventDir = fi.fIniDir;
3189 std::cout <<
"OpenEventFile: " << fname << std::endl;
3195 if (fname.EndsWith(
".root") || fname.EndsWith(
".rtraw") || fname.EndsWith(
".rec") || fname.EndsWith(
".dst"))
3198 if (fEventFile) fEventFile->Close();
3206 fEventFile = TFile::Open(fname,
"read");
3211 if (fname.EndsWith(
".rec")) isRecEvent =
true;
3212 else isRecEvent =
false;
3216 fEventTree = (TTree*)fEventFile->Get(
"Event");
3221 Long64_t nEvents = fEventTree->GetEntries();
3227 if(f_bossMode ==
false)
3234 fEventTree->SetBranchAddress(
"TDigiEvent" , &fDigiEvent);
3235 fEventTree->SetBranchAddress(
"TRecEvent" , &fRecEvent_1);
3236 fEventTree->SetBranchAddress(
"TEvtHeader" , &fEvtHeader);
3237 fEventTree->SetBranchAddress(
"TDstEvent", &fDstEvent);
3240 GetEvent(fBesEventNo,
true, auto_sel_geom);
3241 fEventPlaySlider->SetRange(0, nEvents-1);
3242 fEventPlaySlider->SetPosition(0);
3246 fEventPlaySlider->SetRange(0, 0);
3247 fEventPlaySlider->SetPosition(0);
3252 this->
HandleError(
"This File is not a valid BesVis ROOT Event File : \n Event Tree \"Event\" not found!");
3253 sprintf(msg,
"This File contains no Event Tree \"Event\"");
3260 this->
HandleError(
"This File is not a valid BesVis ROOT Event File!");
3261 sprintf(msg,
"This File is not valid");
3278 static TString EventDir(
".");
3281 fi.fIniDir = StrDup(EventDir);
3283 sprintf(msg,
"Saving Picture ----> BUSY!");
3285 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3287 if ( fi.fFilename ) {
3288 TString filename = fi.fFilename;
3292 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3294 if ( filename.EndsWith(
"gif") || filename.EndsWith(
"GIF") ) {
3295 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"gif");
3297 else if ( filename.EndsWith(
"jpg") || filename.EndsWith(
"JPG") ) {
3298 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"jpg");
3300 else if ( filename.EndsWith(
"eps") || filename.EndsWith(
"EPS") ) {
3301 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"eps");
3303 else if ( filename.EndsWith(
"ps") || filename.EndsWith(
"PS") ) {
3304 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3306 else if ( filename.EndsWith(
"xpm") || filename.EndsWith(
"XPM") ) {
3307 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"xmp");
3309 else if ( filename.EndsWith(
"png") || filename.EndsWith(
"PNG") ) {
3310 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"png");
3312 else if ( filename.EndsWith(
"tiff") || filename.EndsWith(
"TIFF") ) {
3313 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"tiff");
3315 else if ( filename.EndsWith(
"cxx") || filename.EndsWith(
"CXX") ) {
3316 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"cxx");
3318 else if ( filename.EndsWith(
"xml") || filename.EndsWith(
"XML") ) {
3319 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"xml");
3321 else if ( filename.EndsWith(
"root") || filename.EndsWith(
"ROOT") ) {
3322 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"root");
3337 static TString PSEventDir(
".");
3340 fi.fIniDir = StrDup(PSEventDir);
3342 sprintf(msg,
"Saving Picture as PS ----> BUSY!");
3344 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3346 if ( fi.fFilename ) {
3347 TString filename = fi.fFilename;
3348 if ( filename.EndsWith(
"ps") || filename.EndsWith(
"PS") ) {
3349 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3353 fEmbeddedCanvas->GetCanvas()->Print(filename.Data(),
"ps");
3365 Double_t x1, y1, x2, y2;
3372 fHomeX[iPad] = 0.5*(x1+x2);
3373 fHomeY[iPad] = 0.5*(y1+y2);
3383 Double_t x1, y1, x2, y2, dx, dy;
3393 gPad->Range(fHomeX[iPad]-0.5*dx, fHomeY[iPad]-0.5*dy, fHomeX[iPad]+0.5*dx, fHomeY[iPad]+0.5*dy);
3410 if (!fDisplay)
return;
3413 static TString EventDir(
".");
3416 fi.fIniDir = StrDup(EventDir);
3418 sprintf(msg,
"Saving Style ----> BUSY!");
3420 new TGFileDialog(fClient->GetRoot(),
this, kFDSave, &fi);
3425 TString filename = fi.fFilename;
3427 if (!filename.EndsWith(
ptype)) filename +=
ptype;
3428 ofstream fileMyConfig(filename.Data(), ios_base::out);
3431 fileMyConfig <<
"BesVisStyle";
3436 fileMyConfig << *status;
3443 fileMyConfig << *status;
3450 fileMyConfig << *status;
3457 fileMyConfig << statuscgem;
3459 fileMyConfig << statuscgem;
3461 fileMyConfig << statuscgem;
3463 fileMyConfig.close();
3464 cout <<
"Save my style finished." << endl;
3478 if (!fDisplay)
return;
3481 static TString EventDir(
".");
3484 fi.fIniDir = StrDup(EventDir);
3486 sprintf(msg,
"Loading Style File");
3488 new TGFileDialog(fClient->GetRoot(),
this, kFDOpen, &fi);
3489 EventDir = fi.fIniDir;
3493 ifstream fileMyConfig(fi.fFilename);
3497 fileMyConfig >> header;
3498 if (header !=
"BesVisStyle")
3500 HandleError(
"This file is not a BesVis style file!");
3507 fileMyConfig >> status;
3514 fileMyConfig >> status;
3521 fileMyConfig >> status;
3527 fileMyConfig.close();
3537 cout<<
"BesClient Loading PaletteAxis ... "<<endl;
3554 TRootHelpDialog * hd =
new TRootHelpDialog(
this,
"Help on BesVis...", 600, 400);
3555 hd->SetText(f_HelpText.c_str());
3563 fDisplayModeButton[0]->
SetPicture(gClient->GetPicture(
"DisplayMode2D.gif"));
3564 fDisplayModeButton[1]->
SetPicture(gClient->GetPicture(
"DisplayModeXY.gif"));
3565 fDisplayModeButton[2]->
SetPicture(gClient->GetPicture(
"DisplayModeZR.gif"));
3566 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3D.gif"));
3567 fDisplayModeButton[4]->
SetPicture(gClient->GetPicture(
"DisplayModeAll.gif"));
3569 for (Int_t i = 0; i < kNDisplayMode; i++) fDisplayModeButton[i]->
SetState(
false);
3595 TViewerX3D *x3d =
dynamic_cast<TViewerX3D*
>(gPad->GetViewer3D(
"x3d"));
3596 if (!x3d) cout <<
" x3d does not exist "<< endl;
3597 else x3d->ExecCommand(0,0,
'r');
3603 fDisplayModeButton[3]->
SetState(
true);
3604 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
3625 TGLViewer *ogl =
dynamic_cast<TGLViewer*
>(gPad->GetViewer3D(
"ogl"));
3628 ogl->SetResetCamerasOnUpdate(
false);
3629 ogl->SetClearColor(kWhite);
3631 else cout <<
" ogl does not exist " << endl;
3638 fDisplayModeButton[3]->
SetState(
true);
3639 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
3655 TGMainFrame::CloseWindow();
3656 gApplication->Terminate(0);
3665 Long64_t nEvents = fEventTree->GetEntries();
3666 if (i >= 0 && i < nEvents) {
3673 if (f_bossMode ==
true)
3675 TBranch *digiEvent = fEventTree->GetBranch(
"TDigiEvent");
3676 TBranch *evtHeader = fEventTree->GetBranch(
"TEvtHeader");
3678 TBranch *disTrack = fEventTree->GetBranch(
"TDisTrack");
3679 digiEvent->SetAddress(&fDigiEvent);
3681 disTrack->SetAddress(&fRecEvent);
3682 disTrack->GetEntry(i);
3683 digiEvent->GetEntry(i);
3684 evtHeader->GetEntry(i);
3688 if (f_bossMode ==
false)
3691 cout <<
"[LPX] Get Event Entry test begin" << endl;
3692 fEventTree->GetEntry(i);
3693 cout <<
"[LPX] Successfully get Event Entry" << endl;
3722 fBesRunNo = fEvtHeader->
getRunId();
3723 cout <<
"Run Number: " << fBesRunNo << endl;
3733 HandleError(
"There is no suitable delector geometry! Please select a geometry file.");
3738 cout <<
"Select geometry file: " << ret << endl;
3739 TString geomfile = fBesVisPath + TString(
"/geom/");
3747 if (fCurGeom.Length() > 0)
3749 TString ts_ret = TString(ret);
3750 if (ts_ret != fCurGeom)
3752 new TGMsgBox(fClient->GetRoot(), GetMainFrame(),
"BesVis",
3753 "Maybe you have selected an unsuitable geometry!",
3754 kMBIconExclamation, kMBDismiss);
3766 cout<<
"WARNING:EsTimeCol size!=1, size="<<fRecEvent_1->
getEvTimeCol()->GetEntries()<<endl;
3780 delete [] recTrack1;
3785 for (
int i = 0; i < no; i++){
3818 for (
int i = 0; i < no; i++){
3833 for (
int i = 0; i < no; i++){
3848 for (
int i = 0; i < no; i++){
3856 delete [] emcshower;
3863 for (
int i = 0; i < no; i++){
3872 cout <<
"BesClient Construct DST tracks" << endl;
3875 delete [] recTrack1;
3879 for (
int i = 0; i < no; i++)
3891 for (
int i = 0; i < no; i++)
3899 delete [] emcshower;
3903 for (
int i = 0; i < no; i++)
3915 for (
int i = 0; i < no; i++)
3927 fEvent->
SetEvent(fDigiEvent, fRecEvent, fEvtHeader, fRecEvTime, isRecEvent);
3935 fAutoDisplayEvent = kFALSE;
3936 if (fAutoDisplayEventTimer) {
3937 fAutoDisplayEventTimer->TurnOff();
3938 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventPlay.gif"));
3942 s <<
"Request event entry " << i
3943 <<
" does not exist ! \n valid ("
3944 << 0 <<
"~" << nEvents - 1 <<
")";
3950 fAutoDisplayEvent = kFALSE;
3951 if (fAutoDisplayEventTimer) fAutoDisplayEventTimer->TurnOff();
3958 int semid, shmid,
n,
runNo;
3960 int sem_value_F, sem_value_O;
3963 if (fAutoDisplayEvent){
3964 if (fAutoDisplayEventTimer)
3965 fAutoDisplayEventTimer->TurnOn();
3966 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventStop.gif"));
3970 if ((semid = semget(f_pid, 2, 0)) == -1){
3971 perror(
"concumer -- access -- semget");
3998 if ((sem_value_O = semctl(semid,
OUTPUT_STORE, GETVAL, 0)) == -1){
3999 perror(
"Can not get OUTPUT_STORE");
4002 if (sem_value_O == 0)
return true;
4005 if (semop(semid, &
release, 1) == -1){
4006 perror(
"consumer -- increase -- freeSpace");
4009 std::cout <<
"read data error " << std::endl;
4015 if (semop(semid, &
acquire, 1) == -1){
4016 perror(
"consumer -- decrease -- storage");
4038 if (fCurrentEvent >= 1){
4045 fEvtHeader->
Clear();
4065 if (fEventFile == NULL){
4070 fEventFile->Close();
4101 if (semop(semid, &
release, 1) == -1){
4102 perror(
"consumer -- increase -- freeSpace");
4105 std::cout <<
"Current Event No. : " << fCurrentEvent++ << std::endl;
4132 if (!fEventTree)
return false;
4133 if (fBesEventNo + 1 >= fEventTree->GetEntries())
return false;
4137 if ( f_bossMode ==
false) {
4140 else if ( f_bossMode ==
true) {
4141 std::cout <<
"In Boss Mode, execute NextEvent()" << std::endl;
4144 if (!status) fBesEventNo--;
4153 if (!fEventTree)
return false;
4154 if (fBesEventNo <= 0)
return false;
4158 if ( f_bossMode ==
false){
4161 else if ( f_bossMode ==
true){
4163 this->
HandleError(
"Boss Mode can not get previous event!");
4165 if (!status) fBesEventNo++;
4174 if ( f_bossMode ==
false){
4178 else if ( f_bossMode ==
true){
4180 this->
HandleError(
"Boss Mode can not get first event!");
4190 if ( f_bossMode ==
false){
4191 fBesEventNo = fEventTree->GetEntries() - 1;
4194 else if ( f_bossMode ==
true){
4196 this->
HandleError(
"Boss Mode can not get last event!");
4206 fAutoDisplayEvent = !fAutoDisplayEvent;
4207 std::cout <<
"(AutoDisplayEvent)fAutoDisplayEvent: " << fAutoDisplayEvent << std::endl;
4208 if (fAutoDisplayEventTimer) {
4209 if (fAutoDisplayEvent) {
4210 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventStop.gif"));
4211 fAutoDisplayEventTimer->TurnOn();
4214 fPlayEventButton->
SetPicture(gClient->GetPicture(
"ButtonEventPlay.gif"));
4215 fAutoDisplayEventTimer->TurnOff();
4240 fAutoRotate = !fAutoRotate;
4243 fAutoRotateClockWise = 0;
4244 fAutoRotateTheta = 0;
4249 if (fAutoRotateTimer) {
4250 if (fAutoRotate) fAutoRotateTimer->TurnOn();
4251 else fAutoRotateTimer->TurnOff();
4259 if (fAutoRotateClockWise != 0) {
4263 if (fAutoRotateTheta != 0) {
4267 if (fAutoRotatePhi != 0) {
4271 if (fAutoRotatePsi != 0) {
4303 if (fDisplay->
GetPadXY()->GetView()) {
4304 phi = fDisplay->
GetPadXY()->GetView()->GetLongitude();
4305 phi += clockwise * fRotateStep;
4306 fDisplay->
GetPadXY()->GetView()->SetView(phi,
4307 fDisplay->
GetPadXY()->GetView()->GetLatitude(),
4308 fDisplay->
GetPadXY()->GetView()->GetPsi(), iret);
4312 if (fDisplay->
GetPadZR()->GetView()) {
4316 fDisplay->
GetPadZR()->GetView()->SetView(phi,
4317 fDisplay->
GetPadZR()->GetView()->GetLatitude(),
4318 fDisplay->
GetPadZR()->GetView()->GetPsi(), iret);
4331 Double_t theta = view->
GetLatitude() + pn*fRotateStep;
4363 Double_t psi = view->
GetPsi() + pn*fRotateStep;
4378 if ( entry->GetFirstChild() != 0 ) {
4380 if ( entry->IsOpen() ) {
4381 fEventListTree->CloseItem(entry);
4383 fEventListTree->OpenItem(entry);
4386 fEventListTree->HighlightItem(entry);
4387 gClient->NeedRedraw(fEventListTree);
4391 fRunItem = entry->GetParent();
4392 TString msg1(
"Displaying Run ");
4397 TString msg2(
"Run ");
4402 TCanvas *canvas = (TCanvas*)fEmbeddedCanvas->GetCanvas();
4429 if ( py <= 0 ) py = 1;
4466 fEmbeddedCanvas->GetCanvas()->Update();
4473 fEmbeddedCanvas->GetCanvas()->Update();
4478 fEmbeddedCanvas->GetCanvas()->Update();
4483 fEmbeddedCanvas->GetCanvas()->Update();
4488 fEmbeddedCanvas->GetCanvas()->Update();
4493 fEmbeddedCanvas->GetCanvas()->Update();
4498 fEmbeddedCanvas->GetCanvas()->Update();
4506 if ( gPad->GetName() != TString(
"PadHeader")) {
4507 TString info(sel->GetTitle());
4509 info.Append(sel->GetObjectInfo(px, py));
4526 TGButton *btn = (TGButton *) gTQSender;
4527 id = btn->WidgetId();
4536 fDisplay->
SetVisHeader(fChkBtnHeaderGlobal->GetState());
4707 this->SetMdcTFire(fChkBtnMdcTMatchGlobal->GetState());
4711 this->SetMdcQFire(fChkBtnMdcQMatchGlobal->GetState());
4719 this->SetMdcQNotOverflow(fChkBtnMdcQOverflowGlobal->GetState());
4723 this->SetMdcColorfulWire(fChkBtnMdcColorfulWireGlobal->GetState());
4727 this->SetMdcTimeSubEvTime(fChkBtnMdcTimeSubEvTimeGlobal->GetState());
4731 this->SetTofTMatch(fChkBtnTofTMatchGlobal->GetState());
4735 this->SetTofQMatch(fChkBtnTofQMatchGlobal->GetState());
4742 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Modified();
4743 ((TCanvas*)fEmbeddedCanvas->GetCanvas())->Update();
5032 fMenuViewOptionOthers->CheckEntry(
kM_Axis);
5033 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxisST.gif"));
5037 fMenuViewOptionOthers->UnCheckEntry(
kM_Axis);
5038 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxis.gif"));
5164 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeViewST.gif"));
5167 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeView.gif"));
5172 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelView.gif"));
5173 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveViewST.gif"));
5176 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelViewST.gif"));
5177 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveView.gif"));
5189 TGButton *btn = (TGButton *) gTQSender;
5190 id = btn->WidgetId();
5195 Int_t displayMode = 0;
5197 Double_t xmin=0.0, ymin=0.0, xmax=0.0, ymax=0.0;
5199 xmin = gPad->GetX1();
5200 ymin = gPad->GetY1();
5201 xmax = gPad->GetX2();
5202 ymax = gPad->GetY2();
5206 if (gPad) view =
dynamic_cast<BesView*
>(gPad->GetView());
5214 fLoadGeoFileButton->
SetPicture(gClient->GetPicture(
"ButtonLoadGeoFile.gif"));
5219 fOpenEventFileButton->
SetPicture(gClient->GetPicture(
"ButtonOpenEventFile.gif"));
5224 fSavePicAsButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAs.gif"));
5228 fSavePicAsPSButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAsPSHL.gif"));
5230 fEmbeddedCanvas->GetCanvas()->Print(
"besvis.ps",
"ps");
5231 fSavePicAsPSButton->
SetPicture(gClient->GetPicture(
"ButtonSavePicAsPS.gif"));
5236 if (view) fDisplay->
Refresh();
5242 if (view) view->
Reset();
5246 if (view) fDisplay->
Reset();
5251 fCursorButton[0]->
SetPicture(gClient->GetPicture(
"ButtonCursorPickST.gif"));
5253 fCursorButton[1]->
SetPicture(gClient->GetPicture(
"ButtonCursorHand.gif"));
5261 fCursorButton[0]->
SetPicture(gClient->GetPicture(
"ButtonCursorPick.gif"));
5263 fCursorButton[1]->
SetPicture(gClient->GetPicture(
"ButtonCursorHandST.gif"));
5272 if (view) view->
ZoomIn();
5285 fSaveMyConfigButton->
SetPicture(gClient->GetPicture(
"ButtonSaveMyConfig.gif"));
5290 fLoadMyConfigButton->
SetPicture(gClient->GetPicture(
"ButtonLoadMyConfig.gif"));
5295 fPaletteButton->
SetPicture(gClient->GetPicture(
"ButtonPalette.gif"));
5306 fShowInfoButton->
SetPicture(gClient->GetPicture(
"ButtonShowInfoST.gif"));
5310 fShowInfoButton->
SetPicture(gClient->GetPicture(
"ButtonShowInfo.gif"));
5318 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxisST.gif"));
5322 fShowAxisButton->
SetPicture(gClient->GetPicture(
"ButtonShowAxis.gif"));
5333 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeViewST.gif"));
5334 fFishEyeViewButton->
SetState(
true);
5337 fFishEyeViewButton->
SetPicture(gClient->GetPicture(
"ButtonFishEyeView.gif"));
5338 fFishEyeViewButton->
SetState(
false);
5345 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelViewST.gif"));
5346 fParallelViewButton->
SetState(
true);
5347 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveView.gif"));
5348 fPerspectiveViewButton->
SetState(
false);
5359 fParallelViewButton->
SetPicture(gClient->GetPicture(
"ButtonParallelView.gif"));
5360 fParallelViewButton->
SetState(
false);
5361 fPerspectiveViewButton->
SetPicture(gClient->GetPicture(
"ButtonPerspectiveViewST.gif"));
5362 fPerspectiveViewButton->
SetState(
true);
5370 fX3DButton->
SetPicture(gClient->GetPicture(
"ButtonX3D.gif"));
5375 fOpenGLButton->
SetPicture(gClient->GetPicture(
"ButtonOpenGL.gif"));
5406 if (fAutoRotateClockWise != -1) {
5407 fAutoRotateClockWise = -1;
5410 else fAutoRotateClockWise = 0;
5417 if (fAutoRotateClockWise != 1) {
5418 fAutoRotateClockWise = 1;
5421 else fAutoRotateClockWise = 0;
5427 if (view) view->
Move(0,-10);
5433 if (view) view->
Move(0,10);
5438 if (view) view->
Move(-10,0);
5443 if (view) view->
Move(10,0);
5448 if (view) view->
Center();
5454 if (fAutoRotateTheta != 1) fAutoRotateTheta = 1;
5455 else fAutoRotateTheta = 0;
5462 if (fAutoRotateTheta != -1) fAutoRotateTheta = -1;
5463 else fAutoRotateTheta = 0;
5470 if (fAutoRotatePhi != 1) {
5472 fAutoRotateClockWise = 0;
5474 else fAutoRotatePhi = 0;
5481 if (fAutoRotatePhi != -1) {
5482 fAutoRotatePhi = -1;
5483 fAutoRotateClockWise = 0;
5485 else fAutoRotatePhi = 0;
5493 if (fAutoRotatePsi != 1) fAutoRotatePsi = 1;
5494 else fAutoRotatePsi = 0;
5503 if (fAutoRotatePsi != -1) fAutoRotatePsi = -1;
5504 else fAutoRotatePsi = 0;
5515 fDisplayModeButton[0]->
SetState(
true);
5516 fDisplayModeButton[0]->
SetPicture(gClient->GetPicture(
"DisplayMode2DST.gif"));
5523 fDisplayModeButton[1]->
SetState(
true);
5524 fDisplayModeButton[1]->
SetPicture(gClient->GetPicture(
"DisplayModeXYST.gif"));
5531 fDisplayModeButton[2]->
SetState(
true);
5532 fDisplayModeButton[2]->
SetPicture(gClient->GetPicture(
"DisplayModeZRST.gif"));
5539 fDisplayModeButton[3]->
SetState(
true);
5540 fDisplayModeButton[3]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
5547 fDisplayModeButton[4]->
SetState(
true);
5548 fDisplayModeButton[4]->
SetPicture(gClient->GetPicture(
"DisplayModeAllST.gif"));
5556 if (displayMode >= kNDisplayMode) displayMode = 0;
5561 switch (displayMode)
5564 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayMode2DST.gif"));
5567 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeXYST.gif"));
5570 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeZRST.gif"));
5573 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayMode3DST.gif"));
5576 fDisplayModeButton[displayMode]->
SetPicture(gClient->GetPicture(
"DisplayModeAllST.gif"));
5600 if (gDebug) cout <<
"BesClient::DoSlider called!" << endl;
5602 TGButton *btn = (TGButton *) gTQSender;
5603 Int_t
id = btn->WidgetId();
5611 fEventPlaySlider->SetPosition(slider);
5613 fBesEventNo = slider;
5645 TCanvas *canvas = (TCanvas*)fEmbeddedCanvas->GetCanvas();
5646 TPad *curPad = (TPad*)gPad;
5652 cout <<
"update xy view" << endl;
5654 else cout <<
"no xy view" << endl;
5660 cout <<
"update zr view" << endl;
5662 else cout <<
"no zr view" << endl;
5668 cout <<
"update 3d view" << endl;
5670 else cout <<
"no 3d view" << endl;
5769 fZoomRatioNumber->SetNumber(view->
GetZoomRatio()*100.0);
5773 Double_t psi = view->
GetPsi();
5777 fViewAngleThetaNumber->SetNumber(theta);
5778 fViewAnglePhiNumber->SetNumber(phi);
5779 fViewAnglePsiNumber->SetNumber(psi);
5781 fViewAngleThetaSlider->SetPosition((Int_t)fViewAngleThetaNumber->GetNumber());
5782 fViewAnglePhiSlider->SetPosition((Int_t)fViewAnglePhiNumber->GetNumber());
5783 fViewAnglePsiSlider->SetPosition((Int_t)fViewAnglePsiNumber->GetNumber());
5785 fChkBtnAutoRotate->SetOn(fAutoRotate);
5793 if (gDebug) cout <<
"BesClient::ChangeFocus called!" << endl;
5795 if ( gTQSender == fNumEntryRunNo->GetNumberEntry() ) {
5796 fNumEntryEventNo->GetNumberEntry()->SelectAll();
5797 fNumEntryEventNo->GetNumberEntry()->SetFocus();
5799 else if ( gTQSender == fNumEntryEventPlaySpeed->GetNumberEntry() ) {
5800 fNumEntryEventPlaySpeed->GetNumberEntry()->SelectAll();
5801 fNumEntryEventPlaySpeed->GetNumberEntry()->SetFocus();
5803 else if ( gTQSender == fNumEntryMagnetic->GetNumberEntry() ) {
5804 fNumEntryMagnetic->GetNumberEntry()->SelectAll();
5805 fNumEntryMagnetic->GetNumberEntry()->SetFocus();
5814 if (gDebug) cout <<
"BesClient::ExecuteReturn called!" << endl;
5820 if ( gTQSender == fZoomRatioNumber ) {
5821 if (view) view->
SetZoomRatio(fZoomRatioNumber->GetNumber()/100.0);
5824 if ( gTQSender == fNumEntryEventNo->GetNumberEntry() ) {
5829 Long64_t tempno = fBesEventNo;
5830 fBesEventNo = fNumEntryEventNo->GetIntNumber();
5831 if (!this->
GetEvent(fBesEventNo)) fBesEventNo = tempno;
5834 else if ( gTQSender == fNumEntryEventPlaySpeed->GetNumberEntry() ) {
5835 fEventPlaySpeed = Int_t(fNumEntryEventPlaySpeed->GetNumber() * 1000);
5836 fAutoDisplayEventTimer->SetTime(fEventPlaySpeed);
5839 else if ( gTQSender == fNumEntryRotateSpeed ) {
5840 fRotateSpeed = fNumEntryRotateSpeed->GetNumber();
5842 cout <<
"fRotateSpeed " << fRotateSpeed <<
" fRotateStep " << fRotateStep << endl;
5846 else if ( gTQSender == fNumEntryRotateFPS->GetNumberEntry() ) {
5847 fRotateFPS = fNumEntryRotateFPS->GetIntNumber();
5849 fAutoRotateTimer->SetTime((Int_t)1000/fRotateFPS);
5850 cout <<
"fRotateFPS " << fRotateFPS <<
" fRotateStep " << fRotateStep << endl;
5853 else if ( gTQSender == fNumEntryMagnetic->GetNumberEntry() ) {
5860 else if ( gTQSender == fNumEntryRotateStep ) {
5861 fRotateStep = fNumEntryRotateStep->GetNumber();
5862 fRotateSpeed = fRotateStep * fRotateFPS;
5863 cout <<
"fRotateSpeed " << fRotateSpeed <<
" fRotateStep " << fRotateStep << endl;
5866 else if ( gTQSender == fViewAngleThetaNumber ) {
5872 else if ( gTQSender == fViewAnglePhiNumber ) {
5878 else if ( gTQSender == fViewAnglePsiNumber ) {
5884 fEmbeddedCanvas->RequestFocus();
5891 TString filePath = fBesVisPath;
5892 filePath +=
"/icons/";
5895 TASImage asImage(filePath);
5896 Pixmap_t pic = asImage.GetPixmap();
5904 return (!gSystem->AccessPathName(fname, kFileExists));
5910 Double_t range =
max -
min;
5915 while (input <
min);
5922 while (input >=
max);
5929 if ((TPad*)gPad == fDisplay->
GetPadXY())
return "XY view";
5930 else if ((TPad*)gPad == fDisplay->
GetPadZR())
return "ZR view";
5931 else if ((TPad*)gPad == fDisplay->
GetPad3D())
return "3D view";
5932 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_ViewMoveRight
@ kM_Button_DisplayMode3D
@ kM_Button_ViewMoveCenter
@ 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 SetEvent(TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TRecEvTime *recEvTime, Bool_t isRec)
const char * getGeomFileNameFromRunNo(int run_no)
bool hasGeomFile(const char *fname)
void addGeomFile(const char *fname, int startno)
EmcROOTGeo * GetEmcROOTGeo()
MdcROOTGeo * GetMdcROOTGeo()
virtual void SetPhysicalDefaultVis()
MucROOTGeo * GetMucROOTGeo()
TofROOTGeo * GetTofROOTGeo()
void Transfer(BesStatus *right, Bool_t set)
void Default(EBESViewType type)
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)
void SetVisEmcHitsGlobal(Bool_t input)
void SetVisEmcEast(Bool_t input)
Bool_t GetVisMucHitsEast()
void SetVisTracksExt(Bool_t input)
void SetVisMdcHits(Bool_t input)
void SetVisTracksTof(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()
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 SetVisFull3DTof(Bool_t input)
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)
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 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 SetVisEmcHitsBarrel(Bool_t input)
BesStatus * GetStatusXY()
Bool_t GetVisTofHitsWest()
Bool_t GetVisTofHitsGlobal()
void SetVisFull3DMuc(Bool_t input)
Bool_t GetVisZRPlaneOnXY()
void SetVisFull3DMdc(Bool_t input)
void SetZoomRatio(Double_t ratio)
void SetVisBeamPipe(Bool_t input)
void SetVisTofEast(Bool_t input)
Bool_t GetVisEmcHitsEast()
void SetVisMdcHitsGlobal(Bool_t input)
void SetVisMucHitsWest(Bool_t input)
void SetVisMucBarrel(Bool_t input)
void SetVisMucGlobal(Bool_t input)
Bool_t GetVisTofHitsBarrel()
void SetVisEmcWest(Bool_t input)
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="")
virtual void InitGeometryFromROOT(TGeoVolume *bes)
virtual void SetVisHeader(Bool_t val)
virtual void SwitchDisplayMode(Int_t mode)
virtual void SetCanvas(TCanvas *c=0)
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 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 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 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)
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")