Change default value of one argument
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / macros / AddTaskVertexingHFFilter.C
1 AliAnalysisTaskSEVertexingHF *AddTaskVertexingHFFilter(TString configPWG3d2h="$ALICE_ROOT/PWGHF/vertexingHF/ConfigVertexingHF_Pb_AllCent_NoLS_PIDLc.C", Bool_t registerFile=kTRUE)
2 {
3  
4   // Get the pointer to the existing analysis manager via the static access method.
5   //==============================================================================
6   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
7   if (!mgr) {
8     ::Error("AddTaskVertexingHFFilter", "No analysis manager to connect to.");
9     return NULL;
10   }   
11
12
13   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/vertexingHF/macros/AddTaskVertexingHF.C");
14   //  TFile::Cp(gSystem->ExpandPathName(configPWG3d2h.Data()), Form("%s/ConfigVertexingHF.C", train_name.Data()));
15   TFile::Cp(gSystem->ExpandPathName(configPWG3d2h.Data()), Form("ConfigVertexingHF.C"));
16   AliAnalysisTaskSEVertexingHF *taskvertexingHF = AddTaskVertexingHF();
17   // Now we need to keep in sync with the ESD filter
18   if (!taskvertexingHF) ::Warning("AddTaskVertexingHFFilter", "AliAnalysisTaskSEVertexingHF cannot run for this train conditions - EXCLUDED");
19   
20   if(registerFile) mgr->RegisterExtraFile("AliAOD.VertexingHF.root");
21   taskvertexingHF->SelectCollisionCandidates(0);
22
23   mgr->AddTask(taskvertexingHF);
24
25   return taskvertexingHF;
26 }