CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisClient/BesVisClient-00-05-09/BesVisClient/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"
28#include "BesVisLib/BesGMenuBar.h"
29#include "BesVisLib/BesGPictureButton.h"
30#include "BesVisLib/BesVisDisplay.h"
31#include "BesVisLib/BesEvent.h"
32#include "RootEventData/TRecTrackEvent.h"
33#include "RootEventData/TDigiEvent.h"
34#include "RootEventData/TTrigEvent.h"
35#include "RootEventData/TRecEvTime.h"
36#include "RootEventData/TRecEmcShower.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
39#include "RootEventData/TMcEvent.h"
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
251 //kM_Mdc_TOverflow_Global,
260#endif
261
262class TList;
263class TRootEmbeddedCanvas;
264class TApplication;
265class TInterpreter;
266class TFile;
267class TTimer;
268class TBranch;
269class TTree;
270class TGPopupMenu;
271class TGStatusBar;
272class TGHorizontal3DLine;
273class TGLayoutHints;
274class TGMenuBar;
275class TGNumberEntry;
276class TGNumberFormat;
277class TGLabel;
278class TGHButtonGroup;
279class TGRadioButton;
280class TGCheckButton;
281class TGTextButton;
282class TGTextBuffer;
283class TGTextEntry;
284class TGHProgressBar;
285class TGButton;
286class TGPictureButton;
287class TGFileInfo;
288class TGFileDialog;
289class TGMsgBox;
290class TGGroupFrame;
291class TGTab;
292class TGVSplitter;
293class TGCanvas;
294class TGListTree;
295class TGListTreeItem;
296class TGHSlider;
297class TGVSlider;
298class TCanvas;
299class TView;
300class TGListTreeItem;
301
302class BesClient : public TGMainFrame {
303
304 private:
305 runStatus f_runStatus;
306 TGeometry *fGeometry; // Bes geometry
307 TFile *fGeoFile; // ROOT geometry file contains volBes
308 TFile *fEventFile; // Current event file
309 TTree *fEventTree; // Current event tree
310 BesEvent *fEvent; // Current Bes event
311 TEvtHeader *fEvtHeader;
312 TRecEvTime *fRecEvTime;
313 //TTrigEvent *fTrigEvent;
314 TDigiEvent *fDigiEvent;
315 TRecTrackEvent *fRecEvent_1;
316 TRecMdcTrack *recTrack1;
317 TRecMucTrack *muctrk;
318 TRecTofTrack *tofTrack;
319 //TRecMdcKalTrack *kalTrack;
320 TRecMdcHit *mdchit;
321 TRecEmcShower *emcshower;
322 TDstEvent* fDstEvent; //Long Peixun's update: for tracks from dst file
323 Bool_t isRecEvent; //Long Peixun's update: is this event rec event?
324 TMcEvent* fMcEvent;
325
326 TRecCgemCluster *cgemCluster; //Long Peixun's update: for CGEM clusters
327 Int_t NCluster; //...
328
329 TGLayoutHints *fMenuBarLayout; // Menu bar layout
330 TGLayoutHints *fMenuBarFirstItemLayout; // First Item popup menu layout
331 TGLayoutHints *fMenuBarItemLayout; // Item popup menu layout
332 TGLayoutHints *fMenuBarLastItemLayout; // Last Item popup menu layout
333 TGLayoutHints *fECLayout; // Embedded canvas layout
334
335 BesGMenuBar *fMenuBar; // Menu bar
336
337 TGPopupMenu *fMenuFile; // File menu
338 TGPopupMenu *fMenuEdit; // Edit menu
339 TGPopupMenu *fMenuView; // View menu
340 TGPopupMenu *fMenuHelp; // Help menu
341
342 TGPopupMenu *fMenuViewOptionHeader;
343 TGPopupMenu *fMenuViewOptionCgem; //Long Peixun's update: Add CGEM popup menu
344 TGPopupMenu *fMenuViewOptionMdc;
345 TGPopupMenu *fMenuViewOptionTof;
346 TGPopupMenu *fMenuViewOptionEmc;
347 TGPopupMenu *fMenuViewOptionMuc;
348 TGPopupMenu *fMenuViewOptionFull3D;
349 TGPopupMenu *fMenuViewOptionOthers;
350 TGPopupMenu *fMenuViewOptionCgemHits; //Long Peixun's update: Add CGEM hits popup menu
351 TGPopupMenu *fMenuViewOptionMdcHits;
352 TGPopupMenu *fMenuViewOptionTofHits;
353 TGPopupMenu *fMenuViewOptionEmcHits;
354 TGPopupMenu *fMenuViewOptionMucHits;
355 TGPopupMenu *fMenuViewOptionTracks;
356 TGPopupMenu *fMenuViewOptionMC;
357
358 TGLayoutHints *fUpButtonBarFirstItemLayout; // Up button bar first button layout
359 TGLayoutHints *fUpButtonBarItemLayout; // Up button bar button layout
360 TGLayoutHints *fUpButtonBarLastItemLayout; // Up button bar last button layout
361 TGCompositeFrame *fUpButtonBarFrame; // Up button bar frame
362
363 static const int kNUpSplitter = 4;
364 BesGPictureButton *fUpButtonSplitter[kNUpSplitter]; // Up button bar splitter
365 BesGPictureButton *fLoadGeoFileButton; // load geometry file
366 BesGPictureButton *fOpenEventFileButton; // open event file
367 BesGPictureButton *fSaveGeoAsButton; // save geometry as root file
368 BesGPictureButton *fSavePicAsButton; // save picture as
369 BesGPictureButton *fSavePicAsPSButton; // save picture as pdf
370 static const int kNCursorState = 2;
371 BesGPictureButton *fRefreshButton; // Refresh
372 BesGPictureButton *fResetCurrentButton; // Reset current pad
373 BesGPictureButton *fResetAllButton; // Reset all pad
374 BesGPictureButton *fCursorButton[kNCursorState]; // cursor state, pick or hand
375 BesGPictureButton *fZoomInButton; // ZoomIn
376 BesGPictureButton *fZoomOutButton; // ZoomOut
377 TGNumberEntryField *fZoomRatioNumber; // ZoomRatio number
378 BesGPictureButton *fZoomRatioPercentButton; // "%" picture
379 BesGPictureButton *fSwitchDisplayModeButton; // button to switch among display modes
380 BesGPictureButton *fSetHomeButton; // Set home position
381 BesGPictureButton *fGoHomeButton; // Go to home position
382 BesGPictureButton *fSaveMyConfigButton; // Save my style
383 BesGPictureButton *fLoadMyConfigButton; // Load my style
384 BesGPictureButton *fPaletteButton; // Display palette axis
385 BesGPictureButton *fHelpButton; // Help
386
387 TGLayoutHints *fDisplayModeBarItemLayout; // Display mode bar button layout
388 TGCompositeFrame *fDisplayModeBarFrame; // Display mode bar frame
389 static const int kNDisplayMode = 7; //Long Peixun's update: 5 -> 7, add CGEM UF View and UF All View
390 BesGPictureButton *fDisplayModeButton[kNDisplayMode]; // button to switch among display modes
391
392 TGLayoutHints *fToolBarFirstItemLayout; // Tool bar first button layout
393 TGLayoutHints *fToolBarItemLayout; // Tool bar button layout
394 TGLayoutHints *fToolBarLastItemLayout; // Tool bar last button layout
395 TGCompositeFrame *fToolBarFrame; // Tool bar frame
396
397 static const int kNToolSplitter = 4;
398 BesGPictureButton *fToolButtonSplitter[kNToolSplitter]; // Tool button bar splitter
399 BesGPictureButton *fSwitchPadButton; // button to switch among pads
400 BesGPictureButton *fShowInfoButton; // Show info or not
401 BesGPictureButton *fShowAxisButton; // Show axis or not
402 BesGPictureButton *fFishEyeViewButton; // FishEye view
403 BesGPictureButton *fParallelViewButton; // Parallel view
404 BesGPictureButton *fPerspectiveViewButton; // Perspective view
405 BesGPictureButton *fX3DButton; // X3D view
406 BesGPictureButton *fOpenGLButton; // OpenGL view
407
408 TGCanvas *fEventListView; // Canvas for event list tree
409 TRootEmbeddedCanvas *fEmbeddedCanvas; // Embedded Canvas
410 TCanvas *fCanvas;
411 BesVisDisplay *fDisplay;
412
413 TGVerticalFrame *fV1; // Splitter for tabs
414
415 TGTab *fTabs; // Tabs for event
416
417 TGListTree *fEventListTree; // Event list tree
418 TGListTreeItem *fItem; // Active event list tree item
419 TGListTreeItem *fRunItem; // Active run list tree item
420
421
422 TGCompositeFrame *fEventDownFrame; // tab fame for download mode
423 TGCompositeFrame *fEventControlFrame; // Frame for event control
424 TGCompositeFrame *fEventControlTextFrame; // Frame for label "Event Control"
425 TGCompositeFrame *fEventNavFrame; // Frame for Event navigation
426 TGCompositeFrame *fEventPlayTextFrame; // Frame for label "Event Play"
427 TGCompositeFrame *fEventPlayButtonFrame; // Frame for buttons "prev, next, play, stop"
428 TGCompositeFrame *fEventPlaySpeedFrame; // Frame for set event play speed
429 TGCompositeFrame *fEventListFrame; // Frame for event list browser
430 TGCompositeFrame *fEventListTextFrame; // Frame for label "Event file list"
431 TGCompositeFrame *fEventListContentFrame; // Frame for event list content
432
433 TGCompositeFrame *fAutoFrame; // Frame for auto control
434 TGCompositeFrame *fAutoTextFrame; // Frame for label "Auto Control"
435
436 TGCompositeFrame *fViewFrame; // Frame for view control
437 TGCompositeFrame *fViewTextFrame; // Frame for label "View Control"
438 TGCompositeFrame *fViewContentFrame; // Frame for view content
439 TGCompositeFrame *fViewContent1Frame; // Frame for view content first line
440 TGCompositeFrame *fViewContent2Frame; // Frame for view content seconde line
441 TGCompositeFrame *fViewContent3Frame; // Frame for view content third line
442 TGCompositeFrame *fViewAngleFrame; // Frame for view angles
443 TGCompositeFrame *fViewAngleThetaFrame; // Frame for view theta
444 TGCompositeFrame *fViewAnglePhiFrame; // Frame for view phi
445 TGCompositeFrame *fViewAnglePsiFrame; // Frame for view psi
446
447 TGNumberEntry *fNumEntryRunNo; // Bes input of run number
448 TGNumberEntry *fNumEntryEventNo; // Bes input of event number
449 TGNumberEntry *fNumEntryEventPlaySpeed; // event play speed number
450 //TGNumberEntry *fBesSamplePos; // Bes input of sample position
451
452 TGLabel *fEventControlTextLabel; // Label "Event control"
453 TGLabel *fBesLabelRun; // Label "Run : "
454 TGLabel *fBesLabelEvent; // Label "Event : "
455 TGLabel *fEventPlayTextLabel; // Label "Event Play"
456 TGLabel *fEventPlaySpeedLabel; // Label "Play Speed : "
457 TGLabel *fEventListTextLabel; // Label "Event file list"
458 TGLabel *fViewTextLabel; // Label "View control"
459 TGLabel *fAutoTextLabel; // Label "Auto control"
460
461 TGHSlider *fEventPlaySlider; // slider for event play
462 BesGPictureButton *fPrevEventButton; // next event button
463 BesGPictureButton *fNextEventButton; // prev event button
464 BesGPictureButton *fPlayEventButton; // next event button
465 BesGPictureButton *fFirstEventButton; // prev event button
466
467 BesGPictureButton *fViewResetAngleButton; // View reset angle button
468 BesGPictureButton *fViewCounterClockWiseButton; // View CounterClockWise button
469 BesGPictureButton *fViewClockWiseButton; // View ClockWise button
470 BesGPictureButton *fViewMoveUpButton; // View MoveUp button
471 BesGPictureButton *fViewMoveLeftButton; // View MoveLeft button
472 BesGPictureButton *fViewMoveRightButton; // View MoveRight button
473 BesGPictureButton *fViewMoveDownButton; // View MoveDown button
474 BesGPictureButton *fViewMoveCenterButton; // View MoveCenter button
475
476 BesGPictureButton *fViewAngleThetaPlusButton; // View AngleTheta + button
477 BesGPictureButton *fViewAngleThetaMinusButton; // View AngleTheta - button
478 TGVSlider *fViewAngleThetaSlider; // View AngleTheta slider
479 TGNumberEntryField *fViewAngleThetaNumber; // View AngleTheta number
480 TGLabel *fViewAngleThetaLabel; // Label "Theta"
481
482 BesGPictureButton *fViewAnglePhiPlusButton; // View AnglePhi + button
483 BesGPictureButton *fViewAnglePhiMinusButton; // View AnglePhi - button
484 TGVSlider *fViewAnglePhiSlider; // View AnglePhi slider
485 TGNumberEntryField *fViewAnglePhiNumber; // View AnglePhi number
486 TGLabel *fViewAnglePhiLabel; // Label "Phi"
487
488 BesGPictureButton *fViewAnglePsiPlusButton; // View AnglePsi + button
489 BesGPictureButton *fViewAnglePsiMinusButton; // View AnglePsi - button
490 TGVSlider *fViewAnglePsiSlider; // View AnglePsi slider
491 TGNumberEntryField *fViewAnglePsiNumber; // View AnglePsi number
492 TGLabel *fViewAnglePsiLabel; // Label "Psi"
493
494 TGCompositeFrame *fRotateStepFrame; // Frame for RotateStep
495 TGLabel *fRotateStepLabel; // Label "Deg"
496 TGNumberEntryField *fNumEntryRotateStep; // Rotate step
497 TGLabel *fRotateStepUnitLabel; // Label "Deg"
498
499 TGGroupFrame *fFrameAutoRotate; // Frame for AutoRotate
500 TGCheckButton *fChkBtnAutoRotate; // CheckButton AutoRotate;
501
502 TGCompositeFrame *fRotateSpeedFrame; // Frame for RotateSpeed
503 TGNumberEntryField *fNumEntryRotateSpeed; // Auto Rotate speed number
504 TGLabel *fRotateSpeedLabel; // Label "Deg/Sec"
505
506 TGCompositeFrame *fRotateFPSFrame; // Frame for RotateFPS
507 TGNumberEntry *fNumEntryRotateFPS; // Auto Rotate fps number
508 TGLabel *fRotateFPSLabel; // Label "fps"
509
510
511 TGStatusBar *fStatusBar; // Status bar
512
513 TGGroupFrame *fFrameHeader; // Frame for Header
514 TGGroupFrame *fFrameHits; // Frame for Hits
515 TGGroupFrame *fFrameTracks; // Frame for Tracks
516
517 TGGroupFrame *fFrameSubDetector;
518 //TGGroupFrame *fFrameMdc;
519 //TGGroupFrame *fFrameTof;
520 //TGGroupFrame *fFrameEmc;
521 //TGGroupFrame *fFrameMuc;
522 TGGroupFrame *fFrameOthers;
523
524 TGGroupFrame *fFrameMdcMatch; // Frame for TQMatch
525 TGGroupFrame *fFrameTofMatch; // Frame for TQMatch
526 TGGroupFrame *fFrameMagnetic; // Frame for magnetic field
527
528 TGHorizontalFrame *fTitleFrame; // Title frame
529 TGHorizontalFrame *fMainFrame; // Main frame
530
531 TGHorizontalFrame *fBesRunFrame; // Bes Run nr input frame
532 TGHorizontalFrame *fBesEventFrame; // Bes Event nr input frame
533
534 TGCheckButton *fChkBtnHeaderGlobal;
535
536 //Long Peixun's update: Add CGEM hits check button
537 TGCheckButton *fChkBtnCgemHitsGlobal;
538 TGCheckButton *fChkBtnCgemHitsXStrip;
539 TGCheckButton *fChkBtnCgemHitsVStrip;
540 TGCheckButton *fChkBtnCgemHitsClusters;
541 TGCheckButton *fChkBtnCgemHitsFiredHL;
542
543 TGCheckButton *fChkBtnMdcHitsGlobal;
544 TGCheckButton *fChkBtnTofHitsGlobal;
545 TGCheckButton *fChkBtnTofHitsEast;
546 TGCheckButton *fChkBtnTofHitsBarrel;
547 TGCheckButton *fChkBtnTofHitsWest;
548 TGCheckButton *fChkBtnEmcHitsGlobal;
549 TGCheckButton *fChkBtnEmcHitsEast;
550 TGCheckButton *fChkBtnEmcHitsBarrel;
551 TGCheckButton *fChkBtnEmcHitsWest;
552 TGCheckButton *fChkBtnEmcHitsSide;
553 TGCheckButton *fChkBtnMucHitsGlobal;
554 TGCheckButton *fChkBtnMucHitsEast;
555 TGCheckButton *fChkBtnMucHitsBarrel;
556 TGCheckButton *fChkBtnMucHitsWest;
557
558 TGCheckButton *fChkBtnTracksGlobal;
559 TGCheckButton *fChkBtnTracksMdc;
560 TGCheckButton *fChkBtnTracksTof;
561 TGCheckButton *fChkBtnTracksEmc;
562 TGCheckButton *fChkBtnTracksMuc;
563 TGCheckButton *fChkBtnTracksExt;
564 TGCheckButton *fChkBtnMCTruthTrack;
565
566 //Long Peixun's update: Add CGEM check buttons
567 TGCheckButton *fChkBtnCgemGlobal;
568 TGCheckButton *fChkBtnCgemLayers;
569 TGCheckButton *fChkBtnCgemXStrips;
570 TGCheckButton *fChkBtnCgemVStrips;
571
572 TGCheckButton *fChkBtnMdcGlobal;
573 TGCheckButton *fChkBtnMdcTubes;
574 TGCheckButton *fChkBtnMdcWires;
575 TGCheckButton *fChkBtnTofGlobal;
576 TGCheckButton *fChkBtnTofEast;
577 TGCheckButton *fChkBtnTofBarrel;
578 TGCheckButton *fChkBtnTofWest;
579 TGCheckButton *fChkBtnEmcGlobal;
580 TGCheckButton *fChkBtnEmcEast;
581 TGCheckButton *fChkBtnEmcBarrel;
582 TGCheckButton *fChkBtnEmcWest;
583 TGCheckButton *fChkBtnEmcSide;
584 TGCheckButton *fChkBtnMucGlobal;
585 TGCheckButton *fChkBtnMucEast;
586 TGCheckButton *fChkBtnMucBarrel;
587 TGCheckButton *fChkBtnMucWest;
588 TGCheckButton *fChkBtnMucStrips;
589
590 TGCheckButton *fChkBtnBeamPipe;
591 TGCheckButton *fChkBtnZRPlaneOnXY;
592 TGCheckButton *fChkBtnAxis;
593
594 TGCheckButton *fChkBtnMdcTOverflowGlobal;
595 TGCheckButton *fChkBtnMdcQOverflowGlobal;
596 TGCheckButton *fChkBtnMdcTMatchGlobal;
597 TGCheckButton *fChkBtnMdcQMatchGlobal;
598 TGCheckButton *fChkBtnMdcColorfulWireGlobal;
599 TGCheckButton *fChkBtnMdcTimeSubEvTimeGlobal;
600 TGCheckButton *fChkBtnTofTMatchGlobal;
601 TGCheckButton *fChkBtnTofQMatchGlobal;
602
603 TGNumberEntry *fNumEntryMagnetic; // magnetic number
604
605 TString fBesVisPath;
606
607 Long64_t fBesRunNo; // run number of BES request
608 Long64_t fBesEventNo; // event number of BES request
609 Long64_t fCurrentEvent;
610 Int_t fEventPlaySpeed; // event play speed
611 Bool_t fAutoDisplayEvent; // auto display event
612 TTimer *fAutoDisplayEventTimer;
613
614 Double_t fMoveFactor; // factor of move
615 Double_t fRotateStep; // rotate angle in each step
616 Int_t fRotateFPS; // rotae fps, frame per second, 24? 10?
617 Double_t fRotateSpeed; // rotate angle per second, deg/sec
618 Bool_t fAutoRotate; // auto rotate flag
619 TTimer *fAutoRotateTimer; // auto rotate timer
620 Int_t fAutoRotateClockWise; // auto rotate clockwise flag
621 Int_t fAutoRotateTheta; // auto rotate theta flag
622 Int_t fAutoRotatePhi; // auto rotate phi flag
623 Int_t fAutoRotatePsi; // auto rotate psi flag
624
625 Int_t fViewer3DMode; // Mode of Viewer3D, 1:x3d, 2:OpenGL
626 //TViewerX3D *fx3d;
627 Double_t fViewThetaPreStep;
628 Double_t fViewPhiPreStep;
629
630 Double_t fHomeX[3], fHomeY[3]; // Home position of three pads
631
632 Int_t fWindowWidth; // zevis window width
633 Int_t fWindowHeight; // zevis window height
634
635 TList *fWidgets; // list to hold TGLayoutHints for destruction
636 TGLayoutHints *fLayout; // dummy TGLayoutHints;
637
638 // added by tianhl to add besvis to bossframework
639 TString f_evtFile;
640 TString f_geoFile;
641 Bool_t f_bossMode;
642 Int_t f_pid;
643 //Long Peixun's update: remove useless variable
644 //TString f_evtFile_1; //huangb add
645
646 //Long Peixun's update: Help text loaded from help.txt
647 std::string f_HelpText;
648 //Long Peixun's update: for geometry selection
649 BesGeoSelector fSelector;
650 //Long Peixun's update: current geometry file (for default geom)
651 TString fCurGeom;
652 //Long Peixun's update: whether current geometry is selected automatically
653 Bool_t fAutoGeom;
654 //Long Peixun's update: prime title text
655 TString fTitleText;
656
657 private:
658 //void SetMdcTOverflow(Bool_t input);
659 void SetMdcQNotOverflow(Bool_t input);
660 void SetMdcTFire(Bool_t input);
661 void SetMdcQFire(Bool_t input);
662 void SetMdcColorfulWire(Bool_t input);
663 void SetMdcTimeSubEvTime(Bool_t input);
664 void SetTofTMatch(Bool_t input);
665 void SetTofQMatch(Bool_t input);
666
667 public:
668 BesClient(const TGWindow *p, const char* title, UInt_t width, UInt_t height, Option_t *option = "", Int_t argc = 0, char **argv = 0);
669 virtual ~BesClient();
670 virtual void InitLocal();
671 virtual void InitParameter();
672 virtual void InitConnections();
673 //Long Peixun's update: Initialization of geometry selector
674 virtual void InitGeoSelector(const char* geomsel_file);
675
676 virtual void CreateWidget(const char* title, UInt_t width, UInt_t height);
677 virtual void CreateHorizontalRuler();
678 virtual void CreateMenuBar();
679 virtual void CreateUpButtonBar();
680 virtual void CreateDisplayModeBar();
681 virtual void CreateToolBar();
682 virtual void CreateTitleBar();
683 virtual void CreateStatusBar();
684 virtual void CreateMainFrame();
685 virtual void CreateCanvas();
686 virtual void CreateTabs();
687
688 virtual void HandleMenu(Int_t id);
689 virtual void HandleViewOptionMenu(Int_t id);
690 virtual void HandleError(const char* msg);
691 virtual void HandleInfoBar(const char* msg);
692 virtual void HandleStatusBar(const char* msg);
693 virtual void HandleButtons(Int_t id=-1);
694 virtual void HandleSliders(Int_t id);
695 virtual void HandleEventList(TGListTreeItem *entry, Int_t btn);
696 virtual void UpdateBesInputFields();
697
698 virtual void LoadGeoFile();
699 virtual void OpenGeoFile(TString filename);
700 virtual void SaveGeoAs();
701
702 //Long Peixun's update: Add a parameter to determine whether choose a detector geometry automatically when open an event file.
703 virtual void OpenEventFile();
704 virtual void OpenEventFile(TString filename, bool auto_sel_geom = false);
705
706 virtual void SavePicAs();
707 virtual void SavePicAsPS();
708 virtual void SetHome();
709 virtual void GoHome();
710 virtual void SaveMyConfig();
711 virtual void LoadMyConfig();
712 virtual void LoadMdcPalette();
713 virtual void Help();
714
715 virtual void SetAllDisplayModeButtonUnHL();
716
717 virtual void X3D();
718 virtual void OpenGL();
719
720 virtual void Show();
721 virtual void CloseWindow();
722
723 //Long Peixun's update: Get run number and choose a detector geometry automatically when in need
724 virtual Bool_t GetEvent(Long64_t i, bool openfile = false, bool sel_geom = false);
725 virtual Bool_t GetRecEvent();
726 virtual Bool_t NextEvent();
727 virtual Bool_t PrevEvent();
728 virtual void AutoDisplayEvent();
729 virtual void AutoDisplayEventCommand();
730 virtual Bool_t FirstEvent();
731 virtual Bool_t LastEvent(); //Long Peixun's update: Get last event
732
733 virtual void RotateClockWise(int clockwise);
734 virtual void RotateTheta(int pn);
735 virtual void RotatePhi(int pn);
736 virtual void RotatePsi(int pn);
737 virtual void AutoRotate();
738 virtual void AutoRotateCommand();
739
740 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel);
741 virtual void SetState(Int_t id = -1);
742 virtual void UpdateStatus();
743 virtual void UpdateAllView();
744 virtual void UpdateCurrentPad();
745 virtual void ChangeFocus();
746 virtual void ExecuteReturn();
747
748 virtual Pixmap_t GetPic(const char *file);
749 virtual Bool_t FileExists(TString fname);
750 virtual void SetRange(Double_t &input, Double_t min, Double_t max);
751 virtual const char* GetCurrentPadString(); //Long Peixun's update: Return current pad hint string
752
753 inline Long64_t GetBesRunNo() { return fBesRunNo; }
754 inline Long64_t GetBesEventNo() { return fBesEventNo; }
755 inline Int_t GetEventPlaySpeed() { return fEventPlaySpeed; }
756
757 inline Int_t GetRotateFPS() { return fRotateFPS; }
758 inline Double_t GetRotateSpeed() { return fRotateSpeed; }
759 inline Double_t GetRotateStep() { return fRotateStep; }
760 inline void SetRotateSpeed() { fRotateSpeed = fRotateStep * fRotateFPS; }
761 inline void SetRotateStep() { if (fRotateFPS != 0) fRotateStep = fRotateSpeed/fRotateFPS; else fRotateStep = 0.0; }
762
763 ClassDef(BesClient,0) // Bes client
764};
765
766#endif
virtual void X3D()
Definition: BesClient.cxx:3825
virtual void GoHome()
Definition: BesClient.cxx:3614
virtual void CreateMainFrame()
Definition: BesClient.cxx:1139
virtual void CreateTitleBar()
Definition: BesClient.cxx:1110
virtual void UpdateAllView()
Definition: BesClient.cxx:6088
virtual void HandleMenu(Int_t id)
Definition: BesClient.cxx:2476
virtual void SetAllDisplayModeButtonUnHL()
Definition: BesClient.cxx:3809
virtual void CreateToolBar()
Definition: BesClient.cxx:980
virtual Bool_t GetEvent(Long64_t i, bool openfile=false, bool sel_geom=false)
Definition: BesClient.cxx:3913
virtual void SavePicAsPS()
Definition: BesClient.cxx:3566
virtual void CreateDisplayModeBar()
Definition: BesClient.cxx:928
virtual void HandleSliders(Int_t id)
Definition: BesClient.cxx:6041
virtual void CreateTabs()
Definition: BesClient.cxx:1196
virtual Bool_t LastEvent()
Definition: BesClient.cxx:4501
virtual void SaveMyConfig()
Definition: BesClient.cxx:3634
virtual void RotatePsi(int pn)
Definition: BesClient.cxx:4672
virtual void Show()
Definition: BesClient.cxx:3207
virtual void SetHome()
Definition: BesClient.cxx:3596
virtual void RotateClockWise(int clockwise)
Definition: BesClient.cxx:4613
virtual void CreateMenuBar()
Definition: BesClient.cxx:400
virtual void RotateTheta(int pn)
Definition: BesClient.cxx:4640
virtual ~BesClient()
Definition: BesClient.cxx:303
virtual void RotatePhi(int pn)
Definition: BesClient.cxx:4656
virtual void HandleViewOptionMenu(Int_t id)
Definition: BesClient.cxx:2526
virtual void OpenGL()
Definition: BesClient.cxx:3864
virtual void HandleEventList(TGListTreeItem *entry, Int_t btn)
Definition: BesClient.cxx:4688
virtual void OpenEventFile()
Definition: BesClient.cxx:3387
virtual void SavePicAs()
Definition: BesClient.cxx:3507
virtual void HandleStatusBar(const char *msg)
Definition: BesClient.cxx:3199
virtual Pixmap_t GetPic(const char *file)
Definition: BesClient.cxx:6346
virtual void AutoRotateCommand()
Definition: BesClient.cxx:4571
virtual void UpdateStatus()
Definition: BesClient.cxx:5101
virtual void CreateWidget(const char *title, UInt_t width, UInt_t height)
Definition: BesClient.cxx:316
virtual void CloseWindow()
Definition: BesClient.cxx:3900
virtual void CreateHorizontalRuler()
Definition: BesClient.cxx:389
virtual void InitGeoSelector(const char *geomsel_file)
Definition: BesClient.cxx:2422
virtual void InitConnections()
Definition: BesClient.cxx:2461
virtual void UpdateCurrentPad()
Definition: BesClient.cxx:6144
virtual void HandleError(const char *msg)
Definition: BesClient.cxx:3180
virtual void SaveGeoAs()
Definition: BesClient.cxx:3337
virtual void InitLocal()
Definition: BesClient.cxx:2328
virtual void CreateCanvas()
Definition: BesClient.cxx:1177
virtual void HandleInfoBar(const char *msg)
Definition: BesClient.cxx:3191
virtual Bool_t FirstEvent()
Definition: BesClient.cxx:4485
virtual void LoadMdcPalette()
Definition: BesClient.cxx:3784
virtual Bool_t GetRecEvent()
Definition: BesClient.cxx:4271
virtual void SetRange(Double_t &input, Double_t min, Double_t max)
Definition: BesClient.cxx:6365
virtual void AutoDisplayEvent()
Definition: BesClient.cxx:4517
virtual Bool_t NextEvent()
Definition: BesClient.cxx:4443
virtual void CreateStatusBar()
Definition: BesClient.cxx:1120
virtual void CreateUpButtonBar()
Definition: BesClient.cxx:665
virtual void AutoDisplayEventCommand()
Definition: BesClient.cxx:4544
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py, TObject *sel)
Definition: BesClient.cxx:4723
virtual void Help()
Definition: BesClient.cxx:3796
virtual void ExecuteReturn()
Definition: BesClient.cxx:6268
virtual void LoadMyConfig()
Definition: BesClient.cxx:3708
virtual Bool_t PrevEvent()
Definition: BesClient.cxx:4464
virtual void HandleButtons(Int_t id=-1)
Definition: BesClient.cxx:5607
virtual Bool_t FileExists(TString fname)
Definition: BesClient.cxx:6358
virtual void SetState(Int_t id=-1)
Definition: BesClient.cxx:4836
virtual void AutoRotate()
Definition: BesClient.cxx:4552
virtual void OpenGeoFile(TString filename)
Definition: BesClient.cxx:3244
virtual void ChangeFocus()
Definition: BesClient.cxx:6247
virtual const char * GetCurrentPadString()
Definition: BesClient.cxx:6384
virtual void InitParameter()
Definition: BesClient.cxx:2366
virtual void UpdateBesInputFields()
Definition: BesClient.cxx:6213
virtual void LoadGeoFile()
Definition: BesClient.cxx:3216