Belle II Software  release-08-01-10
RecvSendROPC.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 b2.set_log_level(b2.LogLevel.INFO)
31 
32 # Modules
33 reader = b2.register_module('DeSerializerPC')
34 sender = b2.register_module('Serializer')
35 
36 # TxSocket
37 reader.param('RecvPort', 35000)
38 # sender.param('DestHostName', 'hltes')
39 sender.param('DestHostName', 'localhost')
40 sender.param('DestPort', 37000)
41 
42 # Create main path
43 main = b2.create_path()
44 
45 # Add modules to main path
46 main.add_module(reader)
47 main.add_module(sender)
48 
49 # Process all events
50 b2.process(main)