From 3d6fbb0a48cf2bd6fb0fe3d9d7c6be6a2df2c84c Mon Sep 17 00:00:00 2001
From: Wouter Deconinck <wouter.deconinck@umanitoba.ca>
Date: Wed, 13 Oct 2021 16:03:20 +0000
Subject: [PATCH] Analysis script

---
 .../analysis/synchrotron_tests.cxx            | 30 +++++++++++++++++++
 benchmarks/synchrotron/synchrotron.sh         |  2 +-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 benchmarks/synchrotron/analysis/synchrotron_tests.cxx

diff --git a/benchmarks/synchrotron/analysis/synchrotron_tests.cxx b/benchmarks/synchrotron/analysis/synchrotron_tests.cxx
new file mode 100644
index 00000000..71c37671
--- /dev/null
+++ b/benchmarks/synchrotron/analysis/synchrotron_tests.cxx
@@ -0,0 +1,30 @@
+#include <cmath>
+#include <iostream>
+#include <string>
+#include <vector>
+
+#include "ROOT/RDataFrame.hxx"
+#include "Math/Vector4D.h"
+#include "TCanvas.h"
+
+#include <nlohmann/json.hpp>
+using json = nlohmann::json;
+
+R__LOAD_LIBRARY(libfmt.so)
+#include "fmt/core.h"
+#include "fmt/color.h"
+
+R__LOAD_LIBRARY(libeicd.so)
+R__LOAD_LIBRARY(libDD4pod.so)
+
+#include "eicd/ReconstructedParticleCollection.h"
+
+void synchrotron_tests(const char* fname = "rec.root"){
+
+  fmt::print(fmt::emphasis::bold | fg(fmt::color::forest_green), "Running synchrotron analysis...\n");
+
+  // Run this in multi-threaded mode if desired
+  ROOT::EnableImplicitMT();
+  ROOT::RDataFrame df("events", fname);
+
+}
diff --git a/benchmarks/synchrotron/synchrotron.sh b/benchmarks/synchrotron/synchrotron.sh
index ced5895c..b528ccc1 100644
--- a/benchmarks/synchrotron/synchrotron.sh
+++ b/benchmarks/synchrotron/synchrotron.sh
@@ -146,7 +146,7 @@ if [[ -n "${DO_ANA}" || -n "${DO_ALL}" ]] ; then
   mkdir -p results/synchrotron
 
   # here you can add as many scripts as you want.
-  root -b -q "benchmarks/synchrotron/analysis/synchrotron.cxx+(\"${JUGGLER_REC_FILE}\")"
+  root -b -q "benchmarks/synchrotron/analysis/synchrotron_tests.cxx+(\"${JUGGLER_REC_FILE/.root/.raw.root}\")"
   if [[ "$?" -ne "0" ]] ; then
     echo "ERROR running root script"
     exit 1
-- 
GitLab