From 81f8984bd56db6841d969b11d26db9d4cdccba36 Mon Sep 17 00:00:00 2001 From: Benjamin Linnik Date: Thu, 25 Jun 2015 18:40:12 +0200 Subject: [PATCH] Run analyzer: If NULL found in database for storepath, assume garlic and chip generation name as subfolder to search for run data --- MABS_run_analyzer/Run.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MABS_run_analyzer/Run.c b/MABS_run_analyzer/Run.c index bd0b17c..103c449 100644 --- a/MABS_run_analyzer/Run.c +++ b/MABS_run_analyzer/Run.c @@ -53,11 +53,11 @@ Run::Run(Int_t runnumber, Int_t loopi) labbook.source = (rowsql->GetField(5) != NULL)?std::string(rowsql->GetField(5)):""; labbook.matrix = (rowsql->GetField(6) != NULL)?std::string(rowsql->GetField(6)):""; labbook.clock = (rowsql->GetField(7) != NULL)?atoi(rowsql->GetField(7)):100; + labbook.chipGen = (rowsql->GetField(9) != NULL)?std::string(rowsql->GetField(9)):""; labbook.storepath = (rowsql->GetField(8) != NULL)?std::string(rowsql->GetField(8)):""; // replace windows drive notation with linux style if (labbook.storepath.Length() > 0) { - storepathRAWLinux = labbook.storepath; // storepathRAWLinux = storepathRAWLinux.ReplaceAll("H:","/jspc53_H"); // storepathRAWLinux = storepathRAWLinux.ReplaceAll("h:","/jspc53_H"); @@ -84,9 +84,10 @@ Run::Run(Int_t runnumber, Int_t loopi) // storepathRAWLinux = storepathRAWLinux.ReplaceAll("S:","/home/blinnik/garlic/local"); // storepathRAWLinux = storepathRAWLinux.ReplaceAll("s:","/home/blinnik/garlic/local"); storepathRAWLinux = storepathRAWLinux.ReplaceAll("\\","/"); - } else storepathRAWLinux=Form("/d/garlic/pegasus/%d",runnumber); // default empty path, for pegasus + } else { + storepathRAWLinux=Form("/d/garlic/%s/%d",labbook.chipGen.Data(),runnumber); // default empty path + } savepathresults = storepathOutLinux; - labbook.chipGen = (rowsql->GetField(9) != NULL)?std::string(rowsql->GetField(9)):""; labbook.posVetoDB = (rowsql->GetField(10) != NULL)?atoi(rowsql->GetField(10)):-1; labbook.posSeedDB = (rowsql->GetField(11) != NULL)?atoi(rowsql->GetField(11)):-1; labbook.posSumDB = (rowsql->GetField(12) != NULL)?atoi(rowsql->GetField(12)):-1; -- 2.43.0