X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWGPP%2FHMPID%2FAddTaskHmpidQA.C;h=0fc965b8af84188dcb00a7c9bf9518dd9fb87089;hb=a65a7e704a90d2ca4e682c82d8a708900dda04ca;hp=5ac0b62c241f538e9e59711c7a9465f9d7781b5c;hpb=1ea19f39c1537bbc6a2eb0d0485c7d846a4ec49b;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWGPP/HMPID/AddTaskHmpidQA.C b/PWGPP/HMPID/AddTaskHmpidQA.C index 5ac0b62c241..0fc965b8af8 100644 --- a/PWGPP/HMPID/AddTaskHmpidQA.C +++ b/PWGPP/HMPID/AddTaskHmpidQA.C @@ -1,39 +1,39 @@ -AliHMPIDTaskQA *AddTaskHmpidQA(Bool_t useMC=kTRUE) -{ -// Creates a HMPID task, configures it and adds it to the analysis manager. - - // Get the pointer to the existing analysis manager via the static access method. - //============================================================================== - AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); - if (!mgr) { - ::Error("AddTaskHmpidQA", "No analysis manager to connect to."); - return NULL; - } - - // Check the analysis type using the event handlers connected to the analysis manager. - //============================================================================== - if (!mgr->GetInputEventHandler()) { - ::Error("AddTaskHmpidQA", "This task requires an input event handler"); - return NULL; - } - - // Create the task and configure it. - //=========================================================================== - - AliHMPIDTaskQA *hmpTask = new AliHMPIDTaskQA("HMPIDTaskQA"); - hmpTask->SetDebugLevel(0); - hmpTask->SelectCollisionCandidates(); - hmpTask->SetUseMC(useMC); - mgr->AddTask(hmpTask); - - AliAnalysisDataContainer *cout_hmpid= mgr->CreateContainer("HmpidQA", TList::Class(),AliAnalysisManager::kOutputContainer, - Form("%s:HmpidQA",AliAnalysisManager::GetCommonFileName())); - - // Create ONLY the output containers for the data produced by the task. - // Get and connect other common input/output containers via the manager as below - //============================================================================== - mgr->ConnectInput (hmpTask, 0, mgr->GetCommonInputContainer()); - mgr->ConnectOutput (hmpTask, 1, cout_hmpid); - - return hmpTask; -} +AliHMPIDTaskQA *AddTaskHmpidQA(Bool_t useMC=kTRUE) +{ +// Creates a HMPID task, configures it and adds it to the analysis manager. + + // Get the pointer to the existing analysis manager via the static access method. + //============================================================================== + AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); + if (!mgr) { + ::Error("AddTaskHmpidQA", "No analysis manager to connect to."); + return NULL; + } + + // Check the analysis type using the event handlers connected to the analysis manager. + //============================================================================== + if (!mgr->GetInputEventHandler()) { + ::Error("AddTaskHmpidQA", "This task requires an input event handler"); + return NULL; + } + + // Create the task and configure it. + //=========================================================================== + + AliHMPIDTaskQA *hmpTask = new AliHMPIDTaskQA("HMPIDTaskQA"); + hmpTask->SetDebugLevel(0); + hmpTask->SelectCollisionCandidates(); + hmpTask->SetUseMC(useMC); + mgr->AddTask(hmpTask); + + AliAnalysisDataContainer *cout_hmpid= mgr->CreateContainer("HmpidQA", TList::Class(),AliAnalysisManager::kOutputContainer, + Form("%s:HmpidQA",AliAnalysisManager::GetCommonFileName())); + + // Create ONLY the output containers for the data produced by the task. + // Get and connect other common input/output containers via the manager as below + //============================================================================== + mgr->ConnectInput (hmpTask, 0, mgr->GetCommonInputContainer()); + mgr->ConnectOutput (hmpTask, 1, cout_hmpid); + + return hmpTask; +}