]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/alionlinemonitor.cxx
Addition to the revision 45154. The calibrated TDC threshold used also in the raw...
[u/mrichter/AliRoot.git] / MONITOR / alionlinemonitor.cxx
index 245cbcdc732ee0d00451e2ebc2ca5fa86bf15c6e..eab7195a107dd6b728498225edd93f6a0edf4457 100644 (file)
@@ -20,21 +20,28 @@ int main(int argc, char **argv)
   AliOnlineReco *win = new AliOnlineReco;
   win->MapWindow();
 
+  TString autoRun(gSystem->Getenv("ONLINERECO_AUTORUN"));
+  if (autoRun == "1" || autoRun.CompareTo("true", TString::kIgnoreCase) == 0)
+  {
+    win->SetAutoRunMode(kTRUE);
+  }
+
   if (test)
   {
     win->SetTestMode();
 
-    win->GetSOR()->infoHandlerTest(2214);
-    win->GetSOR()->infoHandlerTest(2215);
-    win->GetSOR()->infoHandlerTest(2224);
-    win->GetSOR()->infoHandlerTest(2244);
+    win->GetSOR(0)->infoHandlerTest(2214);
+    win->GetSOR(0)->infoHandlerTest(2215);
+    win->GetSOR(0)->infoHandlerTest(2224);
+    win->GetSOR(0)->infoHandlerTest(2244);
 
     printf("win = (AliOnlineReco*) 0x%lx\n", (unsigned long)win);
   }
-  else {
-
+  else
+  {
     TString baseDir = gSystem->Getenv("ONLINERECO_BASE_DIR");
-    if (baseDir.IsNull()) {
+    if (baseDir.IsNull())
+    {
       printf("ERROR: ONLINERECO_BASE_DIR is not set. Exiting...");
       return 0;
     }
@@ -53,19 +60,21 @@ int main(int argc, char **argv)
     TString sqlQuery;
     TTimeStamp ts;
     sqlQuery.Form("SELECT run FROM logbook WHERE DAQ_time_start > %u AND DAQ_time_end IS NULL AND partition REGEXP 'PHYSICS.*'",
-                 ts.GetSec()-86400);
-    //    sqlQuery.Form("SELECT run FROM logbook WHERE DAQ_time_start > %u AND DAQ_time_end IS NULL",
-    //           ts.GetSec()-86400);
+                 (UInt_t)ts.GetSec()-86400);
     TSQLResult* result = server->Query(sqlQuery);
-    if (!result) {
+    if (!result)
+    {
       printf("ERROR: Can't execute query <%s>!", sqlQuery.Data());
       return 0;
     }
-    if (result->GetRowCount() == 0) {
+    if (result->GetRowCount() == 0)
+    {
       printf("No active physics runs found");
     }
-    else {
-      for (Int_t iRow = 0; iRow < result->GetRowCount(); iRow++) {
+    else
+    {
+      for (Int_t iRow = 0; iRow < result->GetRowCount(); iRow++)
+      {
        TSQLRow* row = result->Next();
        TString runStr = row->GetField(0);
        if (runStr.IsDigit())