forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmonitor.C
42 lines (39 loc) · 1.13 KB
/
monitor.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TSystem.h>
#include <TError.h>
#include <TInterpreter.h>
#include "AliRun.h"
#include "MONITOR/AliMonitorProcess.h"
#include "MONITOR/AliMonitorControl.h"
#endif
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 (!gROOT->GetClass("AliLevel3")) {
gSystem->Load("libAliHLTSrc");
gSystem->Load("libAliHLTMisc");
gSystem->Load("libAliHLTHough");
gSystem->Load("libAliHLTComp");
}
if (!gROOT->GetClass("AliMonitorProcess")) {
gSystem->Load("libMONITOR");
}
// make sure galice.root is there
if (!gSystem->Which(".", "galice.root")) {
gAlice->InitMC("$ALICE_ROOT/MONITOR/galice.C");
AliRunLoader::Instance()->Write();
delete AliRunLoader::Instance();
}
// start the monitoring
AliMonitorProcess *process = new AliMonitorProcess(alienHost, alienDir,
selection);
if (batchMode) {
process->Run();
delete process;
} else {
new AliMonitorControl(process);
}
}