9 """Helper module to sleep 20 seconds on init (to mimik geometry loading)"""
12 """Make the module parallel processing certified"""
14 self.set_property_flags(basf2.ModulePropFlags.PARALLELPROCESSINGCERTIFIED)
17 """Sleep 20 seconds"""
21 def add_input_module(path, input_address, add_expressreco_objects):
22 """Add the ZMQ input module in the settings used for the examples"""
23 input_module = path.add_module(
"HLTZMQ2Ds", input=input_address, addExpressRecoObjects=add_expressreco_objects)
28 def add_reco_modules(path, dqm_address, mimik_startup):
29 """Add the reconstruction modules in the settings used for the examples"""
34 path.add_module(
"HLTDQM2ZMQ", output=dqm_address, sendOutInterval=5)
35 path.add_module(
"DAQMonitor")
38 def add_output_module(path, output_address, raw):
39 """Add the ZMQ output module in the settings used for the examples"""
40 path.add_module(
"HLTDs2ZMQ", output=output_address, raw=raw)
43 def create_socket(context, address):
44 """Create a socket out of the given address"""
45 socket = context.socket(zmq.DEALER)
46 socket.connect(address)
51 def get_sockets(settings):
52 """Create all monitoring sockets for the given settings dictionary"""
54 sockets = {name: create_socket(ctx, address)
for name, address
in settings[
"monitor"].items()}