]>
Commit | Line | Data |
---|---|---|
1 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
2 | #include <TSystem.h> | |
3 | #include <TError.h> | |
4 | #include <TInterpreter.h> | |
5 | #include "MONITOR/AliMonitorProcess.h" | |
6 | #include "MONITOR/AliMonitorControl.h" | |
7 | #endif | |
8 | ||
9 | void monitor(Bool_t batchMode = kFALSE, | |
10 | const char* alienHost = "alien://aliens7.cern.ch:15000/?direct", | |
11 | const char* alienDir = "/alice_mdc/DC") | |
12 | { | |
13 | // load libraries | |
14 | if (gSystem->Getenv("ALIHLT_USEPACKAGE") && | |
15 | (strcmp(gSystem->Getenv("ALIHLT_USEPACKAGE"), "ALIROOT") == 0)) { | |
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 | |
28 | if (!gSystem->Which(".", "galice.root")) { | |
29 | gAlice->Init("$ALICE_ROOT/MONITOR/galice.C"); | |
30 | gAlice->GetRunLoader()->Write(); | |
31 | delete gAlice->GetRunLoader(); | |
32 | } | |
33 | if (!gSystem->Which(".", "Table0.dat")) { | |
34 | gSystem->Exec("cp $ALICE_ROOT/RAW/Table*.dat ."); | |
35 | } | |
36 | ||
37 | // start the monitoring | |
38 | AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir); | |
39 | if (batchMode) { | |
40 | process->Run(); | |
41 | delete process; | |
42 | } else { | |
43 | new AliMonitorControl(process); | |
44 | } | |
45 | } |