Skip to content

Commit

Permalink
Backup
Browse files Browse the repository at this point in the history
  • Loading branch information
beomki-yeo committed Nov 28, 2023
1 parent 922f9ab commit aebf0b8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/run/cpu/truth_finding_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);

Expand All @@ -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();
}
Expand Down
6 changes: 6 additions & 0 deletions examples/run/cuda/seeding_example_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand All @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions examples/run/cuda/truth_finding_example_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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);

Expand All @@ -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();
}
Expand Down

0 comments on commit aebf0b8

Please sign in to comment.