diff --git a/python/MooreTests/make_bandwidth_test_page.py b/python/MooreTests/make_bandwidth_test_page.py index 765d7ee4f0698a5cb268a54e5347d9ec6974befe..e771a6b49aeb824c47789e63d80181088991af7d 100644 --- a/python/MooreTests/make_bandwidth_test_page.py +++ b/python/MooreTests/make_bandwidth_test_page.py @@ -72,13 +72,7 @@ REPORT_TEMPLATE = jinja2.Template(""" <p> Other results are shown by plots or tables (in the links) below. <br> </p> -<object type="image/png" data="lines_per_wg.png"></object> -<p> - The number of selection lines per working group. <br> - "Other" category contains those lines with a parsed name that doesn't belong to any known WG. <br> - To make lines properly categorized, one should follow the naming convention, - name of lines should start with `Hlt1/Hlt2/Spruce[WG]_`. -</p> +{{LINES_PER_WG}} <object type="image/png" data="hist__rate.png"></object> <p> Distribution of rate of selection lines. <br> @@ -88,12 +82,9 @@ REPORT_TEMPLATE = jinja2.Template(""" or larger than 1 kHz, which requires some attention. <br> The rates of all lines are listed in a html page attached below. <br> </p> -<object type="image/png" data="hist__dst_data_size.png"></object> -<p> - Distribution of DstData RawBank size of selection lines. <br> - The total distribution is shown as a stacked histogram, split into several histograms of WGs. <br> - The distributions per WG is attached in the html page below. -</p> + +{{DST_DATA_HIST}} + <object type="image/png" data="hist__total_size.png"></object> <p> Distribution of total event size of selection lines. <br> @@ -103,12 +94,9 @@ REPORT_TEMPLATE = jinja2.Template(""" is larger than 1 MB, which requires some attention. <br> The event sizes of all lines are listed in a html page attached below. <br> </p> -<object type="image/png" data="hist__dst_bandwidth.png"></object> -<p> - Distribution of bandwidth computed from DstData RawBank size. <br> - The total distribution is shown as a stacked histogram, split into several histograms of WGs. <br> - The distributions per WG is attached in the html page below. -</p> + +{{DST_BW_HIST}} + <object type="image/png" data="hist__tot_bandwidth.png"></object> <p> Distribution of bandwidth computed from total event size. <br> @@ -211,6 +199,38 @@ SPRUCING_ALL_RESULTS = jinja2.Template(""" </ul> """) +HLT1_LINES_PER_WG = jinja2.Template("""""") +HLT1_DST_DATA_HIST = jinja2.Template("""""") +HLT1_DST_BW_HIST = jinja2.Template("""""") + +HLT2_OR_SPRUCING_LINES_PER_WG = jinja2.Template(""" +<object type="image/png" data="lines_per_wg.png"></object> +<p> + The number of selection lines per working group. <br> + "Other" category contains those lines with a parsed name that doesn't belong to any known WG. <br> + To make lines properly categorized, one should follow the naming convention, + name of lines should start with `Hlt1/Hlt2/Spruce[WG]_`. +</p> +""") + +HLT2_OR_SPRUCING_DST_DATA_HIST = jinja2.Template(""" +<object type="image/png" data="hist__dst_data_size.png"></object> +<p> + Distribution of DstData RawBank size of selection lines. <br> + The total distribution is shown as a stacked histogram, split into several histograms of WGs. <br> + The distributions per WG is attached in the html page below. +</p> +""") + +HLT2_OR_SPRUCING_DST_BW_HIST = jinja2.Template(""" +<object type="image/png" data="hist__dst_bandwidth.png"></object> +<p> + Distribution of bandwidth computed from DstData RawBank size. <br> + The total distribution is shown as a stacked histogram, split into several histograms of WGs. <br> + The distributions per WG is attached in the html page below. +</p> +""") + TABLE_OTHER_LINE_TEMPLATE = jinja2.Template(""" <p> List of line names that categorized to "Others". @@ -575,18 +595,25 @@ if __name__ == '__main__': rate_table_split_by_wg_stream=fname_helper. final_rate_table_all_lines_split_by_stream_path( "wg", full_path=False)) + lines_per_wg = HLT2_OR_SPRUCING_LINES_PER_WG.render() + dst_data_hist = HLT2_OR_SPRUCING_DST_DATA_HIST.render() + dst_bw_hist = HLT2_OR_SPRUCING_DST_BW_HIST.render() elif args.process == 'spruce': template = SPRUCE_REPORT_TEMPLATE.render( BASE_PATH=fname_helper.base_html_path(args.building_locally), stream_config_json_wg=fname_helper.stream_config_json_path( "wg", full_path=False), table_wgstream_rates=table_main_stream_rates) - all_results = HLT2_ALL_RESULTS.render( + all_results = SPRUCING_ALL_RESULTS.render( BASE_PATH=fname_helper.base_html_path(args.building_locally), line_descr=fname_helper.line_descr_path(full_path=False), rate_table_split_by_wg_stream=fname_helper. final_rate_table_all_lines_split_by_stream_path( "wg", full_path=False)) + lines_per_wg = HLT2_OR_SPRUCING_LINES_PER_WG.render() + dst_data_hist = HLT2_OR_SPRUCING_DST_DATA_HIST.render() + dst_bw_hist = HLT2_OR_SPRUCING_DST_BW_HIST.render() + elif args.process == 'hlt1': template = HLT1_REPORT_TEMPLATE.render( BASE_PATH=fname_helper.base_html_path(args.building_locally), @@ -595,6 +622,9 @@ if __name__ == '__main__': table_streamless_rates=table_main_stream_rates) all_results = HLT1_ALL_RESULTS.render( BASE_PATH=fname_helper.base_html_path(args.building_locally)) + lines_per_wg = HLT1_LINES_PER_WG.render() + dst_data_hist = HLT1_DST_DATA_HIST.render() + dst_bw_hist = HLT1_DST_BW_HIST.render() with open(fname_helper.html_page_outputs_path("index.html"), "w") as html_file: @@ -603,6 +633,9 @@ if __name__ == '__main__': BASE_PATH=fname_helper.base_html_path(args.building_locally), TEMPLATE=template, ALL_RESULTS=all_results, + LINES_PER_WG=lines_per_wg, + DST_DATA_HIST=dst_data_hist, + DST_BW_HIST=dst_bw_hist, INPUT_CONFIG_PATH=os.path.expandvars(args.input_config), INPUT_RATE=input_info['input_rate'], INPUT_NU=input_info['nu'],