23 print(
'Usage : RecvStream1.py <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(
'DeSerializerPC')
31 dump = b2.register_module(
'SeqRootOutput')
32 converter = b2.register_module(
'Convert2RawDet')
35 receiver.param(
'NodeID', 3)
36 receiver.param(
'NumConn', 2)
37 receiver.param(
'HostNameFrom', [
'localhost',
'localhost'])
38 receiver.param(
'PortFrom', [34008, 34009])
39 receiver.param(
'EventDataBufferWords', 4801)
40 receiver.param(
'MaxTime', -1.)
41 receiver.param(
'MaxEventNum', -1)
42 receiver.param(
'NodeName', argvs[3])
43 use_shm_flag = int(argvs[1])
44 receiver.param(
'UseShmFlag', use_shm_flag)
47 dump.param(
'outputFileName',
'root_output.sroot')
50 sender = b2.register_module(
'Serializer')
51 sender.param(
'DestPort', 36000)
52 sender.param(
'LocalHostName',
'localhost')
55 main = b2.create_path()
58 main.add_module(receiver)
59 main.add_module(converter)