Skip to content

Commit

Permalink
Merge pull request #12612 from siragoni/master
Browse files Browse the repository at this point in the history
PWGUD/UPC: Another attempt with a different name...
  • Loading branch information
alibuild authored Dec 9, 2019
2 parents d58cfef + 42ad879 commit 1861c2a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions PWGUD/UPC/AddTaskUPCforward.C
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
AliAnalysisTaskUPCforward* AddTaskUPCforward( TString name = "name", Int_t _fSetSingleMuonPt = 0, const char* suffix = "" )
AliAnalysisTaskUPCforward* AddTaskUPCforward( /*TString name = "name",*/ Int_t _fSetSingleMuonPt = 0, const char* suffix = "" )
{
// TString name = "UPCforward";
// TString combinedName;
// combinedName.Form("ADcheck_%s", suffix);
TString name = "PolarisationSys";
TString combinedName;
combinedName.Form("PolarisationSys_%s", suffix);


// get the manager via the static access member. since it's static, you don't need
Expand All @@ -22,16 +22,17 @@ AliAnalysisTaskUPCforward* AddTaskUPCforward( TString name = "name", Int_t _fSet
fileName += ":MyTask"; // create a subfolder in the file
// fileName += ":MyTask"; // create a subfolder in the file
// now we create an instance of your task
// AliAnalysisTaskUPCforward* task = new AliAnalysisTaskUPCforward(name.Data(), _fSetSingleMuonPt);
AliAnalysisTaskUPCforward* task = new AliAnalysisTaskUPCforward(Form("MyOutputContainer%s", suffix), _fSetSingleMuonPt);
AliAnalysisTaskUPCforward* task = new AliAnalysisTaskUPCforward(combinedName.Data(), _fSetSingleMuonPt);
// AliAnalysisTaskUPCforward* task = new AliAnalysisTaskUPCforward(Form("MyOutputContainer%s", suffix), _fSetSingleMuonPt);
if(!task) return 0x0;
// task->SelectCollisionCandidates(AliVEvent::kAnyINT); // Physics Selection used by "everybody" but NOT in UPC
// add your task to the manager
mgr->AddTask(task);
// your task needs input: here we connect the manager to your task
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
// same for the output
mgr->ConnectOutput(task,1,mgr->CreateContainer(Form("MyOutputContainer%s", suffix), TList::Class(), AliAnalysisManager::kOutputContainer, fileName.Data()));
mgr->ConnectOutput(task,1,mgr->CreateContainer(combinedName.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, fileName.Data()));
// mgr->ConnectOutput(task,1,mgr->CreateContainer(Form("MyOutputContainer%s", suffix), TList::Class(), AliAnalysisManager::kOutputContainer, fileName.Data()));
// in the end, this macro returns a pointer to your task. this will be convenient later on
// when you will run your analysis in an analysis train on grid
return task;
Expand Down

0 comments on commit 1861c2a

Please sign in to comment.