本文整理汇总了C++中AliAnalysisManager::ConnectOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::ConnectOutput方法的具体用法?C++ AliAnalysisManager::ConnectOutput怎么用?C++ AliAnalysisManager::ConnectOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::ConnectOutput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MSFT_AddQCmethod
void MSFT_AddQCmethod(char *name, TString myFolder, char *thecuts, int harmonic,
AliAnalysisDataContainer *flowEvent,
AliFlowTrackSimpleCuts *cutsPOI=NULL) {
TString fileName = AliAnalysisManager::GetCommonFileName();
myFolder.Append( Form("v%d",harmonic) );
TString myName = Form("%sv%d_%s", name, harmonic, thecuts);
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *flowEvent2
= mgr->CreateContainer( Form("Filter_%s", myName.Data()),
AliFlowEventSimple::Class(),
AliAnalysisManager::kExchangeContainer );
AliAnalysisTaskFilterFE *tskFilter
= new AliAnalysisTaskFilterFE( Form("TaskFilter_%s",myName.Data()),
NULL, cutsPOI);
mgr->AddTask(tskFilter);
mgr->ConnectInput( tskFilter, 0, flowEvent);
mgr->ConnectOutput(tskFilter, 1, flowEvent2);
AliAnalysisDataContainer *outQC
= mgr->CreateContainer( myName.Data(), TList::Class(), AliAnalysisManager::kOutputContainer,
Form("%s:FlowCascade_QC_%s", fileName.Data(), myFolder.Data()) );
AliAnalysisTaskQCumulants *tskQC
= new AliAnalysisTaskQCumulants( Form("TaskQCumulants_%s",myName.Data()),kFALSE );
tskQC->SetApplyCorrectionForNUA(kTRUE);
tskQC->SetHarmonic(harmonic);
tskQC->SetBookOnlyBasicCCH(kTRUE);
mgr->AddTask(tskQC);
mgr->ConnectInput( tskQC, 0, flowEvent2);
mgr->ConnectOutput(tskQC, 1, outQC);
}
示例2: MSFT_AddSPmethod
void MSFT_AddSPmethod(char *name, TString myFolder, char *thecuts, int harmonic,
AliAnalysisDataContainer *flowEvent, AliFlowTrackSimpleCuts *cutsPOI=NULL,
char *Qvector) {
TString fileName = AliAnalysisManager::GetCommonFileName();
myFolder.Append( Form("v%d",harmonic) );
TString myNameSP = Form("%sv%d%s_%s", name, harmonic, Qvector, thecuts);
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
AliAnalysisDataContainer *flowEvent2
= mgr->CreateContainer( Form("Filter_%s", myNameSP.Data()),
AliFlowEventSimple::Class(),
AliAnalysisManager::kExchangeContainer );
AliAnalysisTaskFilterFE *tskFilter
= new AliAnalysisTaskFilterFE( Form("TaskFilter_%s",myNameSP.Data()),
NULL, cutsPOI);
tskFilter->SetSubeventEtaRange( -5.0, -1.0, 1.0, +5.0 );
mgr->AddTask(tskFilter);
mgr->ConnectInput( tskFilter, 0, flowEvent);
mgr->ConnectOutput(tskFilter, 1, flowEvent2);
AliAnalysisDataContainer *outSP
= mgr->CreateContainer( myNameSP.Data(),TList::Class(),AliAnalysisManager::kOutputContainer,
Form("%s:FlowCascade_SP_%s",fileName.Data(),myFolder.Data()) );
AliAnalysisTaskScalarProduct *tskSP
= new AliAnalysisTaskScalarProduct( Form("TaskScalarProduct_%s",myNameSP.Data()),kFALSE);
tskSP->SetApplyCorrectionForNUA(kTRUE);
tskSP->SetHarmonic(harmonic);
tskSP->SetTotalQvector(Qvector);
tskSP->SetBookOnlyBasicCCH(kTRUE);
mgr->AddTask(tskSP);
mgr->ConnectInput( tskSP,0,flowEvent2);
mgr->ConnectOutput(tskSP,1,outSP);
}
示例3: AliAnalysisTaskMuonAODCreation
AliAnalysisTaskMuonAODCreation *AddTaskMuonAODCreation()
{
// Creates a filter task to copy muon tracks from the Standard AOD to the Muon AOD
// R. Arnaldi - 6/10/09
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskMuonAODCreation", "No analysis manager to connect to.");
return NULL;
}
// Get input handler
TString type = mgr->GetInputEventHandler()->GetDataType();
// Define output
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("chist0",TList::Class(),AliAnalysisManager::kOutputContainer,"MuonPlots.root");
// Create the task, add it to the manager and configure it.
//===========================================================================
AliAnalysisTaskMuonAODCreation *muonAODtask = new AliAnalysisTaskMuonAODCreation("Muon AOD creation");
mgr->AddTask(muonAODtask);
// 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 (muonAODtask, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput (muonAODtask, 0, mgr->GetCommonOutputContainer());
mgr->ConnectOutput (muonAODtask, 1, coutput1);
return muonAODtask;
}
示例4: Printf
AliAnalysisTaskStrangenessVsMultiplicityMC *AddTaskStrangenessVsMultiplicityMC( Bool_t lSaveV0 = kFALSE, Bool_t lSaveCascade = kTRUE, const TString lMasterJobSessionFlag = "")
{
// Creates, configures and attaches to the train a cascades check task.
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskStrangenessVsMultiplicity", "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("AddTaskStrangenessVsMultiplicity", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Create and configure the task
AliAnalysisTaskStrangenessVsMultiplicityMC *taskAuxiliary = new AliAnalysisTaskStrangenessVsMultiplicityMC("taskAuxiliary");
mgr->AddTask(taskAuxiliary);
TString outputFileName = AliAnalysisManager::GetCommonFileName();
outputFileName += ":PWGLF_StrVsMult";
if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
AliAnalysisDataContainer *coutputList = mgr->CreateContainer("cList",
TList::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cTreeEvent",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTreeV0 = mgr->CreateContainer("cTreeV0",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
AliAnalysisDataContainer *coutputTreeCascade = mgr->CreateContainer("cTreeCascade",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//This one you should merge in file-resident ways...
coutputTree->SetSpecialOutput();
coutputTreeV0->SetSpecialOutput();
coutputTreeCascade->SetSpecialOutput();
//Recommendation: Tree as a single output slot
mgr->ConnectInput (taskAuxiliary, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(taskAuxiliary, 1, coutputList);
mgr->ConnectOutput(taskAuxiliary, 2, coutputTree);
mgr->ConnectOutput(taskAuxiliary, 3, coutputTreeV0);
mgr->ConnectOutput(taskAuxiliary, 4, coutputTreeCascade);
return taskAuxiliary;
}
示例5: AddClusterSelectionTask
void AddClusterSelectionTask(TString name = "ClusterSelectionTask")
{
gSystem->AddIncludePath("-I$ALICE_ROOT/include");
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskPHOSPi0Flow", "No analysis manager to connect to");
return NULL;
}
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskPHOSPi0Flow", "This task requires an input event handler");
return NULL;
}
gROOT->LoadMacro("ClusterSelectionTask.cxx+g");
ClusterSelectionTask * task = new ClusterSelectionTask(name);
mgr->AddTask(task);
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
TString cname(Form("HistList", name));
TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
mgr->ConnectOutput(task, 1, coutput1);
cname = Form("SelectedPhotons", name);
AliAnalysisDataContainer *cexchange2 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kExchangeContainer, pname.Data());
mgr->ConnectOutput(task, 2, cexchange2);
return task;
}
示例6: printf
AliAnalysisTaskSEF01710fromAODtracks *AddTaskF01710fromAODtracks(
Int_t antype = 0,
Bool_t theMCon=kFALSE,
Bool_t writeVariableTree=kFALSE,
Int_t nTour=0
)
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskLc2V0YW", "No analysis manager to connect to.");
return NULL;
}
//CREATE THE TASK
printf("CREATE TASK\n");
AliAnalysisTaskSEF01710fromAODtracks *task = new AliAnalysisTaskSEF01710fromAODtracks("AliAnalysisTaskSEF01710fromAODtracks",writeVariableTree);
task->SetMC(theMCon);
task->SetDebugLevel(1);
task->SetAnalysisType(antype);
if(antype==2 || antype == 3){
task->SetProdV0DaughterDcaToPrimVertex(0.1);
task->SetProdRfidMinV0(5.);
}
task->SetEventMixingWithPools();
//task->SetEventMixingOff();
Double_t pvzbinlimits[] = {-12,-10,-8,-6,-4,-2,0,2,4,6,8,10,12};
Int_t pvzbinnumb = sizeof(pvzbinlimits)/sizeof(Double_t) - 1;
task->SetPoolPVzBinLimits(pvzbinnumb,pvzbinlimits);
Double_t cent_mult_binlimitspp[] = { 0,100};
Int_t cent_mult_bin_numbpp = sizeof(cent_mult_binlimitspp)/sizeof(Double_t) - 1;
task->SetPoolCentBinLimits(cent_mult_bin_numbpp,cent_mult_binlimitspp);
task->SetNumberOfEventsForMixing(10);//pp
mgr->AddTask(task);
// Create and connect containers for input/output
TString outputfile = AliAnalysisManager::GetCommonFileName();
outputfile += ":PWGLF_RES_F01710_";
outputfile += nTour;
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
// ----- output data -----
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(Form("f0hist%1d",nTour),TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); // general histos
mgr->ConnectOutput(task,1,coutput1);
AliAnalysisDataContainer *coutputL2 = mgr->CreateContainer(Form("F0variables%1d",nTour),TTree::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data());
mgr->ConnectOutput(task,2,coutputL2);
AliAnalysisDataContainer *coutputL3 = mgr->CreateContainer(Form("F0All%1d",nTour),TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); // general histos
mgr->ConnectOutput(task,3,coutputL3);
return task;
}
示例7: RunLinkToMCAnalysisExample
void RunLinkToMCAnalysisExample(const char* esdFile = "./AliESDs.root")
{
// Load needed libraries
gSystem->Load("libTree");
gSystem->Load("libGeom");
gSystem->Load("libVMC");
gSystem->Load("libPhysics");
gSystem->Load("libSTEERBase");
gSystem->Load("libESD");
gSystem->Load("libAOD");
gSystem->Load("libANALYSIS");
gSystem->Load("libANALYSISalice");
gSystem->Load("libPWGHFbase");
gSystem->Load("libPWGmuon");
// Create the TChain for esdTrees in the AliESDs.root file.
TChain* chain = new TChain("esdTree");
chain->Add(esdFile);
if (!chain) return;
// Create the analysis manager and event handlers.
AliAnalysisManager* mgr = new AliAnalysisManager("Analysis Train", "An example analysis train setup for AliAnalysisTaskLinkToMC.");
AliESDInputHandler* esdHandler = new AliESDInputHandler();
mgr->SetInputEventHandler(esdHandler);
AliMCEventHandler* mcHandler = new AliMCEventHandler();
mgr->SetMCtruthEventHandler(mcHandler);
mcHandler->SetReadTR(kTRUE);
AliAODHandler* aodHandler = new AliAODHandler();
mgr->SetOutputEventHandler(aodHandler);
aodHandler->SetOutputFileName("AliAOD.root");
// Create the analysis task and setup the parameters.
AliAnalysisTaskLinkToMC* linktask = new AliAnalysisTaskLinkToMC("Task to link ESD tracks to corresponding MC tracks.");
linktask->MinClusters(6);
linktask->HardCutLimitX(4);
linktask->HardCutLimitY(4);
linktask->SigmaCut(5.);
linktask->MinClustersInSt45(3);
linktask->StationMustMatch(1, true); // At least one cluster in station 1 must match.
linktask->StationMustMatch(2, true); // At least one cluster in station 2 must match.
linktask->StationMustMatch(3, true); // At least one cluster in station 3 must match.
linktask->GenerateHistograms(true);
mgr->AddTask(linktask);
// Create the input and output containers and connect them up to the analysis task.
AliAnalysisDataContainer* cinEsd = mgr->GetCommonInputContainer();
AliAnalysisDataContainer* coutAod = mgr->GetCommonOutputContainer();
AliAnalysisDataContainer* coutHists = mgr->CreateContainer("cHists", TList::Class(), AliAnalysisManager::kOutputContainer, "hists.root");
mgr->ConnectInput(linktask, 0, cinEsd);
mgr->ConnectOutput(linktask, 0, coutAod);
mgr->ConnectOutput(linktask, 1, coutHists);
if (mgr->InitAnalysis())
{
mgr->PrintStatus();
mgr->StartAnalysis("local", chain);
}
}
示例8: AliMultSelectionTask
AliMultSelectionTask *AddTaskMultSelection( Bool_t lCalibration = kFALSE, TString lExtraOptions = "", Int_t lNDebugEstimators = 1, const TString lMasterJobSessionFlag = "")
{
// Creates, configures and attaches to the train a Multiplicity Selection Task
// Get the pointer to the existing analysis manager via the static access method.
//==============================================================================
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskMultSelection", "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("AddTaskMultSelection", "This task requires an input event handler");
return NULL;
}
TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
// Create and configure the task
//Special options interpreting: will be taken care of by the task
// A - Add Extra AliCentrality V0M branch for cross-checks
// A - Add Extra AliPPVsMultUtils V0M branch for cross-checks
AliMultSelectionTask *taskMultSelection = new AliMultSelectionTask("taskMultSelection", lExtraOptions.Data(), lCalibration, lNDebugEstimators);
mgr->AddTask(taskMultSelection);
TString outputFileName = AliAnalysisManager::GetCommonFileName();
outputFileName += ":MultSelection";
if (mgr->GetMCtruthEventHandler()) outputFileName += "_MC";
Printf("Set OutputFileName : \n %s\n", outputFileName.Data() );
AliAnalysisDataContainer *coutputList = mgr->CreateContainer("cListMultSelection",
TList::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//Recommendation: Tree as a single output slot
mgr->ConnectInput (taskMultSelection, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(taskMultSelection, 1, coutputList);
if ( lCalibration ) {
AliAnalysisDataContainer *coutputTree = mgr->CreateContainer("cCalibrationTree",
TTree::Class(),
AliAnalysisManager::kOutputContainer,
outputFileName );
//This one you should merge in file-resident ways...
coutputTree->SetSpecialOutput();
mgr->ConnectOutput(taskMultSelection, 2, coutputTree);
}
return taskMultSelection;
}
示例9: Error
AliAnalysisTaskUpcEtaC *AddTaskUpcEtaC(Bool_t runTree = kTRUE,Bool_t runHist = kTRUE,Bool_t runSyst = kFALSE,Int_t tracking = 0){
//--- get the current analysis manager ---//
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTask_UpcEtaC", "No analysis manager found.");
return 0;
}
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler()) {
Error("AddTask_UpcEtaC", "This task requires an input event handler");
return 0;
}
TString inputDataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
Bool_t isMC;
if(mgr->GetMCtruthEventHandler()) isMC = kTRUE;
// Create tasks
AliAnalysisTaskUpcEtaC *task = new AliAnalysisTaskUpcEtaC(inputDataType.Data());
task->SetRunTree(runTree);
task->SetRunHist(runHist);
task->SetIsMC(isMC);
task->SetRunSyst(runSyst);
task->SetTracking(tracking);
mgr->AddTask(task);
// Create containers for input/output
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput = mgr->CreateContainer("EtaCK0sChannelTree", TTree::Class(), AliAnalysisManager::kOutputContainer,Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("EtaCTree", TTree::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("ListTrig", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("ListHist", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("ListHistKstar", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("ListHist2Rho4Pion", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("ListHistK0s3PiPi4K", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
AliAnalysisDataContainer *coutput8 = mgr->CreateContainer("ListHistZDC", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:EtaCUpc", AliAnalysisManager::GetCommonFileName()));
// Connect input/output
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput);
mgr->ConnectOutput(task, 2, coutput2);
mgr->ConnectOutput(task, 3, coutput3);
mgr->ConnectOutput(task, 4, coutput4);
mgr->ConnectOutput(task, 5, coutput5);
mgr->ConnectOutput(task, 6, coutput6);
mgr->ConnectOutput(task, 7, coutput7);
mgr->ConnectOutput(task, 8, coutput8);
return task;
}
示例10: Error
AliAnalysisTask *AddTaskLambdaBayes(Bool_t ismc=kFALSE,Bool_t qa=kTRUE,Int_t filterbit=4,Int_t typeCol=2,Bool_t toEP=kFALSE,Int_t species=4){
//get the current analysis manager
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("No manager found in AddTaskVZERO. Why?");
return 0;
}
// currently don't accept AOD input
if (!mgr->GetInputEventHandler()->InheritsFrom(AliAODInputHandler::Class())) {
Error("AddTaskLambdaBayes","This task works only with AOD input!");
return 0;
}
//========= Add tender to the ANALYSIS manager and set default storage =====
char mytaskName[100];
snprintf(mytaskName,100,"AliAnalysisTaskLambdaBayes.cxx");
AliAnalysisTaskLambdaBayes *task = new AliAnalysisTaskLambdaBayes(mytaskName);
if(ismc) task->SetMC();
if(qa) task->SetQA();
task->SetEtaCut(0.8);
task->SetFilterBit(filterbit);
task->SetTypeCollisions(typeCol);
task->SetCorrEP(toEP);
task->SetRefSpecies(species);
AliPIDmaxProb *userCut = new AliPIDmaxProb("maxProbProton");
userCut->RequireTPC();
userCut->RequireTOF();
task->SetPIDuserCut(userCut);
mgr->AddTask(task);
//Attach input to my tasks
AliAnalysisDataContainer *cinput = mgr->CreateContainer("cchain1",TChain::Class(),AliAnalysisManager::kInputContainer);
mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
// Attach output to my tasks
AliAnalysisDataContainer *cOutputL= mgr->CreateContainer("contLambdaBayes1",TList::Class(), AliAnalysisManager::kOutputContainer,
AliAnalysisManager::GetCommonFileName());
mgr->ConnectOutput(task, 1, cOutputL);
AliAnalysisDataContainer *cOutputL2= mgr->CreateContainer("contLambdaBayes2",TList::Class(), AliAnalysisManager::kOutputContainer,
AliAnalysisManager::GetCommonFileName());
mgr->ConnectOutput(task, 2, cOutputL2);
AliAnalysisDataContainer *cOutputL3= mgr->CreateContainer("contLambdaBayes3",TList::Class(), AliAnalysisManager::kOutputContainer,
AliAnalysisManager::GetCommonFileName());
mgr->ConnectOutput(task, 3, cOutputL3);
return task;
}
示例11: AddTaskPHOSEpRatio
AliAnalysisTaskEpRatio* AddTaskPHOSEpRatio (Bool_t kMC = kFALSE,
const char* name = "PHOSEpRatio",
const char* options = "",
UInt_t offlineTriggerMask = AliVEvent::kINT7 )
{
//Add a task AliAnalysisTaskEpRatio to the analysis train.
//Author: Boris Polishchuk.
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
::Error("AddTaskPHOSEpRatio", "No analysis manager to connect to");
return NULL;
}
if (!mgr->GetInputEventHandler()) {
::Error("AddTaskPHOSEpRatio", "This task requires an input event handler");
return NULL;
}
AliAnalysisTaskEpRatio* task = new AliAnalysisTaskEpRatio(Form("%sTask", name));
if(!kMC) task->SelectCollisionCandidates(offlineTriggerMask);
mgr->AddTask(task);
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer() );
TString cname(Form("%sCoutput1", name));
TString pname(Form("%s:%s", AliAnalysisManager::GetCommonFileName(), name));
AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(cname.Data(), TList::Class(), AliAnalysisManager::kOutputContainer, pname.Data());
mgr->ConnectOutput(task, 1, coutput1);
return task;
}
示例12: AliAnalysisTaskPIDCORR
AliAnalysisTaskPIDCORR *AddTaskPIDCORR()
{
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
return NULL;
}
AliAnalysisTaskPIDCORR* task = new AliAnalysisTaskPIDCORR("PIDCORR_pp7TeV");
mgr->AddTask(task);
TString outputFileName = AliAnalysisManager::GetCommonFileName();
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput = mgr->CreateContainer("PIDCORR_pp7TeV", TList::Class(), AliAnalysisManager::kOutputContainer, outputFileName.Data());
outputFileName.Data()
// connect input/output
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput);
return task;
}
示例13: Error
AliAnalysisTaskADQA *AddTaskADQA(){
//--- get the current analysis manager ---//
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) {
Error("AddTask_ADQA", "No analysis manager found.");
return 0;
}
// Check the analysis type using the event handlers connected to the analysis manager.
//==============================================================================
if (!mgr->GetInputEventHandler()) {
Error("AddTask_ADQA", "This task requires an input event handler");
return 0;
}
// Create tasks
AliAnalysisTaskADQA *task = new AliAnalysisTaskADQA("ESD");
mgr->AddTask(task);
// Create containers for input/output
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
AliAnalysisDataContainer *coutput = mgr->CreateContainer("ADQAListHist", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:ADQA", AliAnalysisManager::GetCommonFileName()));
// Connect input/output
mgr->ConnectInput(task, 0, cinput);
mgr->ConnectOutput(task, 1, coutput);
return task;
}
示例14:
AliAnalysisTask *AddEventMixingTestTask(TString format = "esd", Bool_t useMC = kFALSE,TString postfix="")
{
// create manager
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) mgr = new AliAnalysisManager("MIX test");
// create our task
AliAnalysisTaskEx02 *task = new AliAnalysisTaskEx02("AliAnalysisTaskEx02");
// create output container
AliAnalysisDataContainer *output1 = mgr->CreateContainer("cEx2", TList::Class(), AliAnalysisManager::kOutputContainer, "MixTestOutput.root");
// add our task to the manager
mgr->AddTask(task);
// finaly connect input and output
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(task, 1, output1);
// Option for test (only experts)
// task->SetLoopInUserExecMix(kTRUE);
// task->SetUseLoopMixedEvent(kTRUE);
// task->SetLoopV0(kTRUE);
return task;
}
示例15: AliJEfficiencyTask
//_____________________________________________________________________
AliAnalysisTask *AddTaskJCORRANEfficiency(TString taskName, int fTriggerMask){
// Load Custom Configuration and parameters
// override values with parameters
AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
//==== JCORRAN Efficiency TASK
AliJEfficiencyTask *jefftask = new AliJEfficiencyTask(taskName.Data(),"JOD");
jefftask->SetDebugLevel(0);
jefftask->SetFilterTaskName("PWGCFJCORRANTask");
AliJEfficiencyScanner *fEffScanner;
fEffScanner = new AliJEfficiencyScanner("EfficiencyScanner");
fEffScanner->SetMBTriggMask( fTriggerMask );
jefftask->SetJEfficiencyScanner( fEffScanner );
mgr->AddTask((AliAnalysisTask*) jefftask);
// Create containers for input/output
AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
// Connect input/output
mgr->ConnectInput(jefftask, 0, cinput);
// Connect input/output
AliAnalysisDataContainer *effHist = mgr->CreateContainer(Form("%scontainer",jefftask->GetName()), TDirectory::Class(), AliAnalysisManager::kOutputContainer, Form("%s:%s",AliAnalysisManager::GetCommonFileName(), jefftask->GetName()));
mgr->ConnectOutput(jefftask, 1, effHist );
return jefftask;
}