23 print(
'Usage : RecvStream0.py <COPPER hostname> <Use NSM(Network Shared Memory)? yes=1/no=0> <port # of eb0> <NSM nodename>')
27 b2.set_log_level(b2.LogLevel.INFO)
30 receiver = b2.register_module(
'DeSerializerPrePC')
31 dump = b2.register_module(
'RootOutput')
32 output = b2.register_module(
'PrintData')
35 receiver.param(
'NodeID', 3)
36 receiver.param(
'NumConn', 1)
37 receiver.param(
'HostNameFrom', [argvs[1],
'aiueohost'])
38 receiver.param(
'PortFrom', [30000, 30000])
39 receiver.param(
'EventDataBufferWords', 4801)
40 receiver.param(
'MaxTime', -1.)
41 receiver.param(
'MaxEventNum', -1)
42 receiver.param(
'NodeName', argvs[4])
43 use_shm_flag = int(argvs[2])
44 receiver.param(
'UseShmFlag', use_shm_flag)
47 dump.param(
'outputFileName',
'root_output.root')
50 sender = b2.register_module(
'Serializer')
51 sender.param(
'DestPort', int(argvs[3]))
52 sender.param(
'LocalHostName',
'localhost')
55 main = b2.create_path()
58 main.add_module(receiver)
60 main.add_module(sender)