Belle II Software development
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
13using namespace std;
14using namespace Belle2;
15
16//-----------------------------------------------------------------
17// Register the Module
18//-----------------------------------------------------------------
19REG_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
40}
41
42
43DesSerPrePCMainModule::~DesSerPrePCMainModule()
44{
45}
46
47
49{
50 // Initialize EvtMetaData
51 m_eventMetaDataPtr.registerInDataStore();
52 // Open message handler
53
54
55
56}
57
59{
60 DesSerPrePC des_ser_prepc(m_host_recv, m_port_recv,
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
void initialize() override
Module functions to be called from main process.
std::string m_nodename
Node name.
std::string m_host_send
hostname
void event() override
Module functions to be called from main process.
int m_shmflag
Use shared memory -> 1; Without shm -> 0.
DesSerPrePCMainModule()
Constructor / Destructor.
int m_compressionLevel
Compression Level.
std::string m_host_recv
hostname
int m_nodeid
Node(PC or COPPER) ID.
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
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#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.
STL namespace.