]> jspc29.x-matter.uni-frankfurt.de Git - radhard.git/commitdiff
Run analyzer: If NULL found in database for storepath, assume garlic and chip generat...
authorBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Thu, 25 Jun 2015 16:40:12 +0000 (18:40 +0200)
committerBenjamin Linnik <blinnik@jspc28.x-matter.uni-frankfurt.de>
Thu, 25 Jun 2015 16:40:12 +0000 (18:40 +0200)
MABS_run_analyzer/Run.c

index bd0b17cbff8b5e5ef7d04f26d9965f0bed0d0847..103c449669f9b385b6aeead9f53f4a5cd7ebbb9c 100644 (file)
@@ -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;