]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
batch mode for monitor process
authortkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Jan 2004 17:19:39 +0000 (17:19 +0000)
committertkuhr <tkuhr@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Jan 2004 17:19:39 +0000 (17:19 +0000)
MONITOR/monitor.C

index e4c4f7c8f6a0bba494c440f22787782469dcdeb8..4d9e02615950e3196c40e7463422019594a5acdd 100644 (file)
@@ -6,11 +6,13 @@
 #include "MONITOR/AliMonitorControl.h"
 #endif
 
-void monitor(const char* alienHost = "alien://aliens7.cern.ch:15000/?direct",
+void monitor(Bool_t batchMode = kFALSE,
+            const char* alienHost = "alien://aliens7.cern.ch:15000/?direct",
             const char* alienDir = "/alice_mdc/DC")
 {
   // load libraries
-  if (strcmp(gSystem->Getenv("ALIHLT_USEPACKAGE"), "ALIROOT") == 0) {
+  if (gSystem->Getenv("ALIHLT_USEPACKAGE") &&
+      (strcmp(gSystem->Getenv("ALIHLT_USEPACKAGE"), "ALIROOT") == 0)) {
     if (!gROOT->GetClass("AliLevel3")) {
       gSystem->Load("libAliL3Src.so");
       gSystem->Load("libAliL3Misc.so");
@@ -34,6 +36,10 @@ void monitor(const char* alienHost = "alien://aliens7.cern.ch:15000/?direct",
 
   // start the monitoring
   AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir);
-  //  process->Run();
-  new AliMonitorControl(process);
+  if (batchMode) {
+    process->Run();
+    delete process;
+  } else {
+    new AliMonitorControl(process);
+  }
 }