1 Bool_t Shuttle(const char* param = "listen", const char* dets=0) {
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("libRAliEn.so");
8 gSystem->Load("libRLDAP.so");
9 gSystem->Load("libMonaLisa");
10 gSystem->Load("libSHUTTLE");
11 gSystem->Load("libThread");
12 // gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
14 AliLog::SetGlobalDebugLevel(2);
16 // Setting local CDB and reference storage locations
17 AliShuttle::SetMainCDB("alien://user=aliprod?folder=testShuttle/OCDB");
18 AliShuttle::SetMainRefStorage("alien://user=aliprod?folder=testShuttle/Reference");
20 // AliShuttle::SetMainCDB("local://$SHUTTLE_DIR/LocalShuttleCDB");
21 // AliShuttle::SetMainRefStorage("local://$SHUTTLE_DIR/LocalShuttleRefStorage");
23 AliShuttle::SetLocalCDB("local://$SHUTTLE_DIR/LocalShuttleCDB");
24 AliShuttle::SetLocalRefStorage("local://$SHUTTLE_DIR/LocalShuttleRefStorage");
26 // Setting Shuttle log and temp folders
27 AliShuttle::SetShuttleLogDir("$SHUTTLE_DIR/log");
28 AliShuttle::SetShuttleTempDir("$SHUTTLE_DIR/temp");
32 AliShuttle::SetProcessDCS(kTRUE);
34 // AliShuttleConfig config("pcalice290.cern.ch", 389, "o=alice,dc=cern,dc=ch");
35 AliShuttleConfig config("pcalishuttle01.cern.ch", 389, "", "", "o=alice,dc=cern,dc=ch");
36 config.SetProcessAll(kTRUE);
39 AliShuttleTrigger trigger(&config, 100000);
41 AliShuttle* shuttle = trigger.GetShuttle();
43 // Add here detectors preprocessor ...
45 TString detector = dets;
47 printf ("Processing detectors: %s \n", detector.Data());
49 if (detector.Contains("SPD"))
50 new AliITSPreprocessorSPD(shuttle);
51 if (detector.Contains("SDD"))
52 new AliITSPreprocessorSDD(shuttle);
53 if (detector.Contains("SSD"))
54 new AliITSPreprocessorSSD(shuttle);
55 if (detector.Contains("TPC"))
56 new AliTPCPreprocessor(shuttle);
57 if (detector.Contains("TRD"))
58 new AliTRDPreprocessor(shuttle);
59 if (detector.Contains("TOF"))
60 new AliTOFPreprocessor(shuttle);
61 if (detector.Contains("PHS"))
63 gSystem->Load("libPHOSshuttle");
64 new AliPHOSPreprocessor(shuttle);
66 if (detector.Contains("CPV"))
67 new AliCPVPreprocessor(shuttle);
68 if (detector.Contains("HMP"))
69 new AliHMPIDPreprocessor(shuttle);
70 if (detector.Contains("EMC"))
71 new AliEMCALPreprocessor(shuttle);
72 if (detector.Contains("MCH"))
73 new AliMUONPreprocessor(shuttle);
74 if (detector.Contains("MTR"))
75 new AliMTRPreprocessor(shuttle);
76 if (detector.Contains("FMD"))
77 new AliFMDPreprocessor(shuttle);
78 if (detector.Contains("ZDC"))
79 new AliZDCPreprocessor(shuttle);
80 if (detector.Contains("PMD"))
81 new AliPMDPreprocessor("PMD", shuttle);
82 if (detector.Contains("T00"))
84 gSystem->Load("libT0shuttle");
85 new AliT0Preprocessor("T00", shuttle);
87 if (detector.Contains("V00"))
88 new AliVZEROPreprocessor(shuttle);
89 if (detector.Contains("GRP"))
90 new AliGRPPreprocessor(shuttle);
92 // AliTOFPreprocessor *tofPrep = new AliTOFPreprocessor(shuttle);
93 // AliTRDPreprocessor *trdPrep = new AliTRDPreprocessor(shuttle);
94 // AliGRPPreprocessor *grpPrep = new AliGRPPreprocessor(shuttle);
96 TString paramStr(param);
101 if (paramStr.IsDigit() || paramStr == "-1") {
102 Int_t run = paramStr.Atoi();
103 trigger.Collect(run);
104 } else if (paramStr == "new") {
105 Bool_t result = trigger.Collect();
106 } else if (paramStr == "listen") {
109 cout<<"Bad parameter: "<<param<<endl;
110 cout<<"Parameter options: "<<endl;
111 cout<<"<run> - collect data for the given run"<<endl;
112 cout<<"new - collect data only for the new runs"<<endl;
113 cout<<"listen - start listening for DAQ notification"<<endl;
114 cout<<"<empty parameter> - the same as 'listen'"<<endl;
117 printf("Execution time: R:%.2fs C:%.2fs \n",
118 stopwatch.RealTime(),stopwatch.CpuTime());
120 AliCDBManager::Destroy();