GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WatcherProducer.h
Go to the documentation of this file.
1 
2 
3 #ifndef Gw_WatcherProducer
4 #define Gw_WatcherProducer
5 
6 // ADF includes
7 #ifndef ADF_NarvalInterface
8 #include "NarvalInterface.h"
9 #endif
10 
11 // ROOT includes
12 #ifndef ROOT_TSocket
13 #include "TSocket.h"
14 #endif
15 
16 namespace Gw {
17 
19 
23 {
24 private:
25  TString fMachine;
26  UInt_t fPort;
27 
28  TSocket *fSocket;
30  Long_t fTimeout;
31 
32 private:
33  ADF::BufferIO fBuffer;
34 
35 protected:
37  Bool_t OpenSocket();
38  Bool_t CloseSocket();
39 public:
41  ADF::NarvalProducer(),
42  fMachine("localhost"),
43  fPort(9090),
44  fSocket(0x0),
45  fTimeout(100),
46  fBuffer(ADF::aByte)
47  {;}
48  virtual ~WatcherProducer();
49 
51  void SetTimeout(Long_t timeout = 10); //*MENU*
52 
53  static void process_config (const Char_t *path, UInt_t *error_code)
54  { ADF::NarvalProducer::process_config(path,error_code); }
55 
57  virtual void process_initialise (UInt_t */*error_code*/)
58  {;}
60  virtual void process_reset (UInt_t */*error_code*/);
61 
63 
66  virtual UInt_t ProcessBlock (ADF::FrameBlock &);
67 
69  Bool_t SetConnection(const Char_t *machine ="localhost", UInt_t port = 9090);
70 };
71 
72 } // end namespace
73 
74 #endif
75 
76 
It defines the interface needed to be a narval actor (producer).
A Block of Frames.
Definition: FrameBlock.h:43
void SetTimeout(Long_t timeout=10)
change timeout to try and get data from the socket
static void process_config(const Char_t *, UInt_t *)
Have to be overwritten and called in your implementation.
virtual void process_reset(UInt_t *)
TODO.
To get a buffer from a server.
static void process_config(const Char_t *path, UInt_t *error_code)
const UInt_t aByte
Definition: BaseBuffer.h:34
virtual void process_initialise(UInt_t *)
TODO reads from a file the data to open the socket.
Bool_t OpenSocket()
true if a valid connection
header file for NarvalInterface.cpp
virtual UInt_t ProcessBlock(ADF::FrameBlock &)
load the next block
Bool_t SetConnection(const Char_t *machine="localhost", UInt_t port=9090)
change the place where are picked data