1 Bool_t 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("libMonaLisa");
9 gSystem->Load("libSHUTTLE");
10 gSystem->Load("$ROOTSYS/lib/libThread");
11 gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
13 // libRalien complains otherwise, weird...
14 //gSystem->Load("libNetx");
17 // AliLog::SetGlobalDebugLevel(1);
19 // Setting local CDB and reference storage locations
20 AliShuttle::SetMainCDB("alien://user=aliprod?folder=colla/GridShuttleCDB");
21 AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage");
23 // AliShuttle::SetMainCDB("local://testLeakCDB");
24 // AliShuttle::SetMainRefStorage("local://testLeakRef");
26 AliShuttle::SetLocalCDB("local://LocalShuttleCDB");
27 AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage");
29 AliShuttle::SetProcessDCS(kFALSE);
32 // AliCDBManager *man = AliCDBManager::Instance();
33 // man->SetDefaultStorage("local://MainCDB");
34 // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
37 AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
38 config.SetProcessAll(kTRUE);
41 AliShuttleTrigger trigger(&config);
43 AliShuttle* shuttle = trigger.GetShuttle();
45 // Add here detectors preprocessor ...
46 TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor(shuttle);
47 TestITSPreprocessorSPD *spdPrep = new TestITSPreprocessorSPD(shuttle);
48 TestHMPIDPreprocessor *richPrep = new TestHMPIDPreprocessor(shuttle);
49 TestZDCPreprocessor *zdcPrep = new TestZDCPreprocessor(shuttle);
51 TString paramStr(param);
53 if (paramStr.IsDigit() || paramStr == "-1") {
54 Int_t run = paramStr.Atoi();
56 } else if (paramStr == "new") {
57 Bool_t result = trigger.Collect();
58 } else if (paramStr == "listen") {
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<<"listen - start listening for DAQ notification"<<endl;
66 cout<<"<empty parameter> - the same as 'listen'"<<endl;
69 AliCDBManager::Destroy();