Coding convention compliant version (by Raffaele)
[u/mrichter/AliRoot.git] / test / prompt / RunPromptOffline.C
CommitLineData
8ec2068a 1Bool_t RunPromptOffline(Int_t run, Int_t gdcNumber, TString trg="" )
2{
3 //
4 // origin: Mikolaj Krzewicki, Nikhef, Mikolaj.Krzewicki@cern.ch
5 //
6
7 //check arguments
8 if (gdcNumber>999) return kFALSE;
9
10 gROOT->LoadMacro("/local/home/daq/alisoft/macros/grp.C");
11 Int_t grpRetCode = grp(run);
12 if (grpRetCode<=0) return kFALSE;
13
14 TString gdcNumberStr = "";
15 gdcNumberStr += gdcNumber;
16 if (gdcNumberStr.Length()==2) gdcNumberStr.Prepend("0");
17 TString datasource = "mem://@aldaqpc";
18 datasource.Append(gdcNumberStr);
19 datasource.Append(":"); //no trg, do nothing
20
21 //handle the low-level trigger selection
22 if (trg!="")
23 {
24 datasource.Append("?Trigger=");
25 datasource.Append(trg);
26 }
27
28 cout<<endl<<"RunPromptOffline datasource: "<<datasource<<endl<<endl;
29
30 gROOT->LoadMacro("./rec.C");
31 rec(datasource);
32}