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 gSystem->Load(
"libMONITOR");
17 cout<<
"Bad parameter: "<<param<<endl;
18 cout<<
"Parameter options: "<<endl;
19 cout<<
"<run> - run online reconstruction for the given run"<<endl;
20 cout<<
"listen - start listening for ECS SOR notification"<<endl;
21 cout<<
"<empty parameter> - the same as 'listen'"<<endl;
26 if (
grp(run,gdc) > 0) {
29 TGrid::Connect(
"alien://", 0, 0,
"t");
33 gSystem->Setenv(
"DATE_RUN_NUMBER",Form(
"%d",run));
35 TString dataSource =
"*";
36 dataSource.Prepend(
"mem://@");
37 dataSource.Append(
":");
44 Form(
"local://%s",gSystem->pwd()));
46 Form(
"local://%s",gSystem->pwd()));
49 gSystem->mkdir(Form(
"run%d",run));
50 gSystem->cd(Form(
"run%d",run));
52 gROOT->LoadMacro(gSystem->ExpandPathName(recMacroPath));
53 rec(dataSource.Data());
58 cout <<
"No GDCs defined in the logbook entry for run " << run << endl;
63 printf(
"Execution time: R:%.2fs C:%.2fs \n",
64 stopwatch.RealTime(),stopwatch.CpuTime());
70 Int_t
grp(UInt_t run, TString &gdc) {
73 Form(
"local://%s",gSystem->pwd()),
75 if(ret>0) cout <<
"Last run of the same type is: " << ret << endl;
76 else if(ret==0) cout <<
"No previous run of the same type found" << endl;
77 else if(ret<0) cout <<
"Error code while retrieving GRP parameters returned: " << ret << endl;
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
void SetSpecificStorage(const char *calibType, const char *dbString, Int_t version=-1, Int_t subVersion=-1)
static Int_t ReceivePromptRecoParameters(UInt_t run, const char *dbHost, Int_t dbPort, const char *dbName, const char *user, const char *password, const char *cdbRoot, TString &gdc)
void rec(const char *filename="raw.root")
UInt_t onlineReco(const char *param="listen", const char *recMacroPath="$ALICE_ROOT/test/cosmic/rec.C")
void SetDefaultStorage(const char *dbString)
Int_t grp(UInt_t run, TString &gdc)
ULong64_t SetLock(Bool_t lockFlag=kTRUE, ULong64_t key=0)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)