1 void Shuttle(const char* param = "listen") {
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!!!
7 gSystem->Load("libRLDAP.so");
8 gSystem->Load("libSHUTTLE");
9 gSystem->Load("$ROOTSYS/lib/libThread");
10 gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
12 // AliLog::SetGlobalDebugLevel(1);
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");
20 AliShuttle::SetProcessDCS(kTRUE);
23 // AliCDBManager *man = AliCDBManager::Instance();
24 // man->SetDefaultStorage("local://MainCDB");
25 // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
28 AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
29 config.SetProcessAll(kTRUE);
32 AliShuttleTrigger trigger(&config);
34 AliShuttle* shuttle = trigger.GetShuttle();
36 // Add here detectors preprocessor ...
37 TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle);
38 TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle);
39 TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle);
41 TString paramStr(param);
43 if (paramStr.IsDigit()) {
44 Int_t run = paramStr.Atoi();
46 } else if (paramStr == "new") {
48 } else if (paramStr == "all") {
50 } else if (paramStr == "listen") {
52 } else if (paramStr.BeginsWith("lastrun=")) {
53 Int_t run = TString(paramStr(8, paramStr.Length()-7).Data()).Atoi();
55 trigger.SetNewLastRun(run);
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;
63 cout<<"lastrun=<run> - sets last run manually. use with caution!" << endl;
64 cout<<"<empty parameter> - the same as 'listen'"<<endl;
67 AliCDBManager::Destroy();