1 | #ifndef MGDISPLAYADC_H
|
---|
2 | #define MGDISPLAYADC_H
|
---|
3 |
|
---|
4 | #ifndef ROOT_TFrame
|
---|
5 | #include <TGFrame.h> // TGTransientFrame
|
---|
6 | #endif
|
---|
7 | #ifndef ROOT_TGListBox
|
---|
8 | #include <TGListBox.h> // TGListBox
|
---|
9 | #endif
|
---|
10 | #ifndef ROOT_TGSlider
|
---|
11 | #include <TGSlider.h> // TGVSlider
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | #ifndef MHISTOSADC_H
|
---|
15 | #include "MHistosAdc.h"
|
---|
16 | #endif
|
---|
17 |
|
---|
18 | class TGTextButton;
|
---|
19 | class TRootEmbeddedCanvas;
|
---|
20 | class TCanvas;
|
---|
21 | class TGRadioButton;
|
---|
22 |
|
---|
23 | class MGDisplayAdc : public TGTransientFrame {
|
---|
24 | private:
|
---|
25 |
|
---|
26 | MHistosAdc *fHists; // Pointer to Container with the histograms
|
---|
27 |
|
---|
28 | // Create a main frame with a number of different buttons.
|
---|
29 | //
|
---|
30 | TGCompositeFrame *fFrameTop ; // top part of the main window
|
---|
31 | TGCompositeFrame *fFrameLow ; // low part of the main window
|
---|
32 |
|
---|
33 | TGVerticalFrame *fFT1, *fFT2, *fFT3 ;
|
---|
34 |
|
---|
35 | TGListBox *fHistoList ;
|
---|
36 | TGTextButton *fButtonPrev, *fButtonNext , *fButtonReset ;
|
---|
37 |
|
---|
38 | TRootEmbeddedCanvas *fECanv , *fECanvLow;
|
---|
39 |
|
---|
40 | TGTextButton *fButtonSave, *fButtonPrint, *fButtonPrintAll, *fButtonClose ;
|
---|
41 |
|
---|
42 | TCanvas *fCanv ;
|
---|
43 |
|
---|
44 |
|
---|
45 | //for sliders
|
---|
46 |
|
---|
47 | TGVSlider *fVslider1;
|
---|
48 |
|
---|
49 | void DrawHi(Int_t i) { fHists->DrawHi(i); }
|
---|
50 | void DrawLo(Int_t i) { fHists->DrawLo(i); }
|
---|
51 | void DrawSelectedHi() { DrawHi( GetSelected()-1) ; }
|
---|
52 | void DrawSelectedLo() { DrawLo( GetSelected()-1) ; }
|
---|
53 | Int_t GetSelected() { return fHistoList->GetSelected(); }
|
---|
54 | void SelectSelected() { fHistoList->Select(GetSelected()-1, kTRUE); }
|
---|
55 | void SetSelectedTopEntry() { fHistoList->SetTopEntry(GetSelected()); }
|
---|
56 | void SetSelectedPos() { fVslider1->SetPosition( GetSelected()-1); }
|
---|
57 |
|
---|
58 | public:
|
---|
59 |
|
---|
60 | //for radio buttons
|
---|
61 |
|
---|
62 | TGRadioButton *fRadio[3];
|
---|
63 |
|
---|
64 |
|
---|
65 | Int_t fHistoType;
|
---|
66 | Bool_t fHistoLock;
|
---|
67 | //
|
---|
68 |
|
---|
69 |
|
---|
70 | TGPicture *fPicture;
|
---|
71 | TCanvas *fCanvas;
|
---|
72 |
|
---|
73 | MGDisplayAdc(MHistosAdc *fHists ,
|
---|
74 | const TGWindow *p, const TGWindow *main,
|
---|
75 | UInt_t w, UInt_t h,
|
---|
76 | UInt_t options = kMainFrame | kVerticalFrame ) ;
|
---|
77 |
|
---|
78 | ~MGDisplayAdc();
|
---|
79 |
|
---|
80 | void CloseWindow() ;
|
---|
81 |
|
---|
82 |
|
---|
83 | Bool_t BuildHistoList(Int_t type=1) ;
|
---|
84 |
|
---|
85 | Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
|
---|
86 |
|
---|
87 | } ;
|
---|
88 |
|
---|
89 | #endif
|
---|
90 |
|
---|
91 |
|
---|