QwAnalysis
QwControl.h
Go to the documentation of this file.
1 #ifndef __QwControl_h__
2 #define __QwControl_h__
3 
4 #include "TThread.h"
5 
6 #include "VQwSystem.h"
7 #include "VQwAnalyzer.h"
8 #include "VQwDataserver.h"
9 
10 void* QwRunThread (void*);
11 
12 class QwControl : public VQwSystem {
13 
14  private:
15  TThread* fRunThread; // thread with analyzer
16 
17  VQwAnalyzer* fAnalyzer; // analyzer
18  VQwDataserver* fDataserver; // dataserver
19 
20  bool fIsOnline; // Are we running online (CODA stream) or offline (ASCII)
21  bool fIsFinished; // Are we at the end of the data stream yet
22 
23  public:
24  QwControl (const char* name, bool = false): VQwSystem(name) { };
25  virtual ~QwControl() { };
26 
27  void Run();
28  void Start();
29  void OnlineLoop();
30  void OfflineLoop();
31 
32  // analyzer creation and starting
33  VQwAnalyzer* CreateAnalyzer (const char* name);
34  void SetAnalyzer (VQwAnalyzer* analyzer);
35 
36  // dataserver creation and starting
37  VQwDataserver* CreateDataserver (const char* name);
38  void SetDataserver (VQwDataserver* dataserver);
39 
40 
41  void SetIsOnline (bool online) { fIsOnline = online; };
42  bool IsOnline () { return fIsOnline; };
43  void SetIsFinished (bool finished) { fIsFinished = finished; };
44  bool IsFinished () { return fIsFinished; };
45 
46  ClassDef(QwControl,1)
47 };
48 
49 #endif // __QwControl_h__
bool fIsFinished
Definition: QwControl.h:21
bool IsOnline()
Definition: QwControl.h:42
VQwDataserver * fDataserver
Definition: QwControl.h:18
bool fIsOnline
Definition: QwControl.h:20
void * QwRunThread(void *)
Definition: QwControl.cc:27
QwControl(const char *name, bool=false)
Definition: QwControl.h:24
TThread * fRunThread
Definition: QwControl.h:15
void SetDataserver(VQwDataserver *dataserver)
Definition: QwControl.cc:149
void SetAnalyzer(VQwAnalyzer *analyzer)
Definition: QwControl.cc:128
bool IsFinished()
Definition: QwControl.h:44
virtual ~QwControl()
Definition: QwControl.h:25
void Start()
Definition: QwControl.cc:67
void OfflineLoop()
Definition: QwControl.cc:97
void OnlineLoop()
Definition: QwControl.cc:85
VQwAnalyzer * CreateAnalyzer(const char *name)
Definition: QwControl.cc:119
void SetIsFinished(bool finished)
Definition: QwControl.h:43
void Run()
Definition: QwControl.cc:42
VQwDataserver * CreateDataserver(const char *name)
Definition: QwControl.cc:140
VQwAnalyzer * fAnalyzer
Definition: QwControl.h:17
void SetIsOnline(bool online)
Definition: QwControl.h:41