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