]> git.uio.no Git - u/mrichter/AliRoot.git/blob - test/proof/run.C
Changes for Root6
[u/mrichter/AliRoot.git] / test / proof / run.C
1 void run(Int_t runNumber)
2 {
3   gEnv->SetValue("XSec.GSI.DelegProxy","2");
4   // Select ROOT version
5   TProof::Mgr("XXX@alicecaf")->SetROOTVersion("v5-26-00");
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-18-Release.rec/AF-v4-18-rec.par");
11   gProof->EnablePackage("AF-v4-18-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 }