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