本文整理汇总了C++中AliAnalysisManager::SetAnalysisType方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::SetAnalysisType方法的具体用法?C++ AliAnalysisManager::SetAnalysisType怎么用?C++ AliAnalysisManager::SetAnalysisType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::SetAnalysisType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AliCFSingleTrackTask
//.........这里部分代码省略.........
printf("CREATE MC KINE CUTS\n");
TObjArray* mcList = new TObjArray(0) ;
mcList->AddLast(mcKineCuts);
mcList->AddLast(mcGenCuts);
printf("CREATE ACCEPTANCE CUTS\n");
TObjArray* accList = new TObjArray(0) ;
accList->AddLast(mcAccCuts);
printf("CREATE RECONSTRUCTION CUTS\n");
TObjArray* recList = new TObjArray(0) ;
recList->AddLast(recKineCuts);
recList->AddLast(recQualityCuts);
recList->AddLast(recIsPrimaryCuts);
printf("CREATE PID CUTS\n");
TObjArray* fPIDCutList = new TObjArray(0) ;
fPIDCutList->AddLast(cutPID);
//CREATE THE INTERFACE TO CORRECTION FRAMEWORK USED IN THE TASK
printf("CREATE INTERFACE AND CUTS\n");
AliCFManager* man = new AliCFManager() ;
man->SetNStepEvent(1);
man->SetEventCutsList(0,evtList);
man->SetParticleContainer(container);
man->SetParticleCutsList(0,mcList);
man->SetParticleCutsList(1,accList);
man->SetParticleCutsList(2,recList);
man->SetParticleCutsList(3,fPIDCutList);
//CREATE THE TASK
printf("CREATE TASK\n");
// create the task
AliCFSingleTrackTask *task = new AliCFSingleTrackTask("AliSingleTrackTask");
task->SetCFManager(man); //here is set the CF manager
task->SetQAList(qaList);
if (readAOD) task->SetReadAODData() ;
if (readTPCTracks) task->SetReadTPCTracks();
//SETUP THE ANALYSIS MANAGER TO READ INPUT CHAIN AND WRITE DESIRED OUTPUTS
printf("CREATE ANALYSIS MANAGER\n");
// Make the analysis manager
AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
if (useGrid) mgr->SetAnalysisType(AliAnalysisManager::kGridAnalysis);
else mgr->SetAnalysisType(AliAnalysisManager::kLocalAnalysis);
AliMCEventHandler* mcHandler = new AliMCEventHandler();
mgr->SetMCtruthEventHandler(mcHandler);
AliInputEventHandler* dataHandler ;
if (readAOD) dataHandler = new AliAODInputHandler();
else dataHandler = new AliESDInputHandler();
mgr->SetInputEventHandler(dataHandler);
// Create and connect containers for input/output
//------ input data ------
AliAnalysisDataContainer *cinput0 = mgr->CreateContainer("cchain0",TChain::Class(),AliAnalysisManager::kInputContainer);
// ----- output data -----
//slot 0 : default output tree (by default handled by AliAnalysisTaskSE)
AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("ctree0", TTree::Class(),AliAnalysisManager::kOutputContainer,"output.root");
//now comes user's output objects :
// output TH1I for event counting
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0", TH1I::Class(),AliAnalysisManager::kOutputContainer,"output.root");
// output Correction Framework Container (for acceptance & efficiency calculations)
AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("ccontainer0", AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,"output.root");
// output QA histograms
AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("clist0", TList::Class(),AliAnalysisManager::kOutputContainer,"output.root");
cinput0->SetData(analysisChain);
mgr->AddTask(task);
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
mgr->ConnectOutput(task,0,coutput0);
mgr->ConnectOutput(task,1,coutput1);
mgr->ConnectOutput(task,2,coutput2);
mgr->ConnectOutput(task,3,coutput3);
printf("READY TO RUN\n");
//RUN !!!
if (mgr->InitAnalysis()) {
mgr->PrintStatus();
mgr->StartAnalysis("local",analysisChain);
}
benchmark.Stop("AliSingleTrackTask");
benchmark.Show("AliSingleTrackTask");
return kTRUE ;
}