Record changes.
[u/mrichter/AliRoot.git] / SHUTTLE / Shuttle.C
CommitLineData
cb343cfd 1Bool_t Shuttle(const char* param = "listen") {
d477ad88 2
4f0ab988 3 // WARNING: if ldap is built with ssl support it may cause confilcts with the
4 // AliEn interface. If this happens, grid storage activation must be done BEFORE
5 // loading LDAP libraries!!!
6
7 gSystem->Load("libRLDAP.so");
e7f62f16 8 gSystem->Load("libMonaLisa");
d477ad88 9 gSystem->Load("libSHUTTLE");
d477ad88 10 gSystem->Load("$ROOTSYS/lib/libThread");
57f50b3c 11 gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
e7f62f16 12
13 // libRalien complains otherwise, weird...
14 //gSystem->Load("libNetx");
15
d477ad88 16
17// AliLog::SetGlobalDebugLevel(1);
18
4f0ab988 19 // Setting local CDB and reference storage locations
2bb7b766 20 AliShuttle::SetMainCDB("alien://user=aliprod?folder=colla/GridShuttleCDB");
21 AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage");
22
23// AliShuttle::SetMainCDB("local://testLeakCDB");
24// AliShuttle::SetMainRefStorage("local://testLeakRef");
25
4f0ab988 26 AliShuttle::SetLocalCDB("local://LocalShuttleCDB");
2bb7b766 27 AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage");
4f0ab988 28
2bb7b766 29 AliShuttle::SetProcessDCS(kFALSE);
4f0ab988 30
31
32// AliCDBManager *man = AliCDBManager::Instance();
33// man->SetDefaultStorage("local://MainCDB");
57f50b3c 34// man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
d477ad88 35
4f0ab988 36
37 AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
4b4eb769 38 config.SetProcessAll(kTRUE);
39 config.Print();
d477ad88 40
4b4eb769 41 AliShuttleTrigger trigger(&config);
d477ad88 42
43 AliShuttle* shuttle = trigger.GetShuttle();
4b4eb769 44
d477ad88 45 // Add here detectors preprocessor ...
eba76848 46 TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor(shuttle);
be48e3ea 47 TestITSPreprocessorSPD *spdPrep = new TestITSPreprocessorSPD(shuttle);
f4b3bbb7 48 TestHMPIDPreprocessor *richPrep = new TestHMPIDPreprocessor(shuttle);
be48e3ea 49 TestZDCPreprocessor *zdcPrep = new TestZDCPreprocessor(shuttle);
d477ad88 50
51 TString paramStr(param);
52
be48e3ea 53 if (paramStr.IsDigit() || paramStr == "-1") {
d477ad88 54 Int_t run = paramStr.Atoi();
55 trigger.Collect(run);
56 } else if (paramStr == "new") {
cb343cfd 57 Bool_t result = trigger.Collect();
d477ad88 58 } else if (paramStr == "listen") {
59 trigger.Run();
60 } else {
61 cout<<"Bad parameter: "<<param<<endl;
62 cout<<"Parameter options: "<<endl;
63 cout<<"<run> - collect data for the given run"<<endl;
64 cout<<"new - collect data only for the new runs"<<endl;
d477ad88 65 cout<<"listen - start listening for DAQ notification"<<endl;
66 cout<<"<empty parameter> - the same as 'listen'"<<endl;
67 }
68
69 AliCDBManager::Destroy();
70}
71
72