@@ -66,11 +66,6 @@ class grid_factory {
66
66
explicit grid_factory (vecmem::memory_resource &resource)
67
67
: m_resource(&resource) {}
68
68
69
- // / Print grid - up to three dimensions
70
- // / @note will likely become obsolete with the actsvg implementation
71
- template <typename grid_t >
72
- auto to_string (const grid_t &) const noexcept -> void;
73
-
74
69
//
75
70
// annulus 2D
76
71
//
@@ -513,8 +508,8 @@ class grid_factory {
513
508
std::enable_if_t <std::is_object_v<typename grid_frame_t ::loc_point>,
514
509
bool > = true >
515
510
auto new_grid (
516
- const std::vector<scalar_type> spans,
517
- const std::vector<std::size_t > n_bins,
511
+ const std::vector<scalar_type> & spans,
512
+ const std::vector<std::size_t > & n_bins,
518
513
const std::vector<std::pair<axis::multi_bin<sizeof ...(bound_ts)>,
519
514
dindex>> &bin_capacities = {},
520
515
const std::vector<std::vector<scalar_type>> &ax_bin_edges = {},
@@ -539,8 +534,8 @@ class grid_factory {
539
534
std::enable_if_t <std::is_enum_v<typename grid_shape_t ::boundaries>,
540
535
bool > = true >
541
536
auto new_grid (
542
- const std::vector<scalar_type> spans,
543
- const std::vector<std::size_t > n_bins,
537
+ const std::vector<scalar_type> & spans,
538
+ const std::vector<std::size_t > & n_bins,
544
539
const std::vector<std::pair<axis::multi_bin<sizeof ...(bound_ts)>,
545
540
dindex>> &bin_capacities = {},
546
541
const std::vector<std::vector<scalar_type>> &ax_bin_edges = {},
@@ -705,73 +700,6 @@ class grid_factory {
705
700
vecmem::memory_resource *m_resource{};
706
701
};
707
702
708
- template <typename bin_t , template <std::size_t > class serializer_t ,
709
- typename algebra_t >
710
- template <typename grid_t >
711
- auto grid_factory<bin_t , serializer_t , algebra_t >::to_string(
712
- const grid_t &gr) const noexcept -> void {
713
-
714
- using entry_t = typename grid_t ::bin_type;
715
-
716
- // Loop over the first dimension
717
- const auto &ax0 = gr.template get_axis <0 >();
718
- std::cout << " {" ;
719
- for (unsigned int i{0u }; i < ax0.nbins (); ++i) {
720
-
721
- // Loop over the second dimension
722
- if constexpr (grid_t ::dim > 1u ) {
723
- const auto &ax1 = gr.template get_axis <1 >();
724
- std::cout << " {" ;
725
- for (unsigned int j{0u }; j < ax1.nbins (); ++j) {
726
-
727
- // Loop over the third dimension
728
- if constexpr (grid_t ::dim > 2 ) {
729
- const auto &ax2 = gr.template get_axis <2 >();
730
- std::cout << " {" ;
731
- for (unsigned int k{0u }; k < ax2.nbins (); ++k) {
732
-
733
- // Print the bin content - three dimensions
734
- std::cout << " ( " ;
735
- for (const auto &entry : gr.bin (i, j, k)) {
736
- if (entry == detail::invalid_value<entry_t >()) {
737
- std::cout << " none " ;
738
- } else {
739
- std::cout << entry << " " ;
740
- }
741
- }
742
- std::cout << " )" ;
743
- }
744
- std::cout << " }" << std::endl << std::endl;
745
- } else {
746
- // Print the bin content - two dimensions
747
- std::cout << " ( " ;
748
- for (const auto &entry : gr.bin (i, j)) {
749
- if (entry == detail::invalid_value<entry_t >()) {
750
- std::cout << " none " ;
751
- } else {
752
- std::cout << entry << " " ;
753
- }
754
- }
755
- std::cout << " )" ;
756
- }
757
- }
758
- std::cout << " }" << std::endl;
759
- } else {
760
- // Print the bin content - one dimension
761
- std::cout << " ( " ;
762
- for (const auto &entry : gr.bin (i)) {
763
- if (entry == detail::invalid_value<entry_t >()) {
764
- std::cout << " none " ;
765
- } else {
766
- std::cout << entry << " " ;
767
- }
768
- }
769
- std::cout << " )" << std::endl;
770
- }
771
- }
772
- std::cout << " }" << std::endl;
773
- }
774
-
775
703
// Infer a grid factory type from an already completely assembled grid type
776
704
template <typename grid_t , typename algebra_t = ALGEBRA_PLUGIN<detray::scalar>>
777
705
using grid_factory_type =
0 commit comments