Belle II Software  release-08-01-10
DesSerPrePCMain.cc
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 #include <daq/rawdata/modules/DesSerPrePCMain.h>
9 #include <daq/rawdata/DesSerPrePC.h>
10 
11 //#define MAXEVTSIZE 400000000
12 
13 using namespace std;
14 using namespace Belle2;
15 
16 //-----------------------------------------------------------------
17 // Register the Module
18 //-----------------------------------------------------------------
19 REG_MODULE(DesSerPrePCMain)
20 
21 //-----------------------------------------------------------------
22 // Implementation
23 //-----------------------------------------------------------------
24 
25 
26 
28 {
29  addParam("PortFrom", m_port_recv, "port number", 30000);
30  addParam("HostNameFrom", m_host_recv, "hostname from", string("cpr001"));
31 
32  addParam("PortTo", m_port_send, "port number", 31001);
33  addParam("HostNameTo", m_host_send, "hostname from", string("0.0.0.0."));
34 
35  addParam("NodeID", m_nodeid, "Node(subsystem) ID", 0);
36  addParam("NodeName", m_nodename, "Node(subsystem) name", std::string(""));
37  addParam("UseShmFlag", m_shmflag, "Use shared memory to communicate with Runcontroller", 0);
38 
39  m_compressionLevel = 0;
40 }
41 
42 
43 DesSerPrePCMainModule::~DesSerPrePCMainModule()
44 {
45 }
46 
47 
48 void DesSerPrePCMainModule::initialize()
49 {
50  // Initialize EvtMetaData
51  m_eventMetaDataPtr.registerInDataStore();
52  // Open message handler
53 
54 
55 
56 }
57 
58 void DesSerPrePCMainModule::event()
59 {
60  DesSerPrePC des_ser_prepc(m_host_recv, m_port_recv,
61  m_host_send, m_port_send, m_shmflag,
62  m_nodename, m_nodeid);
63  des_ser_prepc.DataAcquisition();
64 
65 
66  //
67  // Update EventMetaData
68  //
69  m_eventMetaDataPtr.create();
70  m_eventMetaDataPtr->setExperiment(1);
71  m_eventMetaDataPtr->setRun(1);
72  m_eventMetaDataPtr->setEvent(1);
73 
74 }
75 
A class definition of an input module for Sequential ROOT I/O.
A class definition of an input module for Sequential ROOT I/O.
Definition: DesSerPrePC.h:26
void DataAcquisition() override
Module functions to be called from event process.
Definition: DesSerPrePC.cc:548
Base class for Modules.
Definition: Module.h:72
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.