]>
Commit | Line | Data |
---|---|---|
d477ad88 | 1 | void Shuttle(const char* param = "listen") { |
2 | ||
3 | gSystem->Load("libSHUTTLE"); | |
4 | gSystem->Load("$ROOTSYS/lib/libRLDAP"); | |
5 | gSystem->Load("$ROOTSYS/lib/libThread"); | |
4b4eb769 | 6 | gSystem->Load("test/libTest.so"); |
d477ad88 | 7 | |
8 | // AliLog::SetGlobalDebugLevel(1); | |
9 | ||
4b4eb769 | 10 | AliCDBManager *man = AliCDBManager::Instance(); |
11 | man->SetDefaultStorage("local://MainCDB"); | |
d477ad88 | 12 | |
4b4eb769 | 13 | AliShuttleConfig config("pcalice290.cern.ch", 389, |
14 | "o=alice,dc=cern,dc=ch"); | |
15 | config.SetProcessAll(kTRUE); | |
16 | config.Print(); | |
d477ad88 | 17 | |
4b4eb769 | 18 | AliShuttleTrigger trigger(&config); |
d477ad88 | 19 | |
20 | AliShuttle* shuttle = trigger.GetShuttle(); | |
4b4eb769 | 21 | |
d477ad88 | 22 | // Add here detectors preprocessor ... |
4b4eb769 | 23 | TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle); |
24 | TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle); | |
d477ad88 | 25 | |
26 | TString paramStr(param); | |
27 | ||
28 | if (paramStr.IsDigit()) { | |
29 | Int_t run = paramStr.Atoi(); | |
30 | trigger.Collect(run); | |
31 | } else if (paramStr == "new") { | |
32 | trigger.CollectNew(); | |
33 | } else if (paramStr == "all") { | |
34 | trigger.CollectAll(); | |
35 | } else if (paramStr == "listen") { | |
36 | trigger.Run(); | |
37 | } else { | |
38 | cout<<"Bad parameter: "<<param<<endl; | |
39 | cout<<"Parameter options: "<<endl; | |
40 | cout<<"<run> - collect data for the given run"<<endl; | |
41 | cout<<"new - collect data only for the new runs"<<endl; | |
42 | cout<<"all - collect data for all runs"<<endl; | |
43 | cout<<"listen - start listening for DAQ notification"<<endl; | |
44 | cout<<"<empty parameter> - the same as 'listen'"<<endl; | |
45 | } | |
46 | ||
47 | AliCDBManager::Destroy(); | |
48 | } | |
49 | ||
50 |