]>
Commit | Line | Data |
---|---|---|
04fa961a | 1 | #if !defined(__CINT__) || defined(__MAKECINT__) |
807ee5a3 | 2 | #include <TSystem.h> |
3 | #include <TError.h> | |
4 | #include <TInterpreter.h> | |
04fa961a | 5 | #include "MONITOR/AliMonitorProcess.h" |
6 | #include "MONITOR/AliMonitorControl.h" | |
7 | #endif | |
8 | ||
d20e3d82 | 9 | void monitor(Bool_t batchMode = kFALSE, |
10 | const char* alienHost = "alien://aliens7.cern.ch:15000/?direct", | |
b25129f1 | 11 | const char* alienDir = "/alice_mdc/DC") |
04fa961a | 12 | { |
97d6eb66 | 13 | // load libraries |
d20e3d82 | 14 | if (gSystem->Getenv("ALIHLT_USEPACKAGE") && |
15 | (strcmp(gSystem->Getenv("ALIHLT_USEPACKAGE"), "ALIROOT") == 0)) { | |
97d6eb66 | 16 | if (!gROOT->GetClass("AliLevel3")) { |
17 | gSystem->Load("libAliL3Src.so"); | |
18 | gSystem->Load("libAliL3Misc.so"); | |
19 | gSystem->Load("libAliL3Hough.so"); | |
20 | gSystem->Load("libAliL3Comp.so"); | |
21 | } | |
22 | } | |
23 | if (!gROOT->GetClass("AliMonitorProcess")) { | |
24 | gSystem->Load("libMONITOR.so"); | |
25 | } | |
26 | ||
27 | // make sure galice.root and compression tables are there | |
04fa961a | 28 | if (!gSystem->Which(".", "galice.root")) { |
a3697eb5 | 29 | gAlice->Init("$ALICE_ROOT/MONITOR/galice.C"); |
30 | gAlice->GetRunLoader()->Write(); | |
31 | delete gAlice->GetRunLoader(); | |
04fa961a | 32 | } |
33 | if (!gSystem->Which(".", "Table0.dat")) { | |
34 | gSystem->Exec("cp $ALICE_ROOT/RAW/Table*.dat ."); | |
35 | } | |
97d6eb66 | 36 | |
37 | // start the monitoring | |
807ee5a3 | 38 | AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir); |
d20e3d82 | 39 | if (batchMode) { |
40 | process->Run(); | |
41 | delete process; | |
42 | } else { | |
43 | new AliMonitorControl(process); | |
44 | } | |
04fa961a | 45 | } |