]>
Commit | Line | Data |
---|---|---|
d477ad88 | 1 | void Shuttle(const char* param = "listen") { |
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"); | |
d477ad88 | 8 | gSystem->Load("libSHUTTLE"); |
d477ad88 | 9 | gSystem->Load("$ROOTSYS/lib/libThread"); |
57f50b3c | 10 | gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so"); |
d477ad88 | 11 | |
12 | // AliLog::SetGlobalDebugLevel(1); | |
13 | ||
4f0ab988 | 14 | // Setting local CDB and reference storage locations |
2bb7b766 | 15 | AliShuttle::SetMainCDB("alien://user=aliprod?folder=colla/GridShuttleCDB"); |
16 | AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage"); | |
17 | ||
18 | // AliShuttle::SetMainCDB("local://testLeakCDB"); | |
19 | // AliShuttle::SetMainRefStorage("local://testLeakRef"); | |
20 | ||
4f0ab988 | 21 | AliShuttle::SetLocalCDB("local://LocalShuttleCDB"); |
2bb7b766 | 22 | AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage"); |
4f0ab988 | 23 | |
2bb7b766 | 24 | AliShuttle::SetProcessDCS(kFALSE); |
4f0ab988 | 25 | |
26 | ||
27 | // AliCDBManager *man = AliCDBManager::Instance(); | |
28 | // man->SetDefaultStorage("local://MainCDB"); | |
57f50b3c | 29 | // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB"); |
d477ad88 | 30 | |
4f0ab988 | 31 | |
32 | AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch"); | |
4b4eb769 | 33 | config.SetProcessAll(kTRUE); |
34 | config.Print(); | |
d477ad88 | 35 | |
4b4eb769 | 36 | AliShuttleTrigger trigger(&config); |
d477ad88 | 37 | |
38 | AliShuttle* shuttle = trigger.GetShuttle(); | |
4b4eb769 | 39 | |
d477ad88 | 40 | // Add here detectors preprocessor ... |
4f0ab988 | 41 | TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle); |
42 | TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle); | |
57f50b3c | 43 | TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle); |
d477ad88 | 44 | |
45 | TString paramStr(param); | |
46 | ||
47 | if (paramStr.IsDigit()) { | |
48 | Int_t run = paramStr.Atoi(); | |
49 | trigger.Collect(run); | |
50 | } else if (paramStr == "new") { | |
51 | trigger.CollectNew(); | |
52 | } else if (paramStr == "all") { | |
53 | trigger.CollectAll(); | |
54 | } else if (paramStr == "listen") { | |
55 | trigger.Run(); | |
7bfb2090 | 56 | } else if (paramStr.BeginsWith("lastrun=")) { |
57 | Int_t run = TString(paramStr(8, paramStr.Length()-7).Data()).Atoi(); | |
58 | cout << run << endl; | |
59 | trigger.SetNewLastRun(run); | |
d477ad88 | 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; | |
65 | cout<<"all - collect data for all runs"<<endl; | |
66 | cout<<"listen - start listening for DAQ notification"<<endl; | |
4f0ab988 | 67 | cout<<"lastrun=<run> - sets last run manually. use with caution!" << endl; |
d477ad88 | 68 | cout<<"<empty parameter> - the same as 'listen'"<<endl; |
69 | } | |
70 | ||
71 | AliCDBManager::Destroy(); | |
72 | } | |
73 | ||
74 |