From c55a358475194ad4afc1c2a940d3e140b5ec3bb1 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Mon, 11 Dec 2023 11:43:43 +0100
Subject: [PATCH] Move NPTM runners in corresponding sub-folders

---
 src/{ => cluster}/np_cluster.cpp | 12 ++++++++++--
 src/{ => sphere}/np_sphere.cpp   | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)
 rename src/{ => cluster}/np_cluster.cpp (61%)
 rename src/{ => sphere}/np_sphere.cpp (61%)

diff --git a/src/np_cluster.cpp b/src/cluster/np_cluster.cpp
similarity index 61%
rename from src/np_cluster.cpp
rename to src/cluster/np_cluster.cpp
index e151aed7..7b0e087a 100644
--- a/src/np_cluster.cpp
+++ b/src/cluster/np_cluster.cpp
@@ -9,7 +9,7 @@
 
 using namespace std;
 
-extern void cluster();
+extern void cluster(string config_file, string data_file, string output_path);
 
 /*! \brief Main program entry point.
  *
@@ -20,6 +20,14 @@ extern void cluster();
  * the configuration and runs the main program.
  */
 int main(int argc, char **argv) {
-	cluster();
+  	string config_file = "../../test_data/cluster/DEDFB";
+	string data_file = "../../test_data/cluster/DCLU";
+	string output_path = ".";
+	if (argc == 4) {
+		config_file = string(argv[1]);
+		data_file = string(argv[2]);
+		output_path = string(argv[3]);
+	}
+	cluster(config_file, data_file, output_path);
 	return 0;
 }
diff --git a/src/np_sphere.cpp b/src/sphere/np_sphere.cpp
similarity index 61%
rename from src/np_sphere.cpp
rename to src/sphere/np_sphere.cpp
index 2e7d05f2..4522e028 100644
--- a/src/np_sphere.cpp
+++ b/src/sphere/np_sphere.cpp
@@ -9,7 +9,7 @@
 
 using namespace std;
 
-extern void sphere();
+extern void sphere(string config_file, string data_file, string output_path);
 
 /*! \brief Main program entry point.
  *
@@ -20,6 +20,14 @@ extern void sphere();
  * the configuration and runs the main program.
  */
 int main(int argc, char **argv) {
-	sphere();
+	string config_file = "../../test_data/sphere/DEDFB";
+	string data_file = "../../test_data/sphere/DCLU";
+	string output_path = ".";
+	if (argc == 4) {
+		config_file = string(argv[1]);
+		data_file = string(argv[2]);
+		output_path = string(argv[3]);
+	}
+	sphere(config_file, data_file, output_path);
 	return 0;
 }
-- 
GitLab