本文整理汇总了C++中AliAnalysisManager::GetOutputEventHandler方法的典型用法代码示例。如果您正苦于以下问题:C++ AliAnalysisManager::GetOutputEventHandler方法的具体用法?C++ AliAnalysisManager::GetOutputEventHandler怎么用?C++ AliAnalysisManager::GetOutputEventHandler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliAnalysisManager
的用法示例。
在下文中一共展示了AliAnalysisManager::GetOutputEventHandler方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RegisteredDataset
/**
* Get the name of the registered data set
*
*
* @return Name of the registered data set
*/
static TString RegisteredDataset()
{
TString ret;
AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
AliVEventHandler* oh = mgr->GetOutputEventHandler();
if (!oh) {
Warning("OutputUtilities::GetOutputDataSet",
"No outout event handler defined");
return ret;
}
AliAnalysisDataContainer* co = mgr->GetCommonOutputContainer();
if (!co) {
Warning("OutputUtilities::GetOutputDataSet",
"No common output container defined");
return ret;
}
if (!co->IsRegisterDataset()) {
Info("OutputUtilities::GetOutputDataSet",
"Common output is not registered as dataset");
return ret;
}
ret = oh->GetOutputFileName();
// ret.ReplaceAll("TTree", "");
ret.ReplaceAll(".root", "");
// ret.Append(co->GetTitle());
return ret;
}
示例2: OutputPath
/**
* Path of output
*
* @return Path to output - possibly a data set
*/
virtual TString OutputPath() const
{
AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr) return "";
AliVEventHandler* outH = mgr->GetOutputEventHandler();
if (!outH) return "";
TString ret = gSystem->ConcatFileName(gSystem->WorkingDirectory(),
outH->GetOutputFileName());
return ret;
}
示例3: AliMuonEventCuts
AliAnalysisTask* AddTaskAOD2AODMuonOnly(const char* triggerinputs,Bool_t withSPDtracklets, Int_t mcMode)
{
AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
if (!mgr)
{
::Error("AddTaskAOD2AODMuonOnly", "No analysis manager to connect to.");
return 0x0;
}
AliInputEventHandler* input = mgr->GetInputEventHandler();
if (!input)
{
::Error("AddTaskAOD2AODMuonOnly", "This task requires an input event handler");
return 0x0;
}
TString inputDataType = input->GetDataType(); // can be "ESD" or "AOD"
if (inputDataType != "AOD")
{
::Error("AddTaskAOD2AODMuonOnly", "This task requires an AOD input event handler");
return 0x0;
}
AliAODHandler* aodHandler = dynamic_cast<AliAODHandler*>(mgr->GetOutputEventHandler());
if (!aodHandler)
{
::Error("AddTaskAOD2AODMuonOnly", "This task requires an AOD output event handler");
return 0x0;
}
aodHandler->SetCreateNonStandardAOD();
AliMuonEventCuts* eventCuts = new AliMuonEventCuts("L0cutter","");
eventCuts->SetTrigClassPatterns("0MSL|0MUL|0MSH|0MLL",triggerinputs);
AliAnalysisTask* task = new AliAnalysisTaskAOD2MuonAOD(mcMode,withSPDtracklets,eventCuts);
mgr->AddTask(task);
// Connect input/output
mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
mgr->ConnectOutput(task, 0, mgr->GetCommonOutputContainer());
return task;
}
示例4: RegisterDataset
/**
* Register output data set
*
* @param dsname Data set name
*
* @return true on success
*/
static Bool_t RegisterDataset(const TString& dsname)
{
// Get the manager
AliAnalysisManager* mgr = AliAnalysisManager::GetAnalysisManager();
// If we are asked to make a data-set, get the output handler and
// common output container.
AliVEventHandler* handler = mgr->GetOutputEventHandler();
if (!handler) return true;
// Get the container
AliAnalysisDataContainer* cont = mgr->GetCommonOutputContainer();
if (!cont) {
Warning("OutputUtilities::RegisterDataset",
"No common output container defined");
return false;
}
// Make the name
TString nme(dsname);
if (nme.IsNull()) nme = mgr->GetName();
if (nme.IsNull()) {
Error("OutputUtilities::RegisterDataset", "No data set name specified");
return false;
}
// Flag for data-set creation
cont->SetRegisterDataset(true);
handler->SetOutputFileName(nme);
// cont->SetFileName(nme);
TString base(handler->GetOutputFileName());
base.ReplaceAll(".root","");
Info("OutputUtilities::RegisterDataset",
"Will register tree output AODs (%s%s) as dataset",
base.Data(), cont->GetTitle());
return true;
}