Belle II Software  release-08-01-10
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  void initialize() override;
38 
40  void beginRun() override;
41 
43  void event() override;
44 
46  void endRun() override;
47 
49  void terminate() override;
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 ~GenRawSendModule()
Destructor.
Definition: GenRawSend.cc:47
void initialize() override
Initialize the Module.
Definition: GenRawSend.cc:55
void event() override
Running over all events.
Definition: GenRawSend.cc:78
int BUF_SIZE_WORD
size of buffer for one event (word)
Definition: GenRawSend.h:59
GenRawSendModule()
Constructor.
Definition: GenRawSend.cc:27
void endRun() override
Is called after processing the last event of a run.
Definition: GenRawSend.cc:122
EvtSocketSend * m_sock
EvtSocket.
Definition: GenRawSend.h:76
void terminate() override
Is called at the end of your Module.
Definition: GenRawSend.cc:128
int m_port
Destination port.
Definition: GenRawSend.h:73
void beginRun() override
Called when entering a new run.
Definition: GenRawSend.cc:73
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:96
Abstract base class for different kinds of events.