CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
BesClient.h
Go to the documentation of this file.
1#ifndef BES_Client_H
2#define BES_Client_H
3
4#include <cstdio> //Long Peixun's update: stdio.h -> cstdio
5#include <unistd.h>
6#include <cstdlib> //Long Peixun's update: stdlib.h -> cstdlib
7#include <sys/sem.h>
8#include <sys/types.h>
9#include <sys/ipc.h>
10//#include <wait.h>
11#include <cstring> //Long Peixun's update: string.h -> cstring
12#include <string> //Long Peixun's update: std::string class
13
14#include <TSystem.h>
15#include <TGFrame.h>
16#include <TGeometry.h>
17#include <TGNumberEntry.h>
18#include <TViewerX3D.h>
19#include <TTimer.h>
20#include <TASImage.h>
21
22//Long Peixun's update: remove redundant include
23// #include <stdio.h>
24// #include <stdlib.h>
25
26//Long Peixun's update: for geometry selection
27#include "BesGeoSelector.h"
31#include "BesVisLib/BesEvent.h"
37#include "RootEventData/TRecCgemCluster.h" //Long Peixun's update: for CGEM clusters
38#include "RootEventData/TDstEvent.h" //Long Peixun's update: for dst file
40
41// semphore
42union semun{
43 int val;
44 struct semid_ds *buf;
45 ushort *array;
46};
47
48//struct sembuf acquire = {0, -1, SEM_UNDO};
49//struct sembuf release = {0, 1, SEM_UNDO};
50
53
54
55// BesVis GUI command IDs
56#ifndef BES_EZCommand
57#define BES_EZCommand
70};
71#endif
72
73// Bes button command IDs
74#ifndef BES_EZButtons
75#define BES_EZButtons
102 kM_Button_DisplayModeCgemUF, //Long Peixun's update: Add Cgem Unfolded View Button
103 kM_Button_DisplayModeCgemUFAll, //Long Peixun's update: Add Cgem Unfolded All View Button
172#endif
173
174// BesVis running modes
175#ifndef BES_EZMode
176#define BES_EZMode
177enum EZMode {
178 kModeOnline = BIT(0),
179 kModeFile = BIT(1),
180 kModeDown = BIT(2),
181 kModeBes = BIT(3),
182 kModePR = BIT(4)
184#endif
185
186#ifndef BES_EZMenuViewOption
187#define BES_EZMenuViewOption
190 //kM_Header_On, //Long Peixun's update: remove kM_Header_On, because we just need kM_Header_Global
191 kM_Cgem_Global, //Long Peixun's update: Add CGEM opitons
212 kM_Full3D_Cgem, //Long Peixun's update: Add CGEM option
220 kM_CgemHits_Global, //Long Peixun's update: Add Cgem hits option
252 //kM_Mdc_TOverflow_Global,
261#endif
262
263class TList;
264class TRootEmbeddedCanvas;
265class TApplication;
266class TInterpreter;
267class TFile;
268class TTimer;
269class TBranch;
270class TTree;
271class TGPopupMenu;
272class TGStatusBar;
273class TGHorizontal3DLine;
274class TGLayoutHints;
275class TGMenuBar;
276class TGNumberEntry;
277class TGNumberFormat;
278class TGLabel;
279class TGHButtonGroup;
280class TGRadioButton;
281class TGCheckButton;
282class TGTextButton;
283class TGTextBuffer;
284class TGTextEntry;
285class TGHProgressBar;
286class TGButton;
287class TGPictureButton;
288class TGFileInfo;
289class TGFileDialog;
290class TGMsgBox;
291class TGGroupFrame;
292class TGTab;
293class TGVSplitter;
294class TGCanvas;
295class TGListTree;
296class TGListTreeItem;
297class TGHSlider;
298class TGVSlider;
299class TCanvas;
300class TView;
301class TGListTreeItem;
302
303class BesClient : public TGMainFrame {
304
305 private:
306 runStatus f_runStatus;
307 TGeometry *fGeometry; // Bes geometry
308 TFile *fGeoFile; // ROOT geometry file contains volBes
309 TFile *fEventFile; // Current event file
310 TTree *fEventTree; // Current event tree
311 BesEvent *fEvent; // Current Bes event
312 TEvtHeader *fEvtHeader;
313 TRecEvTime *fRecEvTime;
314 //TTrigEvent *fTrigEvent;
315 TDigiEvent *fDigiEvent;
316 TRecTrackEvent *fRecEvent_1;
317 TRecMdcTrack *recTrack1;
318 TRecMucTrack *muctrk;
319 TRecTofTrack *tofTrack;
320 //TRecMdcKalTrack *kalTrack;
321 TRecMdcHit *mdchit;
322 TRecEmcShower *emcshower;
323 TDstEvent* fDstEvent; //Long Peixun's update: for tracks from dst file
324 Bool_t isRecEvent; //Long Peixun's update: is this event rec event?
325 TMcEvent* fMcEvent;
326
327 TRecCgemCluster *cgemCluster; //Long Peixun's update: for CGEM clusters
328 Int_t NCluster; //...
329
330 TGLayoutHints *fMenuBarLayout; // Menu bar layout
331 TGLayoutHints *fMenuBarFirstItemLayout; // First Item popup menu layout
332 TGLayoutHints *fMenuBarItemLayout; // Item popup menu layout
333 TGLayoutHints *fMenuBarLastItemLayout; // Last Item popup menu layout
334 TGLayoutHints *fECLayout; // Embedded canvas layout
335
336 BesGMenuBar *fMenuBar; // Menu bar
337
338 TGPopupMenu *fMenuFile; // File menu
339 TGPopupMenu *fMenuEdit; // Edit menu
340 TGPopupMenu *fMenuView; // View menu
341 TGPopupMenu *fMenuHelp; // Help menu
342
343 TGPopupMenu *fMenuViewOptionHeader;
344 TGPopupMenu *fMenuViewOptionCgem; //Long Peixun's update: Add CGEM popup menu
345 TGPopupMenu *fMenuViewOptionMdc;
346 TGPopupMenu *fMenuViewOptionTof;
347 TGPopupMenu *fMenuViewOptionEmc;
348 TGPopupMenu *fMenuViewOptionMuc;
349 TGPopupMenu *fMenuViewOptionFull3D;
350 TGPopupMenu *fMenuViewOptionOthers;
351 TGPopupMenu *fMenuViewOptionCgemHits; //Long Peixun's update: Add CGEM hits popup menu
352 TGPopupMenu *fMenuViewOptionMdcHits;
353 TGPopupMenu *fMenuViewOptionTofHits;
354 TGPopupMenu *fMenuViewOptionEmcHits;
355 TGPopupMenu *fMenuViewOptionMucHits;
356 TGPopupMenu *fMenuViewOptionTracks;
357 TGPopupMenu *fMenuViewOptionMC;
358
359 TGLayoutHints *fUpButtonBarFirstItemLayout; // Up button bar first button layout
360 TGLayoutHints *fUpButtonBarItemLayout; // Up button bar button layout
361 TGLayoutHints *fUpButtonBarLastItemLayout; // Up button bar last button layout
362 TGCompositeFrame *fUpButtonBarFrame; // Up button bar frame
363
364 static const int kNUpSplitter = 4;
365 BesGPictureButton *fUpButtonSplitter[kNUpSplitter]; // Up button bar splitter
366 BesGPictureButton *fLoadGeoFileButton; // load geometry file
367 BesGPictureButton *fOpenEventFileButton; // open event file
368 BesGPictureButton *fSaveGeoAsButton; // save geometry as root file
369 BesGPictureButton *fSavePicAsButton; // save picture as
370 BesGPictureButton *fSavePicAsPSButton; // save picture as pdf
371 static const int kNCursorState = 2;
372 BesGPictureButton *fRefreshButton; // Refresh
373 BesGPictureButton *fResetCurrentButton; // Reset current pad
374 BesGPictureButton *fResetAllButton; // Reset all pad
375 BesGPictureButton *fCursorButton[kNCursorState]; // cursor state, pick or hand
376 BesGPictureButton *fZoomInButton; // ZoomIn
377 BesGPictureButton *fZoomOutButton; // ZoomOut
378 TGNumberEntryField *fZoomRatioNumber; // ZoomRatio number
379 BesGPictureButton *fZoomRatioPercentButton; // "%" picture
380 BesGPictureButton *fSwitchDisplayModeButton; // button to switch among display modes
381 BesGPictureButton *fSetHomeButton; // Set home position
382 BesGPictureButton *fGoHomeButton; // Go to home position
383 BesGPictureButton *fSaveMyConfigButton; // Save my style
384 BesGPictureButton *fLoadMyConfigButton; // Load my style
385 BesGPictureButton *fPaletteButton; // Display palette axis
386 BesGPictureButton *fHelpButton; // Help
387
388 TGLayoutHints *fDisplayModeBarItemLayout; // Display mode bar button layout
389 TGCompositeFrame *fDisplayModeBarFrame; // Display mode bar frame
390 static const int kNDisplayMode = 7; //Long Peixun's update: 5 -> 7, add CGEM UF View and UF All View
391 BesGPictureButton *fDisplayModeButton[kNDisplayMode]; // button to switch among display modes
392
393 TGLayoutHints *fToolBarFirstItemLayout; // Tool bar first button layout
394 TGLayoutHints *fToolBarItemLayout; // Tool bar button layout
395 TGLayoutHints *fToolBarLastItemLayout; // Tool bar last button layout
396 TGCompositeFrame *fToolBarFrame; // Tool bar frame
397
398 static const int kNToolSplitter = 4;
399 BesGPictureButton *fToolButtonSplitter[kNToolSplitter]; // Tool button bar splitter
400 BesGPictureButton *fSwitchPadButton; // button to switch among pads
401 BesGPictureButton *fShowInfoButton; // Show info or not
402 BesGPictureButton *fShowAxisButton; // Show axis or not
403 BesGPictureButton *fFishEyeViewButton; // FishEye view
404 BesGPictureButton *fParallelViewButton; // Parallel view
405 BesGPictureButton *fPerspectiveViewButton; // Perspective view
406 BesGPictureButton *fX3DButton; // X3D view
407 BesGPictureButton *fOpenGLButton; // OpenGL view
408
409 TGCanvas *fEventListView; // Canvas for event list tree
410 TRootEmbeddedCanvas *fEmbeddedCanvas; // Embedded Canvas
411 TCanvas *fCanvas;
412 BesVisDisplay *fDisplay;
413
414 TGVerticalFrame *fV1; // Splitter for tabs
415
416 TGTab *fTabs; // Tabs for event
417
418 TGListTree *fEventListTree; // Event list tree
419 TGListTreeItem *fItem; // Active event list tree item
420 TGListTreeItem *fRunItem; // Active run list tree item
421
422
423 TGCompositeFrame *fEventDownFrame; // tab fame for download mode
424 TGCompositeFrame *fEventControlFrame; // Frame for event control
425 TGCompositeFrame *fEventControlTextFrame; // Frame for label "Event Control"
426 TGCompositeFrame *fEventNavFrame; // Frame for Event navigation
427 TGCompositeFrame *fEventPlayTextFrame; // Frame for label "Event Play"
428 TGCompositeFrame *fEventPlayButtonFrame; // Frame for buttons "prev, next, play, stop"
429 TGCompositeFrame *fEventPlaySpeedFrame; // Frame for set event play speed
430 TGCompositeFrame *fEventListFrame; // Frame for event list browser
431 TGCompositeFrame *fEventListTextFrame; // Frame for label "Event file list"
432 TGCompositeFrame *fEventListContentFrame; // Frame for event list content
433
434 TGCompositeFrame *fAutoFrame; // Frame for auto control
435 TGCompositeFrame *fAutoTextFrame; // Frame for label "Auto Control"
436
437 TGCompositeFrame *fViewFrame; // Frame for view control
438 TGCompositeFrame *fViewTextFrame; // Frame for label "View Control"
439 TGCompositeFrame *fViewContentFrame; // Frame for view content
440 TGCompositeFrame *fViewContent1Frame; // Frame for view content first line
441 TGCompositeFrame *fViewContent2Frame; // Frame for view content seconde line
442 TGCompositeFrame *fViewContent3Frame; // Frame for view content third line
443 TGCompositeFrame *fViewAngleFrame; // Frame for view angles
444 TGCompositeFrame *fViewAngleThetaFrame; // Frame for view theta
445 TGCompositeFrame *fViewAnglePhiFrame; // Frame for view phi
446 TGCompositeFrame *fViewAnglePsiFrame; // Frame for view psi
447
448 TGNumberEntry *fNumEntryRunNo; // Bes input of run number
449 TGNumberEntry *fNumEntryEventNo; // Bes input of event number
450 TGNumberEntry *fNumEntryEventPlaySpeed; // event play speed number
451 //TGNumberEntry *fBesSamplePos; // Bes input of sample position
452
453 TGLabel *fEventControlTextLabel; // Label "Event control"
454 TGLabel *fBesLabelRun; // Label "Run : "
455 TGLabel *fBesLabelEvent; // Label "Event : "
456 TGLabel *fEventPlayTextLabel; // Label "Event Play"
457 TGLabel *fEventPlaySpeedLabel; // Label "Play Speed : "
458 TGLabel *fEventListTextLabel; // Label "Event file list"
459 TGLabel *fViewTextLabel; // Label "View control"
460 TGLabel *fAutoTextLabel; // Label "Auto control"
461
462 TGHSlider *fEventPlaySlider; // slider for event play
463 BesGPictureButton *fPrevEventButton; // next event button
464 BesGPictureButton *fNextEventButton; // prev event button
465 BesGPictureButton *fPlayEventButton; // next event button
466 BesGPictureButton *fFirstEventButton; // prev event button
467
468 BesGPictureButton *fViewResetAngleButton; // View reset angle button
469 BesGPictureButton *fViewCounterClockWiseButton; // View CounterClockWise button
470 BesGPictureButton *fViewClockWiseButton; // View ClockWise button
471 BesGPictureButton *fViewMoveUpButton; // View MoveUp button
472 BesGPictureButton *fViewMoveLeftButton; // View MoveLeft button
473 BesGPictureButton *fViewMoveRightButton; // View MoveRight button
474 BesGPictureButton *fViewMoveDownButton; // View MoveDown button
475 BesGPictureButton *fViewMoveCenterButton; // View MoveCenter button
476
477 BesGPictureButton *fViewAngleThetaPlusButton; // View AngleTheta + button
478 BesGPictureButton *fViewAngleThetaMinusButton; // View AngleTheta - button
479 TGVSlider *fViewAngleThetaSlider; // View AngleTheta slider
480 TGNumberEntryField *fViewAngleThetaNumber; // View AngleTheta number
481 TGLabel *fViewAngleThetaLabel; // Label "Theta"
482
483 BesGPictureButton *fViewAnglePhiPlusButton; // View AnglePhi + button
484 BesGPictureButton *fViewAnglePhiMinusButton; // View AnglePhi - button
485 TGVSlider *fViewAnglePhiSlider; // View AnglePhi slider
486 TGNumberEntryField *fViewAnglePhiNumber; // View AnglePhi number
487 TGLabel *fViewAnglePhiLabel; // Label "Phi"
488
489 BesGPictureButton *fViewAnglePsiPlusButton; // View AnglePsi + button
490 BesGPictureButton *fViewAnglePsiMinusButton; // View AnglePsi - button
491 TGVSlider *fViewAnglePsiSlider; // View AnglePsi slider
492 TGNumberEntryField *fViewAnglePsiNumber; // View AnglePsi number
493 TGLabel *fViewAnglePsiLabel; // Label "Psi"
494
495 TGCompositeFrame *fRotateStepFrame; // Frame for RotateStep
496 TGLabel *fRotateStepLabel; // Label "Deg"
497 TGNumberEntryField *fNumEntryRotateStep; // Rotate step
498 TGLabel *fRotateStepUnitLabel; // Label "Deg"
499
500 TGGroupFrame *fFrameAutoRotate; // Frame for AutoRotate
501 TGCheckButton *fChkBtnAutoRotate; // CheckButton AutoRotate;
502
503 TGCompositeFrame *fRotateSpeedFrame; // Frame for RotateSpeed
504 TGNumberEntryField *fNumEntryRotateSpeed; // Auto Rotate speed number
505 TGLabel *fRotateSpeedLabel; // Label "Deg/Sec"
506
507 TGCompositeFrame *fRotateFPSFrame; // Frame for RotateFPS
508 TGNumberEntry *fNumEntryRotateFPS; // Auto Rotate fps number
509 TGLabel *fRotateFPSLabel; // Label "fps"
510
511
512 TGStatusBar *fStatusBar; // Status bar
513
514 TGGroupFrame *fFrameHeader; // Frame for Header
515 TGGroupFrame *fFrameHits; // Frame for Hits
516 TGGroupFrame *fFrameTracks; // Frame for Tracks
517
518 TGGroupFrame *fFrameSubDetector;
519 //TGGroupFrame *fFrameMdc;
520 //TGGroupFrame *fFrameTof;
521 //TGGroupFrame *fFrameEmc;
522 //TGGroupFrame *fFrameMuc;
523 TGGroupFrame *fFrameOthers;
524
525 TGGroupFrame *fFrameMdcMatch; // Frame for TQMatch
526 TGGroupFrame *fFrameTofMatch; // Frame for TQMatch
527 TGGroupFrame *fFrameMagnetic; // Frame for magnetic field
528
529 TGHorizontalFrame *fTitleFrame; // Title frame
530 TGHorizontalFrame *fMainFrame; // Main frame
531
532 TGHorizontalFrame *fBesRunFrame; // Bes Run nr input frame
533 TGHorizontalFrame *fBesEventFrame; // Bes Event nr input frame
534
535 TGCheckButton *fChkBtnHeaderGlobal;
536
537 //Long Peixun's update: Add CGEM hits check button
538 TGCheckButton *fChkBtnCgemHitsGlobal;
539 TGCheckButton *fChkBtnCgemHitsXStrip;
540 TGCheckButton *fChkBtnCgemHitsVStrip;
541 TGCheckButton *fChkBtnCgemHitsClusters;
542 TGCheckButton *fChkBtnCgemHitsFiredHL;
543
544 TGCheckButton *fChkBtnMdcHitsGlobal;
545 TGCheckButton *fChkBtnTofHitsGlobal;
546 TGCheckButton *fChkBtnTofHitsEast;
547 TGCheckButton *fChkBtnTofHitsBarrel;
548 TGCheckButton *fChkBtnTofHitsWest;
549 TGCheckButton *fChkBtnEmcHitsGlobal;
550 TGCheckButton *fChkBtnEmcHitsEast;
551 TGCheckButton *fChkBtnEmcHitsBarrel;
552 TGCheckButton *fChkBtnEmcHitsWest;
553 TGCheckButton *fChkBtnEmcHitsSide;
554 TGCheckButton *fChkBtnMucHitsGlobal;
555 TGCheckButton *fChkBtnMucHitsEast;
556 TGCheckButton *fChkBtnMucHitsBarrel;
557 TGCheckButton *fChkBtnMucHitsWest;
558
559 TGCheckButton *fChkBtnTracksGlobal;
560 TGCheckButton *fChkBtnTracksMdc;
561 TGCheckButton *fChkBtnTracksIdeal; // added by wangll
562 TGCheckButton *fChkBtnTracksTof;
563 TGCheckButton *fChkBtnTracksEmc;
564 TGCheckButton *fChkBtnTracksMuc;
565 TGCheckButton *fChkBtnTracksExt;
566 TGCheckButton *fChkBtnMCTruthTrack;
567
568 //Long Peixun's update: Add CGEM check buttons
569 TGCheckButton *fChkBtnCgemGlobal;
570 TGCheckButton *fChkBtnCgemLayers;
571 TGCheckButton *fChkBtnCgemXStrips;
572 TGCheckButton *fChkBtnCgemVStrips;
573
574 TGCheckButton *fChkBtnMdcGlobal;
575 TGCheckButton *fChkBtnMdcTubes;
576 TGCheckButton *fChkBtnMdcWires;
577 TGCheckButton *fChkBtnTofGlobal;
578 TGCheckButton *fChkBtnTofEast;
579 TGCheckButton *fChkBtnTofBarrel;
580 TGCheckButton *fChkBtnTofWest;
581 TGCheckButton *fChkBtnEmcGlobal;
582 TGCheckButton *fChkBtnEmcEast;
583 TGCheckButton *fChkBtnEmcBarrel;
584 TGCheckButton *fChkBtnEmcWest;
585 TGCheckButton *fChkBtnEmcSide;
586 TGCheckButton *fChkBtnMucGlobal;
587 TGCheckButton *fChkBtnMucEast;
588 TGCheckButton *fChkBtnMucBarrel;
589 TGCheckButton *fChkBtnMucWest;
590 TGCheckButton *fChkBtnMucStrips;
591
592 TGCheckButton *fChkBtnBeamPipe;
593 TGCheckButton *fChkBtnZRPlaneOnXY;
594 TGCheckButton *fChkBtnAxis;
595
596 TGCheckButton *fChkBtnMdcTOverflowGlobal;
597 TGCheckButton *fChkBtnMdcQOverflowGlobal;
598 TGCheckButton *fChkBtnMdcTMatchGlobal;
599 TGCheckButton *fChkBtnMdcQMatchGlobal;
600 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
601 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
602 TGCheckButton *fChkBtnTofTMatchGlobal;
603 TGCheckButton *fChkBtnTofQMatchGlobal;
604
605 TGNumberEntry *fNumEntryMagnetic; // magnetic number
606
607 TString fBesVisPath;
608
609 Long64_t fBesRunNo; // run number of BES request
610 Long64_t fBesEventNo; // event number of BES request
611 Long64_t fCurrentEvent;
612 Int_t fEventPlaySpeed; // event play speed
613 Bool_t fAutoDisplayEvent; // auto display event
614 TTimer *fAutoDisplayEventTimer;
615
616 Double_t fMoveFactor; // factor of move
617 Double_t fRotateStep; // rotate angle in each step
618 Int_t fRotateFPS; // rotae fps, frame per second, 24? 10?
619 Double_t fRotateSpeed; // rotate angle per second, deg/sec
620 Bool_t fAutoRotate; // auto rotate flag
621 TTimer *fAutoRotateTimer; // auto rotate timer
622 Int_t fAutoRotateClockWise; // auto rotate clockwise flag
623 Int_t fAutoRotateTheta; // auto rotate theta flag
624 Int_t fAutoRotatePhi; // auto rotate phi flag
625 Int_t fAutoRotatePsi; // auto rotate psi flag
626
627 Int_t fViewer3DMode; // Mode of Viewer3D, 1:x3d, 2:OpenGL
628 //TViewerX3D *fx3d;
629 Double_t fViewThetaPreStep;
630 Double_t fViewPhiPreStep;
631
632 Double_t fHomeX[3], fHomeY[3]; // Home position of three pads
633
634 Int_t fWindowWidth; // zevis window width
635 Int_t fWindowHeight; // zevis window height
636
637 TList *fWidgets; // list to hold TGLayoutHints for destruction
638 TGLayoutHints *fLayout; // dummy TGLayoutHints;
639
640 // added by tianhl to add besvis to bossframework
641 TString f_evtFile;
642 TString f_geoFile;
643 Bool_t f_bossMode;
644 Int_t f_pid;
645 //Long Peixun's update: remove useless variable
646 //TString f_evtFile_1; //huangb add
647
648 //Long Peixun's update: Help text loaded from help.txt
649 std::string f_HelpText;
650 //Long Peixun's update: for geometry selection
651 BesGeoSelector fSelector;
652 //Long Peixun's update: current geometry file (for default geom)
653 TString fCurGeom;
654 //Long Peixun's update: whether current geometry is selected automatically
655 Bool_t fAutoGeom;
656 //Long Peixun's update: prime title text
657 TString fTitleText;
658
659 private:
660 //void SetMdcTOverflow(Bool_t input);
661 void SetMdcQNotOverflow(Bool_t input);
662 void SetMdcTFire(Bool_t input);
663 void SetMdcQFire(Bool_t input);
664 void SetMdcColorfulWire(Bool_t input);
665 void SetMdcTimeSubEvTime(Bool_t input);
666 void SetTofTMatch(Bool_t input);
667 void SetTofQMatch(Bool_t input);
668
669 public:
670 BesClient(const TGWindow *p, const char* title, UInt_t width, UInt_t height, Option_t *option = "", Int_t argc = 0, char **argv = 0);
671 virtual ~BesClient();
672 virtual void InitLocal();
673 virtual void InitParameter();
674 virtual void InitConnections();
675 //Long Peixun's update: Initialization of geometry selector
676 virtual void InitGeoSelector(const char* geomsel_file);
677
678 virtual void CreateWidget(const char* title, UInt_t width, UInt_t height);
679 virtual void CreateHorizontalRuler();
680 virtual void CreateMenuBar();
681 virtual void CreateUpButtonBar();
682 virtual void CreateDisplayModeBar();
683 virtual void CreateToolBar();
684 virtual void CreateTitleBar();
685 virtual void CreateStatusBar();
686 virtual void CreateMainFrame();
687 virtual void CreateCanvas();
688 virtual void CreateTabs();
689
690 virtual void HandleMenu(Int_t id);
691 virtual void HandleViewOptionMenu(Int_t id);
692 virtual void HandleError(const char* msg);
693 virtual void HandleInfoBar(const char* msg);
694 virtual void HandleStatusBar(const char* msg);
695 virtual void HandleButtons(Int_t id=-1);
696 virtual void HandleSliders(Int_t id);
697 virtual void HandleEventList(TGListTreeItem *entry, Int_t btn);
698 virtual void UpdateBesInputFields();
699
700 virtual void LoadGeoFile();
701 virtual void OpenGeoFile(TString filename);
702 virtual void SaveGeoAs();
703
704 //Long Peixun's update: Add a parameter to determine whether choose a detector geometry automatically when open an event file.
705 virtual void OpenEventFile();
706 virtual void OpenEventFile(TString filename, bool auto_sel_geom = false);
707
708 virtual void SavePicAs();
709 virtual void SavePicAsPS();
710 virtual void SetHome();
711 virtual void GoHome();
712 virtual void SaveMyConfig();
713 virtual void LoadMyConfig();
714 virtual void LoadMdcPalette();
715 virtual void Help();
716
717 virtual void SetAllDisplayModeButtonUnHL();
718
719 virtual void X3D();
720 virtual void OpenGL();
721
722 virtual void Show();
723 virtual void CloseWindow();
724
725 //Long Peixun's update: Get run number and choose a detector geometry automatically when in need
726 virtual Bool_t GetEvent(Long64_t i, bool openfile = false, bool sel_geom = false);
727 virtual Bool_t GetRecEvent();
728 virtual Bool_t NextEvent();
729 virtual Bool_t PrevEvent();
730 virtual void AutoDisplayEvent();
731 virtual void AutoDisplayEventCommand();
732 virtual Bool_t FirstEvent();
733 virtual Bool_t LastEvent(); //Long Peixun's update: Get last event
734
735 virtual void RotateClockWise(int clockwise);
736 virtual void RotateTheta(int pn);
737 virtual void RotatePhi(int pn);
738 virtual void RotatePsi(int pn);
739 virtual void AutoRotate();
740 virtual void AutoRotateCommand();
741
742 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
743 virtual void SetState(Int_t id = -1);
744 virtual void UpdateStatus();
745 virtual void UpdateAllView();
746 virtual void UpdateCurrentPad();
747 virtual void ChangeFocus();
748 virtual void ExecuteReturn();
749
750 virtual Pixmap_t GetPic(const char *file);
751 virtual Bool_t FileExists(TString fname);
752 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
753 virtual const char* GetCurrentPadString(); //Long Peixun's update: Return current pad hint string
754
755 inline Long64_t GetBesRunNo() { return fBesRunNo; }
756 inline Long64_t GetBesEventNo() { return fBesEventNo; }
757 inline Int_t GetEventPlaySpeed() { return fEventPlaySpeed; }
758
759 inline Int_t GetRotateFPS() { return fRotateFPS; }
760 inline Double_t GetRotateSpeed() { return fRotateSpeed; }
761 inline Double_t GetRotateStep() { return fRotateStep; }
762 inline void SetRotateSpeed() { fRotateSpeed = fRotateStep * fRotateFPS; }
763 inline void SetRotateStep() { if (fRotateFPS != 0) fRotateStep = fRotateSpeed/fRotateFPS; else fRotateStep = 0.0; }
764
765 ClassDef(BesClient,0) // Bes client
766};
767
768#endif
EZMenuViewOption
Definition: BesClient.h:188
@ kM_Tof_Barrel
Definition: BesClient.h:200
@ kM_Mdc_Tubes
Definition: BesClient.h:196
@ kM_Tracks_Tof
Definition: BesClient.h:242
@ kM_Muc_Barrel
Definition: BesClient.h:209
@ kM_TofHits_East
Definition: BesClient.h:228
@ kM_Standard_On
Definition: BesClient.h:250
@ kM_Header_Global
Definition: BesClient.h:189
@ kM_Muc_East
Definition: BesClient.h:208
@ kM_EmcHits_East
Definition: BesClient.h:232
@ kM_Emc_Side
Definition: BesClient.h:206
@ kM_User_On
Definition: BesClient.h:251
@ kM_Muc_Strips
Definition: BesClient.h:211
@ kM_Tracks_Mdc
Definition: BesClient.h:241
@ kM_Mdc_QNotOverflow_Global
Definition: BesClient.h:253
@ kM_Full3D_Tof
Definition: BesClient.h:214
@ kM_TofHits_Global
Definition: BesClient.h:227
@ kM_MucHits_East
Definition: BesClient.h:237
@ kM_Tof_QMatch_Global
Definition: BesClient.h:259
@ kM_Tracks_Emc
Definition: BesClient.h:243
@ kM_Emc_East
Definition: BesClient.h:203
@ kM_MucHits_Barrel
Definition: BesClient.h:238
@ kM_Muc_West
Definition: BesClient.h:210
@ kM_Emc_Global
Definition: BesClient.h:202
@ kM_Full3D_Cgem
Definition: BesClient.h:212
@ kM_TofHits_Barrel
Definition: BesClient.h:229
@ kM_Cgem_VStrips
Definition: BesClient.h:194
@ kM_Mdc_QMatch_Global
Definition: BesClient.h:257
@ kM_Tracks_Ideal
Definition: BesClient.h:247
@ kM_Tof_East
Definition: BesClient.h:199
@ kM_CgemHits_Global
Definition: BesClient.h:220
@ kM_Mdc_Global
Definition: BesClient.h:195
@ kM_MucHits_West
Definition: BesClient.h:239
@ kM_MdcHits_Hits
Definition: BesClient.h:226
@ kM_Mdc_Wires
Definition: BesClient.h:197
@ kM_Mdc_ColorfulWire_Global
Definition: BesClient.h:254
@ kM_Full3D_Muc
Definition: BesClient.h:216
@ kM_EmcHits_Barrel
Definition: BesClient.h:233
@ kM_Cgem_XStrips
Definition: BesClient.h:193
@ kM_Tracks_Muc
Definition: BesClient.h:244
@ kM_Mdc_TMatch_Global
Definition: BesClient.h:256
@ kM_BeamPipe
Definition: BesClient.h:217
@ kM_ZRPlaneOnXY
Definition: BesClient.h:218
@ kM_MucHits_Global
Definition: BesClient.h:236
@ kM_Emc_West
Definition: BesClient.h:205
@ kM_EmcHits_West
Definition: BesClient.h:234
@ kM_Emc_Barrel
Definition: BesClient.h:204
@ kM_Cgem_Layers
Definition: BesClient.h:192
@ kM_CgemHits_VStrip
Definition: BesClient.h:222
@ kM_CgemHits_XStrip
Definition: BesClient.h:221
@ kM_Tof_TMatch_Global
Definition: BesClient.h:258
@ kM_View_OpenGL
Definition: BesClient.h:249
@ kM_View_X3D
Definition: BesClient.h:248
@ kM_EmcHits_Global
Definition: BesClient.h:231
@ kM_Tof_Global
Definition: BesClient.h:198
@ kM_EmcHits_Side
Definition: BesClient.h:235
@ kM_Tracks_Ext
Definition: BesClient.h:245
@ kM_Tracks_Global
Definition: BesClient.h:240
@ kM_CgemHits_FiredHL
Definition: BesClient.h:224
@ kM_Muc_Global
Definition: BesClient.h:207
@ kM_Tof_West
Definition: BesClient.h:201
@ kM_Axis
Definition: BesClient.h:219
@ kM_CgemHits_Clusters
Definition: BesClient.h:223
@ kM_Mdc_MdcTimeSubEvTime_Global
Definition: BesClient.h:255
@ kM_TofHits_West
Definition: BesClient.h:230
@ kM_MdcHits_Global
Definition: BesClient.h:225
@ kM_Full3D_Emc
Definition: BesClient.h:215
@ kM_Full3D_Mdc
Definition: BesClient.h:213
@ kM_MC_TruthTrack
Definition: BesClient.h:246
@ kM_Cgem_Global
Definition: BesClient.h:191
EZMode
Definition: BesClient.h:177
@ kModeFile
Definition: BesClient.h:179
@ kModePR
Definition: BesClient.h:182
@ kModeDown
Definition: BesClient.h:180
@ kModeBes
Definition: BesClient.h:181
@ kModeOnline
Definition: BesClient.h:178
@ FREE_SPACE
Definition: BesClient.h:51
@ OUTPUT_STORE
Definition: BesClient.h:51
EZCommand
Definition: BesClient.h:58
@ kM_Option_TimerSpeed
Definition: BesClient.h:66
@ kM_Help_About
Definition: BesClient.h:69
@ kM_File_SaveGeoAs
Definition: BesClient.h:60
@ kM_Option_DefaultPicType
Definition: BesClient.h:67
@ kM_Edit_Editor
Definition: BesClient.h:65
@ kM_File_Exit
Definition: BesClient.h:64
@ kM_File_SavePicAs
Definition: BesClient.h:62
@ kM_File_OpenEvent
Definition: BesClient.h:61
@ kM_Help_Content
Definition: BesClient.h:68
@ kM_File_Close
Definition: BesClient.h:63
@ kM_File_LoadGeo
Definition: BesClient.h:59
EZButtons
Definition: BesClient.h:76
@ kM_Button_SwitchDisplayMode
Definition: BesClient.h:90
@ kM_Button_BesRun
Definition: BesClient.h:145
@ kM_Button_ShowAxis
Definition: BesClient.h:106
@ kM_Button_PrevEvent
Definition: BesClient.h:117
@ kM_Button_RotateStep
Definition: BesClient.h:141
@ kM_Button_DownBrowse
Definition: BesClient.h:159
@ kM_Button_NextEvent
Definition: BesClient.h:118
@ kM_Button_DownRaw
Definition: BesClient.h:157
@ kM_Button_Online
Definition: BesClient.h:112
@ kM_Button_ViewAnglePhiMinus
Definition: BesClient.h:135
@ kM_Button_Refresh
Definition: BesClient.h:82
@ kM_Slider_Zoom
Definition: BesClient.h:170
@ kM_Button_LoadGeoFile
Definition: BesClient.h:77
@ kM_Button_ViewAnglePsiNumber
Definition: BesClient.h:140
@ kM_Button_ResetCurrent
Definition: BesClient.h:83
@ kM_Button_ViewAnglePhiNumber
Definition: BesClient.h:136
@ kM_Button_SaveMyConfig
Definition: BesClient.h:93
@ kM_Button_ViewResetAngle
Definition: BesClient.h:121
@ kM_Button_Down
Definition: BesClient.h:114
@ kM_Button_DownFZ
Definition: BesClient.h:155
@ kM_Button_SavePicAs
Definition: BesClient.h:80
@ kM_Button_Bes
Definition: BesClient.h:115
@ kM_Button_CursorPick
Definition: BesClient.h:85
@ kM_Button_ZoomIn
Definition: BesClient.h:87
@ kM_Slider_ViewAngleTheta
Definition: BesClient.h:129
@ kM_Button_OpenEventFile
Definition: BesClient.h:79
@ kM_Button_ViewAnglePhiPlus
Definition: BesClient.h:134
@ kM_Button_OnlineTime
Definition: BesClient.h:164
@ kM_Button_RotateFPS
Definition: BesClient.h:144
@ kM_Button_DisplayMode2D
Definition: BesClient.h:97
@ kM_Button_Help
Definition: BesClient.h:96
@ kM_Button_ViewMoveLeft
Definition: BesClient.h:125
@ kM_Button_PRTime2
Definition: BesClient.h:168
@ kM_Button_PRTime
Definition: BesClient.h:167
@ kM_Button_DownZED
Definition: BesClient.h:154
@ kM_Button_DisplayModeZR
Definition: BesClient.h:99
@ kM_Button_PlayEvent
Definition: BesClient.h:119
@ kM_Button_DownMDST
Definition: BesClient.h:156
@ kM_Button_File
Definition: BesClient.h:113
@ kM_Button_ZoomRatioNumber
Definition: BesClient.h:89
@ kM_Button_SavePicAsPS
Definition: BesClient.h:81
@ kM_Button_DisplayModeCgemUF
Definition: BesClient.h:102
@ kM_Slider_ViewAnglePsi
Definition: BesClient.h:137
@ kM_Button_AutoRotate
Definition: BesClient.h:142
@ kM_Button_BesGet
Definition: BesClient.h:152
@ kM_Button_ViewMoveRight
Definition: BesClient.h:126
@ kM_Button_DisplayMode3D
Definition: BesClient.h:100
@ kM_Button_ViewMoveCenter
Definition: BesClient.h:128
@ kM_Button_DisplayModeCgemUFAll
Definition: BesClient.h:103
@ kM_Button_EventPlaySpeed
Definition: BesClient.h:147
@ kM_Button_ViewClockWise
Definition: BesClient.h:123
@ kM_Button_FirstEvent
Definition: BesClient.h:120
@ kM_Button_ParallelView
Definition: BesClient.h:108
@ kM_Button_BesReset
Definition: BesClient.h:153
@ kM_Button_ViewAngleThetaMinus
Definition: BesClient.h:131
@ kM_Button_ViewAnglePsiMinus
Definition: BesClient.h:139
@ kM_Button_RotateSpeed
Definition: BesClient.h:143
@ kM_Button_GoHome
Definition: BesClient.h:92
@ kM_Button_SetHome
Definition: BesClient.h:91
@ kM_Button_ViewAnglePsiPlus
Definition: BesClient.h:138
@ kM_Slider_EventPlay
Definition: BesClient.h:116
@ kM_Button_ShowInfo
Definition: BesClient.h:105
@ kM_Button_DisplayModeXY
Definition: BesClient.h:98
@ kM_Button_ZoomOut
Definition: BesClient.h:88
@ kM_Button_PerspectiveView
Definition: BesClient.h:109
@ kM_Button_DisplayModeAll
Definition: BesClient.h:101
@ kM_Button_ResetAll
Definition: BesClient.h:84
@ kM_Button_DownEvents
Definition: BesClient.h:160
@ kM_Button_BesVar
Definition: BesClient.h:149
@ kM_Button_PRStart
Definition: BesClient.h:166
@ kM_Button_ViewCounterClockWise
Definition: BesClient.h:122
@ kM_Button_BesSample
Definition: BesClient.h:151
@ kM_Button_DownGet
Definition: BesClient.h:162
@ kM_Button_ViewAngleThetaPlus
Definition: BesClient.h:130
@ kM_Button_CursorHand
Definition: BesClient.h:86
@ kM_Button_BesEvent
Definition: BesClient.h:146
@ kM_Button_ViewMoveDown
Definition: BesClient.h:127
@ kM_Button_BesBit
Definition: BesClient.h:150
@ kM_Button_OnlineStart
Definition: BesClient.h:163
@ kM_Button_Magnetic
Definition: BesClient.h:169
@ kM_Button_SwitchPad
Definition: BesClient.h:104
@ kM_Button_X3D
Definition: BesClient.h:110
@ kM_Button_OnlineTime2
Definition: BesClient.h:165
@ kM_Button_ViewAngleThetaNumber
Definition: BesClient.h:132
@ kM_Button_BesSamplePos
Definition: BesClient.h:148
@ kM_Slider_ViewAnglePhi
Definition: BesClient.h:133
@ kM_Button_DownSkip
Definition: BesClient.h:161
@ kM_Button_FishEyeView
Definition: BesClient.h:107
@ kM_Button_DownRawIncl
Definition: BesClient.h:158
@ kM_Button_LoadMyConfig
Definition: BesClient.h:94
@ kM_Button_Palette
Definition: BesClient.h:95
@ kM_Button_ViewMoveUp
Definition: BesClient.h:124
@ kM_Button_OpenGL
Definition: BesClient.h:111
@ kM_Button_SaveGeoAs
Definition: BesClient.h:78
runStatus
Definition: BesClient.h:52
@ RUN_ERROR
Definition: BesClient.h:52
@ RUN_SMOOTH
Definition: BesClient.h:52
Int_t GetEventPlaySpeed()
Definition: BesClient.h:757
virtual void X3D()
Definition: BesClient.cxx:3830
virtual void GoHome()
Definition: BesClient.cxx:3619
virtual void CreateMainFrame()
Definition: BesClient.cxx:1139
virtual void CreateTitleBar()
Definition: BesClient.cxx:1110
virtual void UpdateAllView()
Definition: BesClient.cxx:6101
virtual void HandleMenu(Int_t id)
Definition: BesClient.cxx:2481
virtual void SetAllDisplayModeButtonUnHL()
Definition: BesClient.cxx:3814
virtual void CreateToolBar()
Definition: BesClient.cxx:980
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
Definition: BesClient.cxx:3918
virtual void SavePicAsPS()
Definition: BesClient.cxx:3571
virtual void CreateDisplayModeBar()
Definition: BesClient.cxx:928
virtual void HandleSliders(Int_t id)
Definition: BesClient.cxx:6054
virtual void CreateTabs()
Definition: BesClient.cxx:1196
virtual Bool_t LastEvent()
Definition: BesClient.cxx:4506
virtual void SaveMyConfig()
Definition: BesClient.cxx:3639
virtual void RotatePsi(int pn)
Definition: BesClient.cxx:4677
virtual void Show()
Definition: BesClient.cxx:3212
virtual void SetHome()
Definition: BesClient.cxx:3601
virtual void RotateClockWise(int clockwise)
Definition: BesClient.cxx:4618
Double_t GetRotateStep()
Definition: BesClient.h:761
virtual void CreateMenuBar()
Definition: BesClient.cxx:400
virtual void RotateTheta(int pn)
Definition: BesClient.cxx:4645
virtual ~BesClient()
Definition: BesClient.cxx:303
Long64_t GetBesRunNo()
Definition: BesClient.h:755
virtual void RotatePhi(int pn)
Definition: BesClient.cxx:4661
virtual void HandleViewOptionMenu(Int_t id)
Definition: BesClient.cxx:2531
virtual void OpenGL()
Definition: BesClient.cxx:3869
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
Definition: BesClient.cxx:4693
virtual void OpenEventFile()
Definition: BesClient.cxx:3392
virtual void SavePicAs()
Definition: BesClient.cxx:3512
virtual void HandleStatusBar(const char *msg)
Definition: BesClient.cxx:3204
virtual Pixmap_t GetPic(const char *file)
Definition: BesClient.cxx:6359
virtual void AutoRotateCommand()
Definition: BesClient.cxx:4576
virtual void UpdateStatus()
Definition: BesClient.cxx:5111
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
Definition: BesClient.cxx:316
virtual void CloseWindow()
Definition: BesClient.cxx:3905
virtual void CreateHorizontalRuler()
Definition: BesClient.cxx:389
virtual void InitGeoSelector(const char *geomsel_file)
Definition: BesClient.cxx:2427
virtual void InitConnections()
Definition: BesClient.cxx:2466
virtual void UpdateCurrentPad()
Definition: BesClient.cxx:6157
virtual void HandleError(const char *msg)
Definition: BesClient.cxx:3185
virtual void SaveGeoAs()
Definition: BesClient.cxx:3342
virtual void InitLocal()
Definition: BesClient.cxx:2333
virtual void CreateCanvas()
Definition: BesClient.cxx:1177
virtual void HandleInfoBar(const char *msg)
Definition: BesClient.cxx:3196
void SetRotateSpeed()
Definition: BesClient.h:762
virtual Bool_t FirstEvent()
Definition: BesClient.cxx:4490
virtual void LoadMdcPalette()
Definition: BesClient.cxx:3789
virtual Bool_t GetRecEvent()
Definition: BesClient.cxx:4276
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
Definition: BesClient.cxx:6378
virtual void AutoDisplayEvent()
Definition: BesClient.cxx:4522
virtual Bool_t NextEvent()
Definition: BesClient.cxx:4448
virtual void CreateStatusBar()
Definition: BesClient.cxx:1120
virtual void CreateUpButtonBar()
Definition: BesClient.cxx:665
virtual void AutoDisplayEventCommand()
Definition: BesClient.cxx:4549
Long64_t GetBesEventNo()
Definition: BesClient.h:756
void SetRotateStep()
Definition: BesClient.h:763
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
Definition: BesClient.cxx:4728
virtual void Help()
Definition: BesClient.cxx:3801
virtual void ExecuteReturn()
Definition: BesClient.cxx:6281
virtual void LoadMyConfig()
Definition: BesClient.cxx:3713
virtual Bool_t PrevEvent()
Definition: BesClient.cxx:4469
virtual void HandleButtons(Int_t id=-1)
Definition: BesClient.cxx:5620
virtual Bool_t FileExists(TString fname)
Definition: BesClient.cxx:6371
Int_t GetRotateFPS()
Definition: BesClient.h:759
virtual void SetState(Int_t id=-1)
Definition: BesClient.cxx:4841
virtual void AutoRotate()
Definition: BesClient.cxx:4557
virtual void OpenGeoFile(TString filename)
Definition: BesClient.cxx:3249
virtual void ChangeFocus()
Definition: BesClient.cxx:6260
virtual const char * GetCurrentPadString()
Definition: BesClient.cxx:6397
Double_t GetRotateSpeed()
Definition: BesClient.h:760
virtual void InitParameter()
Definition: BesClient.cxx:2371
virtual void UpdateBesInputFields()
Definition: BesClient.cxx:6226
virtual void LoadGeoFile()
Definition: BesClient.cxx:3221
ushort * array
Definition: BesVisAlg.h:143
struct semid_ds * buf
Definition: BesVisAlg.h:142
int val
Definition: BesVisAlg.h:141