Belle II Software  release-08-01-10
DummyDAQDQM.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 
14 # Set the log level to show only error and fatal messages
15 b2.set_log_level(b2.LogLevel.INFO)
16 
17 packer = b2.register_module('DummyDataSource')
18 packer.param('NodeID', 4001) # COPPER node ID (stored in RawHeader)
19 packer.param('UseShmFlag', 0)
20 packer.param('NodeName', "4001")
21 
22 # Histo Module
23 histo = b2.register_module('DqmHistoManager')
24 histo.param('HostName', 'localhost')
25 histo.param('Port', 9991)
26 histo.param('DumpInterval', 1000)
27 
28 # Monitor module
29 monitor = b2.register_module('MonitorDataCOPPER')
30 
31 # Create main path
32 main = b2.create_path()
33 
34 # Add modules to main path
35 main.add_module(packer)
36 main.add_module(histo)
37 main.add_module(monitor)
38 
39 # Process all events
40 b2.process(main)