]> git.uio.no Git - u/mrichter/AliRoot.git/blame - test/proof/run.C
Example of CAF raw-data reconstruction. The simplest usage is rec.sh <run#>.
[u/mrichter/AliRoot.git] / test / proof / run.C
CommitLineData
33410957 1void run(Int_t runNumber)
2{
3 gEnv->SetValue("XSec.GSI.DelegProxy","2");
4 // Select ROOT version
5 TProof::Mgr("XXX@alicecaf")->SetROOTVersion("v5-24-00b-caf_dbg");
6 // Login to CAF
7 TProof::Open("XXX@alicecaf");
8
9 // Enable AliRoot
10 gProof->UploadPackage("/afs/cern.ch/alice/caf/sw/ALICE/PARs/v4-17-Release.rec/AF-v4-17-rec.par");
11 gProof->EnablePackage("AF-v4-17-rec.par");
12
13 // Run reconstruction
14 gROOT->LoadMacro("rec.C");
15 gROOT->ProcessLine(Form("rec(%d);",runNumber));
16
17 TProof::Mgr("XXX@alicecaf")->GetSessionLogs()->Save("*",Form("run%d.log",runNumber));
18
19 // Check the produced dataset
20 TFileCollection *coll = gProof->GetDataSet(Form("run%d",runNumber));
21 if (coll) {
22 Int_t nEvents = coll->GetTotalEntries("/esdTree");
23 if (nEvents > 0) {
24 cout << "===========================================================================" << endl;
25 cout << nEvents << " events reconstructed and stored in the dataset run" << runNumber << endl;
26 cout << "===========================================================================" << endl;
27 cout << "The dataset is:" << endl;
28 coll->Print();
29 cout << "===========================================================================" << endl;
30 }
31 }
32}