Belle II Software development
SendStream1.py
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4
11
12
25
26import basf2 as b2
27
28# Set the log level to show only error and fatal messages
29b2.set_log_level(b2.LogLevel.ERROR)
30
31# Modules
32rawgen = b2.register_module('GenRawCDC')
33dump = b2.register_module('PrintCollections')
34sender = b2.register_module('Serializer')
35
36# Raw Data Generator
37rawgen.param('Size', 128)
38
39# TxSocket
40sender.param('DestHostName', 'cprsrv1')
41sender.param('DestPort', 99999)
42
43# Create main path
44main = b2.create_path()
45
46# Add modules to main path
47main.add_module(rawgen)
48# main.add_module(dump)
49main.add_module(sender)
50
51# Process all events
52b2.process(main)