当前位置: 首页>>代码示例>>C++>>正文


C++ AliAnalysisManager::GetOutputEventHandler方法代码示例

本文整理汇总了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;
  }
开发者ID:ktf,项目名称:AliPhysics,代码行数:35,代码来源:OutputUtilities.C

示例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;
  }
开发者ID:ktf,项目名称:AliPhysics,代码行数:17,代码来源:LiteRailway.C

示例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;
}
开发者ID:ktf,项目名称:AliPhysics,代码行数:49,代码来源:AddTaskAOD2AODMuonOnly.C

示例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;
  }
开发者ID:ktf,项目名称:AliPhysics,代码行数:47,代码来源:OutputUtilities.C


注:本文中的AliAnalysisManager::GetOutputEventHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。