From fbd877af9af8068a5025452a691e7e42656950ad Mon Sep 17 00:00:00 2001
From: Dominik Baack <dominik.baack@tu-dortmund.de>
Date: Tue, 17 Nov 2020 12:17:12 +0100
Subject: [PATCH] Split SaveBoostHistogram into seperate files

---
 .../framework/utility/SaveBoostHistogram.inl} | 15 ++-------
 .../framework/utility/SaveBoostHistogram.hpp  | 31 +++++++++++++++++++
 2 files changed, 34 insertions(+), 12 deletions(-)
 rename corsika/{framework/utility/SaveBootHistogram.hpp => detail/framework/utility/SaveBoostHistogram.inl} (88%)
 create mode 100644 corsika/framework/utility/SaveBoostHistogram.hpp

diff --git a/corsika/framework/utility/SaveBootHistogram.hpp b/corsika/detail/framework/utility/SaveBoostHistogram.inl
similarity index 88%
rename from corsika/framework/utility/SaveBootHistogram.hpp
rename to corsika/detail/framework/utility/SaveBoostHistogram.inl
index 765764062..d7ac77a97 100644
--- a/corsika/framework/utility/SaveBootHistogram.hpp
+++ b/corsika/detail/framework/utility/SaveBoostHistogram.inl
@@ -21,16 +21,6 @@
 
 namespace corsika {
 
-  enum class SaveMode { overwrite, append };
-
-  /**
-   * This functions saves a boost::histogram into a numpy file. Only rather basic axis
-   * types are supported: regular, variable, integer, category<int>. Only "ordinary" bin
-   * counts (i.e. a double or int) are supported, nothing fancy like profiles.
-   *
-   * Note that this function makes a temporary, dense copy of the histogram, which could
-   * be an issue for huge sizes (e.g. for high dimensions)
-   */
   template <class Axes, class Storage>
   inline void save_hist(boost::histogram::histogram<Axes, Storage> const& h,
                         std::string const& filename, SaveMode mode = SaveMode::append) {
@@ -111,5 +101,6 @@ namespace corsika {
     cnpy::npz_save(filename, "data", temp.get(), axes_dims, mode_str);
     // In Python this array can directly be assigned to a histogram view if that
     // histogram has its axes correspondingly: hist.view(flow=True)[:] = file['data']
-  }
-} // namespace corsika
+  } // namespace corsika
+
+} // namespace corsika
\ No newline at end of file
diff --git a/corsika/framework/utility/SaveBoostHistogram.hpp b/corsika/framework/utility/SaveBoostHistogram.hpp
new file mode 100644
index 000000000..707900466
--- /dev/null
+++ b/corsika/framework/utility/SaveBoostHistogram.hpp
@@ -0,0 +1,31 @@
+/*
+ * (c) Copyright 2020 CORSIKA Project, corsika-project@lists.kit.edu
+ *
+ * This software is distributed under the terms of the GNU General Public
+ * Licence version 3 (GPL Version 3). See file LICENSE for a full version of
+ * the license.
+ */
+
+#pragma once
+
+
+
+#include <boost/histogram.hpp>
+
+
+namespace corsika {
+
+  enum class SaveMode { overwrite, append };
+
+  /**
+   * This functions saves a boost::histogram into a numpy file. Only rather basic axis
+   * types are supported: regular, variable, integer, category<int>. Only "ordinary" bin
+   * counts (i.e. a double or int) are supported, nothing fancy like profiles.
+   *
+   * Note that this function makes a temporary, dense copy of the histogram, which could
+   * be an issue for huge sizes (e.g. for high dimensions)
+   */
+  template <class Axes, class Storage>
+  inline void save_hist(boost::histogram::histogram<Axes, Storage> const& h,
+                        std::string const& filename, SaveMode mode = SaveMode::append);
+} // namespace corsika
-- 
GitLab