Belle II Software  release-05-01-25
GenRawSend.h
1 //+
2 // File : genrawsend.h
3 // Description : Generate Pseudo raw data and send it via socket
4 //
5 // Author : Ryosuke Itoh, IPNS, KEK
6 // Date : 3 - Sep - 2010
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_ */
Belle2::EvtSocketSend
Definition: EvtSocket.h:26
Belle2::GenRawSendModule::beginRun
virtual void beginRun()
Called when entering a new run.
Definition: GenRawSend.cc:73
Belle2::GenRawSendModule::terminate
virtual void terminate()
Is called at the end of your Module.
Definition: GenRawSend.cc:128
Belle2::GenRawSendModule
Definition: GenRawSend.h:26
Belle2::GenRawSendModule::m_dest
std::string m_dest
Destination Host.
Definition: GenRawSend.h:70
Belle2::GenRawSendModule::BUF_SIZE_WORD
int BUF_SIZE_WORD
size of buffer for one event (word)
Definition: GenRawSend.h:59
Belle2::GenRawSendModule::initialize
virtual void initialize()
Initialize the Module.
Definition: GenRawSend.cc:55
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::GenRawSendModule::GenRawSendModule
GenRawSendModule()
Constructor.
Definition: GenRawSend.cc:27
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::GenRawSendModule::m_port
int m_port
Destination port.
Definition: GenRawSend.h:73
Belle2::GenRawSendModule::endRun
virtual void endRun()
Is called after processing the last event of a run.
Definition: GenRawSend.cc:122
Belle2::GenRawSendModule::event
virtual void event()
Running over all events.
Definition: GenRawSend.cc:78
Belle2::GenRawSendModule::m_sock
EvtSocketSend * m_sock
EvtSocket.
Definition: GenRawSend.h:76
Belle2::GenRawSendModule::~GenRawSendModule
virtual ~GenRawSendModule()
Destructor.
Definition: GenRawSend.cc:47