]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/alistoragemanager/AliStorageAdministratorPanel.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / AliStorageAdministratorPanel.h
CommitLineData
5eb34a26 1#ifndef AliStorageAdministratorPanel_H
2#define AliStorageAdministratorPanel_H
3
4#include "AliStorageEventManager.h"
5
5eb34a26 6#include <TGFrame.h>
7#include <TGLabel.h>
8#include <TThread.h>
9
10class AliStorageAdministratorPanel : public TGMainFrame
11{
12
13public:
14 AliStorageAdministratorPanel();
15 virtual ~AliStorageAdministratorPanel();
16private:
17 bool fPanelQuited;
18
19 //gui components and methods
20 TGLabel *fConnectionLabel;
21 TGLabel *fDataLabel;
22 TGLabel *fSavingLabel;
23 TGLabel *fCurrentSizeLabel;
24 TGLabel *fMaxSizeLabel;
25 TGLabel *fMaxOccupationLabel;
26 TGLabel *fRemoveEventsLabel;
27 TGLabel *fEventsInChunkLabel;
28
29 void InitWindow();
30 void SetupThreadsFrame();
31 void SetupToolbar();
32 void SetupFixedMenuBar();
33 void SetupDockableMenuBar();
34
35 //set labels method
36 void SetLabel(TGLabel *label, int option);
37 void SetLabelValue(TGLabel *label, long value, int option);
38
39 //handle different actions
40 void onExit();
41 void onOption1();
42 void onOption2();
43 void onOption3();
44
45 void onServerListEvents();
46 void onServerMarkEvent();
47 void onServerGetEvent();
48 void onClientSetParams();
49 void onServerGetNextEvent();
50 void onServerGetLastEvent();
51
52 //client params
53 int fMaxStorageSize;
54 int fMaxOccupation;
55 int fRemoveEvents;
56 int fEventsInChunk;
57
58 //handle different messages
59 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t);
60 void CloseWindow();
61
62 //socket connection
63 TThread *fCommunicationThread;
164d3d29 64 storageSockets fCommunicationSocket;
65 static void* Dispatch(void *arg){static_cast<AliStorageAdministratorPanel*>(arg)->CheckStateHandle();}
66 void CheckStateHandle();
5eb34a26 67 void CheckClientState(int option);
68
164d3d29 69 storageSockets fServerSocket;//socket for two-way communication with AliStorageServerThread
5eb34a26 70 AliStorageEventManager *fEventManager;
71
72 AliStorageAdministratorPanel(const AliStorageAdministratorPanel&);
73 AliStorageAdministratorPanel& operator=(const AliStorageAdministratorPanel&);
74
75 ClassDef(AliStorageAdministratorPanel,0);
76};
77
78#endif