1 void Shuttle(const char* param = "listen") {
3 gSystem->Load("libSHUTTLE");
4 gSystem->Load("$ROOTSYS/lib/libThread");
5 gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
7 // AliLog::SetGlobalDebugLevel(1);
9 AliCDBManager *man = AliCDBManager::Instance();
10 man->SetDefaultStorage("local://MainCDB");
11 // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
13 AliShuttleConfig config("pcalice290.cern.ch", 389,
14 "o=alice,dc=cern,dc=ch");
15 config.SetProcessAll(kTRUE);
18 AliShuttleTrigger trigger(&config);
20 AliShuttle* shuttle = trigger.GetShuttle();
22 // Add here detectors preprocessor ...
23 //TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle);
24 //TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle);
25 TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle);
27 TString paramStr(param);
29 if (paramStr.IsDigit()) {
30 Int_t run = paramStr.Atoi();
32 } else if (paramStr == "new") {
34 } else if (paramStr == "all") {
36 } else if (paramStr == "listen") {
38 } else if (paramStr.BeginsWith("lastrun=")) {
39 Int_t run = TString(paramStr(8, paramStr.Length()-7).Data()).Atoi();
41 trigger.SetNewLastRun(run);
43 cout<<"Bad parameter: "<<param<<endl;
44 cout<<"Parameter options: "<<endl;
45 cout<<"<run> - collect data for the given run"<<endl;
46 cout<<"new - collect data only for the new runs"<<endl;
47 cout<<"all - collect data for all runs"<<endl;
48 cout<<"listen - start listening for DAQ notification"<<endl;
49 cout<<"lastrun=<run> - sets last run manually. use with caution!" << endl
50 cout<<"<empty parameter> - the same as 'listen'"<<endl;
53 AliCDBManager::Destroy();