MpdEventManagerEditor.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // Specialization of TGedEditor for proper update propagation to TEveManager
  2. #ifndef MPDEVENTMANAGEREDITOR_H
  3. #define MPDEVENTMANAGEREDITOR_H
  4. #include "MpdEventManager.h"
  5. #include "TGedFrame.h"
  6. #include "TGNumberEntry.h"
  7. #include "TGLabel.h"
  8. #include "TEveGValuators.h"
  9. class MpdEventManagerEditor;
  10. struct ThreadParam_OnlineDisplay
  11. {
  12. MpdEventManager* fEventManager;
  13. MpdEventManagerEditor* fManagerEditor;
  14. FairRootManager* fRootManager;
  15. int iCurrentEvent;
  16. bool isStreamSource;
  17. bool isZDCRedraw;
  18. };
  19. // multithread functions
  20. void* RunOnlineDisplay(void* ptr);
  21. class MpdEventManagerEditor : public TGedFrame
  22. {
  23. MpdEventManagerEditor(const MpdEventManagerEditor&); // Not implemented
  24. MpdEventManagerEditor& operator=(const MpdEventManagerEditor&); // Not implemented
  25. protected:
  26. TObject* fObject;
  27. MpdEventManager* fEventManager;
  28. TGLabel* fEventTime;
  29. TGNumberEntry* fCurrentPDG;
  30. TGCheckButton* fVizPri;
  31. TEveGValuator* fMinEnergy, *fMaxEnergy;
  32. TGHorizontalFrame* fGeometryFrame;
  33. TGCheckButton* ShowMagnetButton;
  34. // whether magnet volume was found to use the special checkbov for visibility
  35. bool isMagnetFound;
  36. public:
  37. MpdEventManagerEditor(const TGWindow* p = 0, Int_t width = 170, Int_t height = 30,
  38. UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
  39. virtual ~MpdEventManagerEditor() {}
  40. virtual void Init();
  41. void SetModel(TObject* obj) { fObject = obj; }
  42. virtual void SelectEvent();
  43. virtual void UpdateEvent();
  44. virtual void SelectPDG();
  45. void DoVizPri();
  46. virtual void MinEnergy();
  47. virtual void MaxEnergy();
  48. virtual void SwitchBackground(Bool_t is_on);
  49. virtual void SwitchTransparency(Bool_t is_on);
  50. virtual void ShowGeometry(Bool_t is_show);
  51. virtual void ShowMagnet(Bool_t is_show);
  52. virtual void ShowMCPoints(Bool_t is_show);
  53. virtual void ShowMCTracks(Bool_t is_show);
  54. virtual void ShowRecoPoints(Bool_t is_show);
  55. virtual void ShowRecoTracks(Bool_t is_show);
  56. bool RedrawZDC(bool isFull = false, bool isRedraw = true);
  57. int iThreadState;
  58. void BlockUI();
  59. void UnblockUI();
  60. // event count
  61. int iEventCount;
  62. // true - using event data from DAQ stream; false - using event data from file
  63. bool isStreamSource;
  64. TGPictureButton* fSave;
  65. // save screenshot of the EVE display
  66. virtual void SaveImage();
  67. // 'Update' button
  68. TGTextButton* fUpdate;
  69. // 'Current Event Number' textbox with spin buttons
  70. TGNumberEntry* fCurrentEvent;
  71. // 'Show Geometry' checkbox
  72. TGCheckButton* fGeometry;
  73. TGCheckButton *fShowMCPoints, *fShowMCTracks, *fShowRecoPoints, *fShowRecoTracks;
  74. ClassDef(MpdEventManagerEditor, 0);
  75. };
  76. #endif