Belle II Software  release-06-01-15
GenRawSend.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #ifndef GEN_RAW_SEND_H
10 #define GEN_RAW_SEND_H
11 
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreObjPtr.h>
14 #include <framework/dataobjects/EventMetaData.h>
15 
16 #include <daq/dataflow/EvtSocket.h>
17 
18 #include <rawdata/dataobjects/RawCOPPER.h>
19 
20 namespace Belle2 {
26  class GenRawSendModule : public Module {
27 
28  public:
29 
32 
34  virtual ~GenRawSendModule();
35 
37  virtual void initialize();
38 
40  virtual void beginRun();
41 
43  virtual void event();
44 
46  virtual void endRun();
47 
49  virtual void terminate();
50 
51  private:
52  // unsigned int* m_buffer;
53  char* m_buffer;
54  int m_size;
55  int m_maxevt;
56  int m_nevt;
57 
60 
61  // Event Meta Data
62  StoreObjPtr<EventMetaData> m_eventMetaDataPtr;
63 
64  // RawCOPPER object
65  StoreObjPtr<RawCOPPER> m_rawcopper;
66 
67  // Parameters for EvtSocket
68 
70  std::string m_dest;
71 
73  int m_port;
74 
77 
78 
79  };
81 }
82 
83 #endif /* EXERCISE1_H_ */
virtual void event()
Running over all events.
Definition: GenRawSend.cc:78
virtual ~GenRawSendModule()
Destructor.
Definition: GenRawSend.cc:47
virtual void initialize()
Initialize the Module.
Definition: GenRawSend.cc:55
virtual void beginRun()
Called when entering a new run.
Definition: GenRawSend.cc:73
int BUF_SIZE_WORD
size of buffer for one event (word)
Definition: GenRawSend.h:59
GenRawSendModule()
Constructor.
Definition: GenRawSend.cc:27
EvtSocketSend * m_sock
EvtSocket.
Definition: GenRawSend.h:76
int m_port
Destination port.
Definition: GenRawSend.h:73
virtual void terminate()
Is called at the end of your Module.
Definition: GenRawSend.cc:128
virtual void endRun()
Is called after processing the last event of a run.
Definition: GenRawSend.cc:122
std::string m_dest
Destination Host.
Definition: GenRawSend.h:70
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
Abstract base class for different kinds of events.