]>
Commit | Line | Data |
---|---|---|
04fa961a | 1 | #ifndef ALIMONITORCLIENT_H |
2 | #define ALIMONITORCLIENT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | #include <TGFrame.h> | |
9 | #include <TGMenu.h> | |
10 | #include <TGButton.h> | |
11 | #include <TGLabel.h> | |
12 | #include <TGTextEntry.h> | |
13 | #include <TGToolBar.h> | |
14 | #include <TG3DLine.h> | |
15 | #include <TGNumberEntry.h> | |
16 | #include <TGCanvas.h> | |
17 | #include <TGSplitter.h> | |
18 | #include <TGListTree.h> | |
19 | #include <TRootEmbeddedCanvas.h> | |
20 | #include <TGTextView.h> | |
21 | #include <RQ_OBJECT.h> | |
22 | #include <TFolder.h> | |
23 | #include <TSocket.h> | |
24 | #include <TTimer.h> | |
25 | #include <TFile.h> | |
26 | #include "AliMonitorHisto.h" | |
27 | ||
28 | ||
29 | class AliMonitorClient : public TGMainFrame { | |
30 | ||
31 | RQ_OBJECT("AliMonitorClient") | |
32 | ||
33 | public: | |
34 | AliMonitorClient(); | |
35 | virtual ~AliMonitorClient(); | |
36 | ||
37 | void CloseWindow(); | |
38 | ||
39 | void OnNewData(); | |
40 | ||
41 | void OnMenuActivated(Int_t id); | |
42 | ||
43 | void OnEventNumberChanged(); | |
44 | void OnEventButtonPressed(); | |
45 | void OnSumButtonPressed(); | |
46 | void OnRunButtonPressed(); | |
47 | void OnLoopButtonClicked(); | |
48 | void OnPreviousButtonClicked(); | |
49 | void OnNextButtonClicked(); | |
50 | void OnCopyButtonClicked(); | |
51 | void OnSaveButtonClicked(); | |
52 | void OnPrintButtonClicked(); | |
53 | ||
54 | void OnTreeClicked(TGListTreeItem* item, Int_t btn); | |
55 | void OnTreeReturnPressed(TGListTreeItem* item); | |
56 | ||
57 | void OnLoopTimer(); | |
58 | ||
59 | private: | |
60 | TFolder* CreateTopFolder(); | |
61 | AliMonitorHisto* GetHisto(const char* folderName, const char* histoName); | |
62 | TGListTreeItem* GetItem(TGListTreeItem* base, const char* folderName, | |
63 | const char* histoName, Bool_t create); | |
64 | ||
65 | Bool_t ConnectToServer(); | |
66 | void DisconnectFromServer(); | |
67 | Bool_t OpenFile(); | |
68 | ||
69 | void ViewToolBar(Bool_t visible); | |
70 | void ViewTree(Bool_t visible); | |
71 | void ViewDescription(Bool_t visible); | |
72 | void ViewReference(Bool_t visible); | |
73 | void ViewStatistics(Bool_t visible); | |
74 | ||
75 | Bool_t AddFavorite(); | |
76 | Bool_t DeleteFavorite(); | |
77 | Bool_t LoadFavorites(Bool_t dialog = kTRUE); | |
78 | Bool_t SaveFavorites(); | |
79 | Bool_t SaveFavoritesAs(); | |
80 | ||
81 | Bool_t LoadReference(Bool_t dialog = kTRUE); | |
82 | void SetReference(); | |
83 | Bool_t TakeCurrentReference(); | |
84 | void TakeReferenceHisto(const char* folderName, | |
85 | AliMonitorHisto* histo); | |
86 | void TakeReferenceFolder(TGListTreeItem* item); | |
87 | Bool_t SaveReference(); | |
88 | Bool_t SaveReferenceAs(); | |
89 | ||
90 | void LoadSettings(); | |
91 | void SaveSettings(); | |
92 | ||
93 | void StopLoop(); | |
94 | Bool_t GetBaseItem(); | |
95 | Bool_t GoToNextItem(); | |
96 | Bool_t GoToPreviousItem(); | |
97 | void UpdateItem(Bool_t highlight); | |
98 | ||
99 | Bool_t CheckForNewData(); | |
100 | void ClearItems(TGListTreeItem* base); | |
101 | void CleanUpTree(TGListTreeItem* base); | |
102 | void UpdateTree(); | |
103 | void UpdateFavoritesTree(); | |
104 | void UpdateComparisonTree(); | |
105 | void UpdateDescription(); | |
106 | void UpdateHisto(); | |
107 | void UpdateAll(); | |
108 | ||
109 | TGLayoutHints* fMenuBarLayout; | |
110 | TGLayoutHints* fMenuBarItemLayout; | |
111 | TGLayoutHints* fMenuBarHelpLayout; | |
112 | TGPopupMenu* fMenuFile; | |
113 | TGPopupMenu* fMenuView; | |
114 | TGPopupMenu* fMenuFavorites; | |
115 | TGPopupMenu* fMenuReference; | |
116 | TGPopupMenu* fMenuOptions; | |
117 | TGPopupMenu* fMenuHelp; | |
118 | TGMenuBar* fMenuBar; | |
119 | ||
120 | TGLayoutHints* fToolBarLayout; | |
121 | TGHorizontal3DLine* fToolBarSep; | |
122 | TGToolBar* fToolBar; | |
123 | TGLayoutHints* fEventNumberLayout; | |
124 | TGNumberEntry* fEventNumber; | |
125 | TGButton* fEventButton; | |
126 | TGButton* fSumButton; | |
127 | TGButton* fRunButton; | |
128 | TGButton* fLoopButton; | |
129 | const TGPicture* fLoopOnPicture; | |
130 | const TGPicture* fLoopOffPicture; | |
131 | TGButton* fPreviousButton; | |
132 | TGButton* fNextButton; | |
133 | TGButton* fCopyButton; | |
134 | TGButton* fSaveButton; | |
135 | TGButton* fPrintButton; | |
136 | ||
137 | TGLayoutHints* fBottomLayout; | |
138 | TGLayoutHints* fLeftLayout; | |
139 | TGLayoutHints* fExpandLayout; | |
140 | ||
141 | TGVerticalFrame* fVerticalFrame; | |
142 | TGHorizontalFrame* fHorizontalFrame; | |
143 | ||
144 | TGCompositeFrame* fTreeFrame; | |
145 | TGCanvas* fTreeCanvas; | |
146 | TGListTree* fTree; | |
147 | const TGPicture* fHistoPicture; | |
148 | TGListTreeItem* fAllItem; | |
149 | TGListTreeItem* fFavoritesItem; | |
150 | TGListTreeItem* fComparisonItem; | |
151 | ||
152 | TGVSplitter* fTreeSplitter; | |
153 | ||
154 | TGCompositeFrame* fDrawFrame; | |
155 | TRootEmbeddedCanvas* fDrawCanvas; | |
156 | ||
157 | TGHSplitter* fDescriptionSplitter; | |
158 | ||
159 | TGCompositeFrame* fDescriptionFrame; | |
160 | TGTextView* fDescription; | |
161 | ||
162 | TString fServerName; | |
163 | TSocket* fSocket; | |
164 | TFileHandler* fSocketHandler; | |
165 | ||
166 | TFolder* fFolder; | |
167 | ||
168 | TGListTreeItem* fCurrentItem; | |
169 | TGListTreeItem* fBaseItem; | |
170 | TTimer* fLoopTimer; | |
171 | Int_t fLoopInterval; | |
172 | ||
173 | TString fFavoritesFileName; | |
174 | ||
175 | TString fReferenceFileName; | |
176 | TFolder* fReference; | |
177 | ||
178 | TString fPrintCommand; | |
179 | ||
180 | static const char* fgSettingsFileName; | |
181 | ||
182 | ClassDef(AliMonitorClient, 0) // class for receiving and displaying monitor histograms | |
183 | }; | |
184 | ||
185 | ||
186 | #endif | |
187 | ||
188 | ||
189 | ||
190 | ||
191 | ||
192 | ||
193 | ||
194 | ||
195 |