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("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://user=aliprod?folder=colla/GridShuttleCDB");
16 AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=colla/GridShuttleRefStorage");
18 // AliShuttle::SetMainCDB("local://testLeakCDB");
19 // AliShuttle::SetMainRefStorage("local://testLeakRef");
21 AliShuttle::SetLocalCDB("local://LocalShuttleCDB");
22 AliShuttle::SetLocalRefStorage("local://LocalShuttleRefStorage");
24 AliShuttle::SetProcessDCS(kFALSE);
27 // AliCDBManager *man = AliCDBManager::Instance();
28 // man->SetDefaultStorage("local://MainCDB");
29 // man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
32 AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
33 config.SetProcessAll(kTRUE);
36 AliShuttleTrigger trigger(&config);
38 AliShuttle* shuttle = trigger.GetShuttle();
40 // Add here detectors preprocessor ...
41 TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor(shuttle);
42 TestITSPreprocessorSPD *spdPrep = new TestITSPreprocessorSPD(shuttle);
43 TestHMPIDPreprocessor *richPrep = new TestHMPIDPreprocessor(shuttle);
44 TestZDCPreprocessor *zdcPrep = new TestZDCPreprocessor(shuttle);
46 TString paramStr(param);
48 if (paramStr.IsDigit() || paramStr == "-1") {
49 Int_t run = paramStr.Atoi();
51 } else if (paramStr == "new") {
52 Bool_t result = trigger.Collect();
53 } else if (paramStr == "listen") {
56 cout<<"Bad parameter: "<<param<<endl;
57 cout<<"Parameter options: "<<endl;
58 cout<<"<run> - collect data for the given run"<<endl;
59 cout<<"new - collect data only for the new runs"<<endl;
60 cout<<"listen - start listening for DAQ notification"<<endl;
61 cout<<"<empty parameter> - the same as 'listen'"<<endl;
64 AliCDBManager::Destroy();