CbmRoot
Loading...
Searching...
No Matches
CbmTimesliceManagerEditor.h
Go to the documentation of this file.
1/* Copyright (C) 2023 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau[committer] */
4
5#ifndef CbmTimesliceManagerEditor_H
6#define CbmTimesliceManagerEditor_H
7
8#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
9#include <RtypesCore.h> // for Int_t, Bool_t, Double_t, UInt_t
10#include <TGFrame.h> // for kChildFrame
11#include <TGedFrame.h> // for TGedFrame
12
13#include <GuiTypes.h> // for Pixel_t
14
17class TBuffer;
18class TClass;
19class TClonesArray;
20class TGComboBox;
21class TGLabel;
22class TGNumberEntry;
23class TGWindow;
24class TMemberInspector;
25class TObject;
26
32class CbmTimesliceManagerEditor : public TGedFrame {
33public:
34 CbmTimesliceManagerEditor(const TGWindow* p = 0, Int_t width = 250, Int_t height = 30, UInt_t options = kChildFrame,
35 Pixel_t back = GetDefaultFrameBackground());
36 virtual ~CbmTimesliceManagerEditor() = default;
37
40
45 void SwitchBackground(Bool_t light_background);
46
51 void SwitchPdgColorTrack(Bool_t pdg_color);
52
53 virtual void Init();
54
58 virtual void SelectSingleTimeslice();
62 virtual void SelectTimeslice();
66 virtual void PrevTimeslice();
70 virtual void NextTimeslice();
74 virtual void SelectSingleEvent();
78 virtual void SelectEvent();
82 virtual void PrevEvent();
86 virtual void NextEvent();
87
88 void SetModel(TObject* obj);
89
93 virtual void StartAnimation();
94
98 void MakeScreenshot();
99
100protected:
101 TObject* fObject = nullptr;
103 TGNumberEntry* fCurrentTimeslice = nullptr;
104 TGNumberEntry* fCurrentEvent = nullptr;
105 TGNumberEntry* fGlobalTransparency = nullptr;
106 TGLabel* fTimesliceTime = nullptr;
107 TGTextButton* fSelTs = nullptr;
108 TGTextButton* fPrevTs = nullptr;
109 TGTextButton* fNextTs = nullptr;
110 TGLabel* fEventNb = nullptr;
111 TGLabel* fEventTime = nullptr;
112 TGTextButton* fUpdateEvent = nullptr;
113 TGTextButton* fPrevEvent = nullptr;
114 TGTextButton* fNextEvent = nullptr;
115
116 TGComboBox* fScreenshotOpt = nullptr;
118
119 uint32_t fNbTs = 0;
120 TClonesArray* fCbmEvents = nullptr;
121 uint32_t fNbEventsInTs = 0;
122
123 void SetTimesliceTimeLabel(Double_t time);
124 void SetEventTimeLabel(Double_t time);
125
126private:
128};
129
130#endif // CbmTimesliceManagerEditor_H
GUI elements for CbmTimesliceManager. Automatically loaded by TBrowser. Cannot be used standalone!
virtual void SelectTimeslice()
Select timeslice depending on GUI elements values and load its first event. RESERVED FOR GUI CALLS!
virtual void PrevEvent()
Select previous event in timeslice. RESERVED FOR GUI CALLS!
virtual void NextTimeslice()
Select next timeslice and load its first event. RESERVED FOR GUI CALLS!
void MakeScreenshot()
Screenshot(s) generation: to be called by GUI element.
void SwitchPdgColorTrack(Bool_t pdg_color)
virtual void SelectEvent()
Select event in timeslice depending on GUI elements values. RESERVED FOR GUI CALLS!
virtual void SelectSingleEvent()
Select event in timeslice depending on GUI elements values, after clearing display....
ClassDef(CbmTimesliceManagerEditor, 1)
virtual void NextEvent()
Select next event in timeslice. RESERVED FOR GUI CALLS!
virtual void PrevTimeslice()
Select previous timeslice and load its first event. RESERVED FOR GUI CALLS!
CbmTimesliceManagerEditor(const CbmTimesliceManagerEditor &)=delete
virtual ~CbmTimesliceManagerEditor()=default
CbmTsEveAnimationControl * fAnimation
virtual void SelectSingleTimeslice()
Select timeslice depending on GUI elements values, after clearing display. RESERVED FOR GUI CALLS!
CbmTimesliceManagerEditor & operator=(const CbmTimesliceManagerEditor &)=delete
virtual void StartAnimation()
Start display: to be called by GUI element, see HowTo for description of options.
void SwitchBackground(Bool_t light_background)
CbmTimesliceManagerEditor(const TGWindow *p=0, Int_t width=250, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
TBrowser Event display for Timeslices as Tree entry with CbmEvents in container. Function as unique I...
GUI elements to add animation and screenshot controls to CbmTimesliceManagerEditor....