]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MONITOR/monitor.C
Typo corrected.
[u/mrichter/AliRoot.git] / MONITOR / monitor.C
CommitLineData
04fa961a 1#if !defined(__CINT__) || defined(__MAKECINT__)
807ee5a3 2#include <TSystem.h>
3#include <TError.h>
4#include <TInterpreter.h>
0cf7de2b 5#include "AliRun.h"
04fa961a 6#include "MONITOR/AliMonitorProcess.h"
7#include "MONITOR/AliMonitorControl.h"
8#endif
9
d20e3d82 10void monitor(Bool_t batchMode = kFALSE,
0cf7de2b 11 const char* selection = "ALL",
d20e3d82 12 const char* alienHost = "alien://aliens7.cern.ch:15000/?direct",
b25129f1 13 const char* alienDir = "/alice_mdc/DC")
04fa961a 14{
97d6eb66 15 // load libraries
0cf7de2b 16 if (!gROOT->GetClass("AliLevel3")) {
4aa41877 17 gSystem->Load("libAliHLTSrc.so");
18 gSystem->Load("libAliHLTMisc.so");
19 gSystem->Load("libAliHLTHough.so");
20 gSystem->Load("libAliHLTComp.so");
97d6eb66 21 }
22 if (!gROOT->GetClass("AliMonitorProcess")) {
23 gSystem->Load("libMONITOR.so");
24 }
25
0cf7de2b 26 // make sure galice.root is there
04fa961a 27 if (!gSystem->Which(".", "galice.root")) {
a3697eb5 28 gAlice->Init("$ALICE_ROOT/MONITOR/galice.C");
29 gAlice->GetRunLoader()->Write();
30 delete gAlice->GetRunLoader();
04fa961a 31 }
97d6eb66 32
33 // start the monitoring
0cf7de2b 34 AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir,
35 selection);
d20e3d82 36 if (batchMode) {
37 process->Run();
38 delete process;
39 } else {
40 new AliMonitorControl(process);
41 }
04fa961a 42}