From 57fe7090f56bf5f9fdf0735ed6c8c2d85a49445f Mon Sep 17 00:00:00 2001
From: Remy Prechelt <prechelt@hawaii.edu>
Date: Wed, 2 Jun 2021 14:09:34 -1000
Subject: [PATCH] Move getConfig from writer to module.

---
 corsika/detail/modules/LongitudinalProfile.inl        | 11 +++++++----
 .../writers/LongitudinalProfileWriterParquet.inl      |  9 ---------
 corsika/modules/LongitudinalProfile.hpp               |  2 +-
 .../writers/LongitudinalProfileWriterParquet.hpp      |  2 --
 4 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/corsika/detail/modules/LongitudinalProfile.inl b/corsika/detail/modules/LongitudinalProfile.inl
index 4e68c8f37..542a82c07 100644
--- a/corsika/detail/modules/LongitudinalProfile.inl
+++ b/corsika/detail/modules/LongitudinalProfile.inl
@@ -33,9 +33,12 @@ namespace corsika {
     return ProcessReturn::Ok;
   }
 
-  // template <typename TOutput>
-  // inline YAML::Node LongitudinalProfile<TOutput>::getConfig() const {
-  //   return YAML::Node;
-  // }
+  template <typename TOutput>
+  inline YAML::Node LongitudinalProfile<TOutput>::getConfig() const {
+    YAML::Node node;
+    node["type"] = "LongitudinalProfile";
+
+    return node;
+  }
 
 } // namespace corsika
diff --git a/corsika/detail/modules/writers/LongitudinalProfileWriterParquet.inl b/corsika/detail/modules/writers/LongitudinalProfileWriterParquet.inl
index e6882c31f..4873bc486 100644
--- a/corsika/detail/modules/writers/LongitudinalProfileWriterParquet.inl
+++ b/corsika/detail/modules/writers/LongitudinalProfileWriterParquet.inl
@@ -188,13 +188,4 @@ namespace corsika {
     return summary;
   }
 
-  inline YAML::Node LongitudinalProfileWriterParquet::getConfig() const {
-    // determined Xmax and dEdXmax from quadratic interpolation
-
-    YAML::Node node;
-    node["type"] = "LongitudinalProfile";
-
-    return node;
-  }
-
 } // namespace corsika
diff --git a/corsika/modules/LongitudinalProfile.hpp b/corsika/modules/LongitudinalProfile.hpp
index c34ee8f2e..af9c89a76 100644
--- a/corsika/modules/LongitudinalProfile.hpp
+++ b/corsika/modules/LongitudinalProfile.hpp
@@ -53,7 +53,7 @@ namespace corsika {
       return meter * std::numeric_limits<double>::infinity();
     }
 
-    // YAML::Node getConfig() const;
+    YAML::Node getConfig() const;
   };
 
 } // namespace corsika
diff --git a/corsika/modules/writers/LongitudinalProfileWriterParquet.hpp b/corsika/modules/writers/LongitudinalProfileWriterParquet.hpp
index ec13c82c8..0c4570c71 100644
--- a/corsika/modules/writers/LongitudinalProfileWriterParquet.hpp
+++ b/corsika/modules/writers/LongitudinalProfileWriterParquet.hpp
@@ -88,8 +88,6 @@ namespace corsika {
      */
     YAML::Node getSummary() const;
 
-    YAML::Node getConfig() const;
-
   private:
     ParquetStreamer output_; ///< The parquet streamer for this process.
 
-- 
GitLab