]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG1/macros/runTaskVtXY.C
striked out TF1Helper functionality ... was not supposed to be used in the
[u/mrichter/AliRoot.git] / PWG1 / macros / runTaskVtXY.C
1 //
2 // This is the macro to start the task measuring the beam spot size.
3 //
4 void runTaskVtXY(Char_t *dataset="/COMMON/COMMON/LHC09a4_run8100X#esdTree") {
5
6   if (!gProof) {
7      cerr<<"Proof session has not been open !"<<endl;
8      return;    
9   }
10
11  // Enable the needed packages
12     gProof->UploadPackage("STEERBase");
13     gProof->EnablePackage("STEERBase");
14     gProof->UploadPackage("ESD");
15     gProof->EnablePackage("ESD");
16     gProof->UploadPackage("AOD");
17     gProof->EnablePackage("AOD");
18     gProof->UploadPackage("ANALYSIS");
19     gProof->EnablePackage("ANALYSIS");
20     gProof->UploadPackage("ANALYSISalice");
21     gProof->EnablePackage("ANALYSISalice"); 
22
23  // Create the analysis manager
24  mgr = new AliAnalysisManager("testAnalysis");
25  // Create, add task
26  gProof->Load("AliAnalysisTaskVtXY.cxx++g");
27  task = new AliAnalysisTaskVtXY;
28  mgr->AddTask(task);
29  // Add ESD handler
30  AliESDInputHandler* esdHandler = new AliESDInputHandler;
31  mgr->SetInputEventHandler(esdHandler);  
32  
33   // Attach input
34  cInput = mgr->CreateContainer("cInput", TChain::Class(), 
35                              AliAnalysisManager::kInputContainer);
36  mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
37
38  // Attach output
39  cOutput= mgr->CreateContainer("cOutput", TList::Class(), 
40                             AliAnalysisManager::kOutputContainer, "VtXY.root");
41  mgr->ConnectOutput(task, 0, cOutput);
42
43  // Enable debug printouts
44  mgr->SetDebugLevel(2);
45  // Run analysis
46  mgr->InitAnalysis();
47  mgr->PrintStatus();
48
49  mgr->StartAnalysis("proof",dataset);
50
51 }