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