Skip to content
Snippets Groups Projects
Commit 7c92ddb9 authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Merge branch 'decreports_monitor' into 'master'

Add DecReportsMonitor to HLT2

See merge request !1780
parents 7fa6d39d 589881fd
No related branches found
No related tags found
1 merge request!1780Add DecReportsMonitor to HLT2
Pipeline #4576227 passed
......@@ -17,7 +17,7 @@ from PyConf.Algorithms import (
ExecutionReportsWriter, HltDecReportsWriter, HltSelReportsWriter,
Hlt__RoutingBitsWriter, HltLumiWriter, Gaudi__Hive__FetchLeavesFromFile,
CombineRawBankViewsToRawEvent, RawEventCombiner, RawEventSimpleCombiner,
AddressKillerAlg, VoidFilter)
AddressKillerAlg, VoidFilter, HltDecReportsMonitor, DeterministicPrescaler)
import Functors as F
from PyConf.components import force_location
from PyConf.control_flow import CompositeNode, NodeLogic
......@@ -460,7 +460,7 @@ def moore_control_flow(options, streams, process, allen_hlt1, analytics=False):
for stream, stream_lines in streams.items():
streams[stream] = sorted(stream_lines, key=lambda line: line.name)
lines = streams_dict_to_lines_list(streams)
lines = [line.node for line in streams_dict_to_lines_list(streams)]
rw_nodes, new_raw_banks, extra_outputs, barriers, dec_reports = report_writers_nodes(
streams,
......@@ -472,12 +472,49 @@ def moore_control_flow(options, streams, process, allen_hlt1, analytics=False):
and options.input_type == ROOT_KEY and options.output_type == ROOT_KEY,
clone_mc=options.simulation and options.input_type == 'ROOT')
dec = CompositeNode(
decisions_node = CompositeNode(
'hlt_decision',
combine_logic=NodeLogic.NONLAZY_OR,
children=[line.node for line in lines],
children=lines,
force_order=False)
# precale monitoring to use less resources
prescaler_decreports_monitor = DeterministicPrescaler(
name=f"{process.upper()}PrescaleDecReportsMonitor",
AcceptFraction=0.1,
SeedName=f"{process.upper()}PrescaleDecReportsMonitor",
ODINLocation=make_odin())
postcaler_decreports_monitor = DeterministicPrescaler(
name=f"{process.upper()}PostscaleDecReportsMonitor",
AcceptFraction=0.0,
SeedName=f"{process.upper()}PostscaleDecReportsMonitor",
ODINLocation=make_odin())
decreports_monitor = HltDecReportsMonitor(
name=f"{process.upper()}DecReportsMonitor", Input=dec_reports)
decisions_monitor_node = CompositeNode(
'monitor_decisions',
combine_logic=NodeLogic.LAZY_AND,
children=[
prescaler_decreports_monitor, decreports_monitor,
postcaler_decreports_monitor
],
force_order=True)
# We want to run the monitoring of line decisions on every event to have the proper normalization.
# Therefore, add the DecReportsMonitor after the control flow node containing all selection lines
# and use NONLAZY_OR as type of the node containing both. To not run the monitoring on every event
# a prescale is used. To not change the decision of the combined node a postscale is used.
lines_node = CompositeNode(
"lines",
combine_logic=NodeLogic.NONLAZY_OR,
children=[
decisions_node,
decisions_monitor_node,
],
force_order=True)
stream_rbw = {}
stream_writers = []
stream_writers_setup = []
......@@ -584,7 +621,7 @@ def moore_control_flow(options, streams, process, allen_hlt1, analytics=False):
else:
stream_writers_nodes = []
moore_children = (stream_writers_setup + unpack + [dec] + rw_nodes +
moore_children = (stream_writers_setup + unpack + [lines_node] + rw_nodes +
stream_writers_nodes)
moore = CompositeNode(
'moore',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment