1 UInt_t onlineReco(const char* param = "listen",const char *recMacroPath = "$ALICE_ROOT/test/cosmic/rec.C") {
3 TString paramStr(param);
10 if (paramStr.IsDigit()) {
11 run = paramStr.Atoi();
12 } else if (paramStr == "listen") {
13 AliOnlineRecoTrigger trigger;
16 cout<<"Bad parameter: "<<param<<endl;
17 cout<<"Parameter options: "<<endl;
18 cout<<"<run> - run online reconstruction for the given run"<<endl;
19 cout<<"listen - start listening for ECS SOR notification"<<endl;
20 cout<<"<empty parameter> - the same as 'listen'"<<endl;
27 // "t" stores the token on this disk, otherwise the alien connection is not thread/process-safe
28 TGrid::Connect("alien://", 0, 0, "t");
30 TObjArray *gdcs = gdcList.Tokenize(" ");
31 Int_t ngdcs = tokens->GetEntriesFast();
34 TString dataSource = ((TObjString*)gdcs->At(0))->String();
35 dataSource.Prepend("mem://@");
36 datasource.Append(":");
39 AliCDBManager * man = AliCDBManager::Instance();
40 man->SetDefaultStorage("raw://");
41 man->SetSpecificStorage("GRP/GRP/Data",
42 Form("local://%s",gSystem->pwd()));
43 man->SetSpecificStorage("GRP/CTP/Config",
44 Form("local://%s",gSystem->pwd()));
47 gSystem->mkdir(Form("run%d",run));
48 gSystem->cd(Form("run%d",run));
50 gROOT->LoadMacro(gSystem->ExpandPathName(recMacroPath));
51 rec(dataSource.Data());
53 AliCDBManager::Destroy();
56 cout << "No GDCs defined in the logbook entry for run " << run << endl;
62 printf("Execution time: R:%.2fs C:%.2fs \n",
63 stopwatch.RealTime(),stopwatch.CpuTime());
69 Int_t grp(UInt_t run, TString &gdcList) {
71 Int_t ret=AliGRPPreprocessor::ReceivePromptRecoParameters(run, "aldaqdb", 0, "LOGBOOK", "logbook", "alice",
72 Form("local://%s",gSystem->pwd()),
74 if(ret>0) cout << "Last run of the same type is: " << ret << endl;
75 else if(ret==0) cout << "No previous run of the same type found" << endl;
76 else if(ret<0) cout << "Error code while retrieving GRP parameters returned: " << ret << endl;