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


C++ Fun4AllServer::topNode方法代码示例

本文整理汇总了C++中Fun4AllServer::topNode方法的典型用法代码示例。如果您正苦于以下问题:C++ Fun4AllServer::topNode方法的具体用法?C++ Fun4AllServer::topNode怎么用?C++ Fun4AllServer::topNode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fun4AllServer的用法示例。


在下文中一共展示了Fun4AllServer::topNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PHGeomFileImport

//! Read in a Geometry file, and output DST and ROOT TGeo files
void
Fun4All_ImportGeom(const string & geom_file = "./sPHENIX.root")
{
  gSystem->Load("libphgeom.so");

  Fun4AllServer *se = Fun4AllServer::instance();
  se->Verbosity(1);
  // just if we set some flags somewhere in this macro
  recoConsts *rc = recoConsts::instance();

  PHGeomFileImport * import = new PHGeomFileImport(geom_file);
  se->registerSubsystem(import);

  // dummy input
  Fun4AllInputManager *in = new Fun4AllDummyInputManager("JADE");
  se->registerInputManager(in);

  // output in DST
  Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT",
      geom_file + "_DST.root");
  se->registerOutputManager(out);

  // run one event as example
  se->run(1);

  PHGeomUtility::ExportGeomtry(se->topNode(),geom_file + "_export.root");

  se->End();
  std::cout << "All done" << std::endl;
  delete se;
  gSystem->Exit(0);

}
开发者ID:HaiwangYu,项目名称:coresoftware,代码行数:34,代码来源:Fun4All_ImportGeom.C

示例2: DisplayOn

// stupid macro to turn on the geant4 display
// we ask Fun4All for a pointer to PHG4Reco
// using the ApplyCommand will start up the
// G4 cmd interpreter and graphics system
// the vis.mac contains the necessary commands to
// start up the visualization, the next event will
// be displayed. Do not execute this macro
// before PHG4Reco was registered with Fun4All
PHG4Reco * DisplayOn(const char *mac = "vis_prototype3.mac")
{
  char cmd[100];
  Fun4AllServer *se = Fun4AllServer::instance();
  PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco("PHG4RECO");
  g4->InitRun(se->topNode());
  g4->ApplyDisplayAction();
  sprintf(cmd, "/control/execute %s", mac);
  g4->ApplyCommand(cmd);
  return g4;
}
开发者ID:sPHENIX-Collaboration,项目名称:macros,代码行数:19,代码来源:DisplayOn.C


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