From 217c5acbc65d0d4b56becbe0a7cf877f8d884ad1 Mon Sep 17 00:00:00 2001
From: P-A Loizeau <p.-a.loizeau@gsi.de>
Date: Mon, 14 Nov 2022 10:21:23 +0100
Subject: [PATCH] switch unpack macro from BMON to TZD

---
 macro/run/run_unpack_tsa.C | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/macro/run/run_unpack_tsa.C b/macro/run/run_unpack_tsa.C
index dafd149d70..d8c17b608a 100644
--- a/macro/run/run_unpack_tsa.C
+++ b/macro/run/run_unpack_tsa.C
@@ -113,26 +113,26 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid
   // -----   UnpackerConfigs   ----------------------------------------------
 
   // ---- BMON ----
-  std::shared_ptr<CbmBmonUnpackConfig> bmonconfig = nullptr;
+  std::shared_ptr<CbmTzdUnpackConfig> tzdconfig = nullptr;
 
   if (!bBmoninTof) {
-    bmonconfig = std::make_shared<CbmBmonUnpackConfig>("", runid);
-    if (bmonconfig) {
-      // bmonconfig->SetDebugState();
-      bmonconfig->SetDoWriteOutput();
-      // bmonconfig->SetDoWriteOptOutA("CbmBmonErrors");
-      std::string parfilesbasepathBmon = Form("%s/macro/beamtime/mcbm2022/", srcDir.Data());
-      bmonconfig->SetParFilesBasePath(parfilesbasepathBmon);
-      bmonconfig->SetParFileName("mBmonCriPar.par");
-      bmonconfig->SetSystemTimeOffset(-1220);  // [ns] value to be updated
+    tzdconfig = std::make_shared<CbmTzdUnpackConfig>("", runid);
+    if (tzdconfig) {
+      // tzdconfig->SetDebugState();
+      tzdconfig->SetDoWriteOutput();
+      // tzdconfig->SetDoWriteOptOutA("CbmTzdErrors");
+      std::string parfilesbasepathTzd = Form("%s/macro/beamtime/mcbm2022/", srcDir.Data());
+      tzdconfig->SetParFilesBasePath(parfilesbasepathTzd);
+      tzdconfig->SetParFileName("mBmonCriPar.par");
+      tzdconfig->SetSystemTimeOffset(-1220);  // [ns] value to be updated
       if (2160 <= runid) {
-        bmonconfig->SetSystemTimeOffset(-80);  // [ns] value to be updated
+        tzdconfig->SetSystemTimeOffset(-80);  // [ns] value to be updated
       }
       if (2350 <= runid) {
-        bmonconfig->SetSystemTimeOffset(0);  // [ns] value to be updated
+        tzdconfig->SetSystemTimeOffset(0);  // [ns] value to be updated
       }
       /// Enable Monitor plots
-      // bmonconfig->SetMonitor(GetTofMonitor(outfilename, true));
+      // tzdconfig->SetMonitor(GetTofMonitor(outfilename, true));
     }
   }
   // -------------
@@ -475,7 +475,7 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid
   // Enable full time sorting instead sorting per FLIM link
   unpack->SetTimeSorting(true);
 
-  if (bmonconfig) unpack->SetUnpackConfig(bmonconfig);
+  if (tzdconfig) unpack->SetUnpackConfig(tzdconfig);
   if (stsconfig) unpack->SetUnpackConfig(stsconfig);
   if (muchconfig) unpack->SetUnpackConfig(muchconfig);
   if (trd1Dconfig) unpack->SetUnpackConfig(trd1Dconfig);
@@ -531,7 +531,7 @@ void run_unpack_tsa(std::vector<std::string> infile = {"test.tsa"}, UInt_t runid
   delete run;
   delete source;
 
-  bmonconfig.reset();
+  tzdconfig.reset();
   stsconfig.reset();
   muchconfig.reset();
   trd1Dconfig.reset();
-- 
GitLab