X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MONITOR%2Fmonitor.C;h=e41cd9c8944589d77707a5cd4718d05740022952;hb=db0010567289c6aad50154b52f1dac94ee9998de;hp=a53c4fa582dff4f25b82f35fc51deae1591e0e34;hpb=807ee5a30b8d5c686afc456ce11d3ac5de2566a1;p=u%2Fmrichter%2FAliRoot.git diff --git a/MONITOR/monitor.C b/MONITOR/monitor.C index a53c4fa582d..e41cd9c8944 100644 --- a/MONITOR/monitor.C +++ b/MONITOR/monitor.C @@ -2,40 +2,41 @@ #include #include #include +#include "AliRun.h" #include "MONITOR/AliMonitorProcess.h" #include "MONITOR/AliMonitorControl.h" #endif -void monitor(const char* alienHost = "alien://", const char* alienDir = ".") +void monitor(Bool_t batchMode = kFALSE, + const char* selection = "ALL", + 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 (!gROOT->GetClass("AliLevel3")) { - gSystem->Load("libAliL3Src.so"); - gSystem->Load("libAliL3Misc.so"); - gSystem->Load("libAliL3Hough.so"); - gSystem->Load("libAliL3Comp.so"); - } + if (!gROOT->GetClass("AliLevel3")) { + gSystem->Load("libAliHLTSrc.so"); + gSystem->Load("libAliHLTMisc.so"); + gSystem->Load("libAliHLTHough.so"); + gSystem->Load("libAliHLTComp.so"); } if (!gROOT->GetClass("AliMonitorProcess")) { gSystem->Load("libMONITOR.so"); } - // make sure galice.root and compression tables are there + // make sure galice.root is there if (!gSystem->Which(".", "galice.root")) { -// gInterpreter->ExecuteMacro("$ALICE_ROOT/MONITOR/galice.C"); - ::Error("monitor.C", "no galice.root file found.\n" - "please copy a galice.root file with the correct TPC and ITS" - "parameters\n and the correct magnetic field to the current" - "directory"); - return; - } - if (!gSystem->Which(".", "Table0.dat")) { - gSystem->Exec("cp $ALICE_ROOT/RAW/Table*.dat ."); + gAlice->Init("$ALICE_ROOT/MONITOR/galice.C"); + gAlice->GetRunLoader()->Write(); + delete gAlice->GetRunLoader(); } // start the monitoring - AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir); - // process->Run(); - new AliMonitorControl(process); + AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir, + selection); + if (batchMode) { + process->Run(); + delete process; + } else { + new AliMonitorControl(process); + } }