From aebf0b8b1248fb04d328bc47fa57d2840a9b6ae9 Mon Sep 17 00:00:00 2001 From: beomki-yeo Date: Tue, 28 Nov 2023 18:26:17 +0100 Subject: [PATCH] Backup --- examples/run/cpu/truth_finding_example.cpp | 7 +++++++ examples/run/cuda/seeding_example_cuda.cpp | 6 ++++++ examples/run/cuda/truth_finding_example_cuda.cpp | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/examples/run/cpu/truth_finding_example.cpp b/examples/run/cpu/truth_finding_example.cpp index 9f7fa62ee4..ece926d82d 100644 --- a/examples/run/cpu/truth_finding_example.cpp +++ b/examples/run/cpu/truth_finding_example.cpp @@ -9,6 +9,7 @@ #include "traccc/definitions/common.hpp" #include "traccc/definitions/primitives.hpp" #include "traccc/efficiency/finding_performance_writer.hpp" +#include "traccc/event/event_tree_writer.hpp" #include "traccc/finding/finding_algorithm.hpp" #include "traccc/fitting/fitting_algorithm.hpp" #include "traccc/fitting/kalman_filter/kalman_fitter.hpp" @@ -65,6 +66,8 @@ int seq_run(const traccc::finding_input_config& i_cfg, vecmem::host_memory_resource host_mr; // Performance writer + traccc::event_tree_writer evt_tree_writer( + traccc::event_tree_writer::config{}); traccc::finding_performance_writer find_performance_writer( traccc::finding_performance_writer::config{}); traccc::fitting_performance_writer fit_performance_writer( @@ -172,6 +175,9 @@ int seq_run(const traccc::finding_input_config& i_cfg, const unsigned int n_fitted_tracks = track_states.size(); if (common_opts.check_performance) { + + evt_tree_writer.write(traccc::get_data(track_states), evt_map2); + find_performance_writer.write(traccc::get_data(track_candidates), evt_map2); @@ -187,6 +193,7 @@ int seq_run(const traccc::finding_input_config& i_cfg, } if (common_opts.check_performance) { + evt_tree_writer.finalize(); find_performance_writer.finalize(); fit_performance_writer.finalize(); } diff --git a/examples/run/cuda/seeding_example_cuda.cpp b/examples/run/cuda/seeding_example_cuda.cpp index 1cc96f6094..5c03f9de02 100644 --- a/examples/run/cuda/seeding_example_cuda.cpp +++ b/examples/run/cuda/seeding_example_cuda.cpp @@ -17,6 +17,7 @@ #include "traccc/efficiency/nseed_performance_writer.hpp" #include "traccc/efficiency/seeding_performance_writer.hpp" #include "traccc/efficiency/track_filter.hpp" +#include "traccc/event/event_tree_writer.hpp" #include "traccc/finding/finding_algorithm.hpp" #include "traccc/fitting/fitting_algorithm.hpp" #include "traccc/io/read_geometry.hpp" @@ -92,6 +93,8 @@ int seq_run(const traccc::seeding_input_config& /*i_cfg*/, traccc::memory_resource mr{device_mr, &cuda_host_mr}; // Performance writer + traccc::event_tree_writer evt_tree_writer( + traccc::event_tree_writer::config{}); traccc::seeding_performance_writer sd_performance_writer( traccc::seeding_performance_writer::config{}); traccc::finding_performance_writer find_performance_writer( @@ -432,6 +435,8 @@ int seq_run(const traccc::seeding_input_config& /*i_cfg*/, traccc::event_map2 evt_map(event, common_opts.input_directory, common_opts.input_directory, common_opts.input_directory); + + evt_tree_writer.write(traccc::get_data(track_states), evt_map); sd_performance_writer.write( vecmem::get_data(seeds_cuda), vecmem::get_data(sp_reader_output.spacepoints), evt_map); @@ -452,6 +457,7 @@ int seq_run(const traccc::seeding_input_config& /*i_cfg*/, } if (common_opts.check_performance) { + evt_tree_writer.finalize(); sd_performance_writer.finalize(); nsd_performance_writer.finalize(); find_performance_writer.finalize(); diff --git a/examples/run/cuda/truth_finding_example_cuda.cpp b/examples/run/cuda/truth_finding_example_cuda.cpp index 699ccdd26b..2ef22171f9 100644 --- a/examples/run/cuda/truth_finding_example_cuda.cpp +++ b/examples/run/cuda/truth_finding_example_cuda.cpp @@ -14,6 +14,7 @@ #include "traccc/device/container_d2h_copy_alg.hpp" #include "traccc/device/container_h2d_copy_alg.hpp" #include "traccc/efficiency/finding_performance_writer.hpp" +#include "traccc/event/event_tree_writer.hpp" #include "traccc/finding/finding_algorithm.hpp" #include "traccc/fitting/fitting_algorithm.hpp" #include "traccc/fitting/kalman_filter/kalman_fitter.hpp" @@ -86,6 +87,8 @@ int seq_run(const traccc::finding_input_config& i_cfg, traccc::memory_resource mr{device_mr, &cuda_host_mr}; // Performance writer + traccc::event_tree_writer evt_tree_writer( + traccc::event_tree_writer::config{}); traccc::finding_performance_writer find_performance_writer( traccc::finding_performance_writer::config{}); traccc::fitting_performance_writer fit_performance_writer( @@ -318,6 +321,7 @@ int seq_run(const traccc::finding_input_config& i_cfg, n_fitted_tracks_cuda += track_states_cuda.size(); if (common_opts.check_performance) { + evt_tree_writer.write(traccc::get_data(track_states), evt_map2); find_performance_writer.write( traccc::get_data(track_candidates_cuda), evt_map2); @@ -334,6 +338,7 @@ int seq_run(const traccc::finding_input_config& i_cfg, } if (common_opts.check_performance) { + evt_tree_writer.finalize(); find_performance_writer.finalize(); fit_performance_writer.finalize(); }