Raw2SDigits method added.
[u/mrichter/AliRoot.git] / SHUTTLE / Shuttle.C
CommitLineData
d477ad88 1void Shuttle(const char* param = "listen") {
2
3 gSystem->Load("libSHUTTLE");
d477ad88 4 gSystem->Load("$ROOTSYS/lib/libThread");
57f50b3c 5 gSystem->Load("$ALICE_ROOT/SHUTTLE/test/libTest.so");
d477ad88 6
7// AliLog::SetGlobalDebugLevel(1);
8
4b4eb769 9 AliCDBManager *man = AliCDBManager::Instance();
10 man->SetDefaultStorage("local://MainCDB");
57f50b3c 11// man->SetDefaultStorage("alien://DBFolder=ShuttleMainCDB");
d477ad88 12
4b4eb769 13 AliShuttleConfig config("pcalice290.cern.ch", 389,
14 "o=alice,dc=cern,dc=ch");
15 config.SetProcessAll(kTRUE);
16 config.Print();
d477ad88 17
4b4eb769 18 AliShuttleTrigger trigger(&config);
d477ad88 19
20 AliShuttle* shuttle = trigger.GetShuttle();
4b4eb769 21
d477ad88 22 // Add here detectors preprocessor ...
57f50b3c 23 //TestTPCPreprocessor *tpcPrep = new TestTPCPreprocessor("TPC",shuttle);
24 //TestITSPreprocessor *itsPrep = new TestITSPreprocessor("ITS",shuttle);
25 TestRICHPreprocessor *richPrep = new TestRICHPreprocessor("RICH",shuttle);
d477ad88 26
27 TString paramStr(param);
28
29 if (paramStr.IsDigit()) {
30 Int_t run = paramStr.Atoi();
31 trigger.Collect(run);
32 } else if (paramStr == "new") {
33 trigger.CollectNew();
34 } else if (paramStr == "all") {
35 trigger.CollectAll();
36 } else if (paramStr == "listen") {
37 trigger.Run();
38 } else {
39 cout<<"Bad parameter: "<<param<<endl;
40 cout<<"Parameter options: "<<endl;
41 cout<<"<run> - collect data for the given run"<<endl;
42 cout<<"new - collect data only for the new runs"<<endl;
43 cout<<"all - collect data for all runs"<<endl;
44 cout<<"listen - start listening for DAQ notification"<<endl;
45 cout<<"<empty parameter> - the same as 'listen'"<<endl;
46 }
47
48 AliCDBManager::Destroy();
49}
50
51