]>
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 |
15 | AliShuttle::SetMainCDB("alien://DBFolder=ShuttleCDB"); | |
16 | AliShuttle::SetLocalCDB("local://LocalShuttleCDB"); | |
17 | AliShuttle::SetMainRefStorage("alien://DBFolder=GridReferenceStorage"); | |
18 | AliShuttle::SetLocalRefStorage("local://LocalReferenceStorage"); | |
19 | ||
20 | AliShuttle::SetProcessDCS(kTRUE); | |
21 | ||
22 | ||
23 | // AliCDBManager *man = AliCDBManager::Instance(); | |
24 | // man->SetDefaultStorage("local://MainCDB"); | |
57f50b3c | 25 | // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB"); |
d477ad88 | 26 | |
4f0ab988 | 27 | |
28 | AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch"); | |
4b4eb769 | 29 | config.SetProcessAll(kTRUE); |
30 | config.Print(); | |
d477ad88 | 31 | |
4b4eb769 | 32 | AliShuttleTrigger trigger(&config); |
d477ad88 | 33 | |
34 | AliShuttle* shuttle = trigger.GetShuttle(); | |
4b4eb769 | 35 | |
d477ad88 | 36 | // Add here detectors preprocessor ... |
4f0ab988 | 37 | TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle); |
38 | TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle); | |
57f50b3c | 39 | TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle); |
d477ad88 | 40 | |
41 | TString paramStr(param); | |
42 | ||
43 | if (paramStr.IsDigit()) { | |
44 | Int_t run = paramStr.Atoi(); | |
45 | trigger.Collect(run); | |
46 | } else if (paramStr == "new") { | |
47 | trigger.CollectNew(); | |
48 | } else if (paramStr == "all") { | |
49 | trigger.CollectAll(); | |
50 | } else if (paramStr == "listen") { | |
51 | trigger.Run(); | |
7bfb2090 | 52 | } else if (paramStr.BeginsWith("lastrun=")) { |
53 | Int_t run = TString(paramStr(8, paramStr.Length()-7).Data()).Atoi(); | |
54 | cout << run << endl; | |
55 | trigger.SetNewLastRun(run); | |
d477ad88 | 56 | } else { |
57 | cout<<"Bad parameter: "<<param<<endl; | |
58 | cout<<"Parameter options: "<<endl; | |
59 | cout<<"<run> - collect data for the given run"<<endl; | |
60 | cout<<"new - collect data only for the new runs"<<endl; | |
61 | cout<<"all - collect data for all runs"<<endl; | |
62 | cout<<"listen - start listening for DAQ notification"<<endl; | |
4f0ab988 | 63 | cout<<"lastrun=<run> - sets last run manually. use with caution!" << endl; |
d477ad88 | 64 | cout<<"<empty parameter> - the same as 'listen'"<<endl; |
65 | } | |
66 | ||
67 | AliCDBManager::Destroy(); | |
68 | } | |
69 | ||
70 |