Diana Software
MGuiDriver.hh
Go to the documentation of this file.
1 #ifndef _M_GUIDRIVER_HH_
2 #define _M_GUIDRIVER_HH_
3 
34 #include "QDriver.hh"
35 #include <stdarg.h>
36 #include "QGDInclude.hh"
37 #include "QRunData.hh"
38 #include "QGlobalDataManager.hh"
39 class TSocket;
40 
41 namespace Diana {
42  class QEvent;
43  class QEventInspector;
44 };
45 
46 class MGuiDriver : public Diana::QDriver {
47 
48  public:
50  MGuiDriver();
51 
53  ~MGuiDriver();
54 
56  Action Init(Diana::QEventAssembler& eva);
57 
59  Action Do(Diana::QEventAssembler& eva);
60 
62  Action Done();
63  private:
64  enum MenuLevel {
65  ML_Init = 0,
68  };
69 
71  Action Menu(MenuLevel level);
72 
74  Action HandleCommand(QGDCommand cmd);
75 
78 
80  void SendCommands(MenuLevel level);
81 
83  void ListModules();
84 
86  void ListModuleParameters(int modIndex);
87 
89  void ChangeModuleParameter(int modIndex, const QVdt& val);
90 
92  void SendData(const std::string& type);
93 
95  void SendTObject(const TObject* obj);
96 
97  TSocket* fSocket;
98  Diana::QEventAssembler* fEva;
100  const Diana::QGlobalDataManager* fDm;
101 };
102 
103 #endif
104 
driver module for Interactive GUI, interfaced via TSocket with any class inerithing QGDMessageHandler
Definition: MGuiDriver.hh:46
void ChangeModuleParameter(int modIndex, const QVdt &val)
change module parameter
Definition: MGuiDriver.cc:245
Action Done()
Done method.
Definition: MGuiDriver.cc:69
void SendTObject(const TObject *obj)
general purpose function used to send TObjects
Definition: MGuiDriver.cc:196
Action HandleCommand(QGDCommand cmd)
HandleCommand method. Execute a command.
Definition: MGuiDriver.cc:89
void ListModuleParameters(int modIndex)
Send List of module parameter.
Definition: MGuiDriver.cc:222
Action Menu(MenuLevel level)
Menu method. Handle Menu logic.
Definition: MGuiDriver.cc:76
const Diana::QGlobalDataManager * fDm
Definition: MGuiDriver.hh:100
~MGuiDriver()
destructor
Definition: MGuiDriver.cc:24
MGuiDriver()
constructor
Definition: MGuiDriver.cc:18
void SendCommands(MenuLevel level)
Send Avalaible commands to the server.
Definition: MGuiDriver.cc:159
QGDCommand GetCommand(MenuLevel level)
Get command from standard input.
Definition: MGuiDriver.cc:135
Action Do(Diana::QEventAssembler &eva)
Do method.
Definition: MGuiDriver.cc:46
void ListModules()
Send List of avalaible modules.
Definition: MGuiDriver.cc:209
Action Init(Diana::QEventAssembler &eva)
Init method.
Definition: MGuiDriver.cc:30
Diana::QEventAssembler * fEva
Definition: MGuiDriver.hh:98
QRunData fRunData
Definition: MGuiDriver.hh:99
TSocket * fSocket
Definition: MGuiDriver.hh:97
void SendData(const std::string &type)
send data
Definition: MGuiDriver.cc:263
Visitor class to inspect the QEvent content.
diana event
Definition: QEvent.hh:46
Basic run based info.
Definition: QRunData.hh:20
Variable Data Type.
Definition: QVdt.hh:26
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...