From 89780693b0850fab62cf063f2177564f81b2f367 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Fri, 3 Dec 2021 17:38:39 +0100
Subject: [PATCH] Use new enumerator correctly

Build glue code for the new enumerator such that it can be properly used in
the macro.
---
 macro/run/run_reco.C                   | 4 ++--
 reco/detectors/sts/CbmRecoStsLinkDef.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/macro/run/run_reco.C b/macro/run/run_reco.C
index 51ec616a29..3f5cd05a71 100644
--- a/macro/run/run_reco.C
+++ b/macro/run/run_reco.C
@@ -279,8 +279,8 @@ void run_reco(TString input = "", Int_t nTimeSlices = -1, Int_t firstTimeSlice =
 
   // -----   Local reconstruction in STS   ----------------------------------
   if (useSts) {
-    CbmRecoSts* stsReco = new CbmRecoSts(kCbmRecoTimeslice);
-    if (eventBased) stsReco->SetMode(kCbmRecoEvent);
+    CbmRecoSts* stsReco = new CbmRecoSts(ECbmRecoMode::kCbmRecoTimeslice);
+    if (eventBased) stsReco->SetMode(ECbmRecoMode::kCbmRecoEvent);
     run->AddTask(stsReco);
     std::cout << "-I- " << myName << ": Added task " << stsReco->GetName() << std::endl;
   }
diff --git a/reco/detectors/sts/CbmRecoStsLinkDef.h b/reco/detectors/sts/CbmRecoStsLinkDef.h
index 7e7281d5ad..2c014febe7 100644
--- a/reco/detectors/sts/CbmRecoStsLinkDef.h
+++ b/reco/detectors/sts/CbmRecoStsLinkDef.h
@@ -25,4 +25,6 @@
 #pragma link C++ class CbmStsUnpackConfig + ;
 #pragma link C++ class CbmStsUnpackMonitor + ;
 
+#pragma link C++ enum ECbmRecoMode;
+
 #endif /* __CINT__ */
-- 
GitLab