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


C++ Analysis::PrintModuleTree方法代码示例

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


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

示例1: runMonoJetSkim


//.........这里部分代码省略.........
  if (TString(fileset) != TString(""))
    outputName += TString("_") + TString(fileset);
  
  OutputMod *skimOutput = new OutputMod;

  skimOutput->Keep("*");
  skimOutput->Drop("L1TechBits*");
  skimOutput->Drop("L1AlgoBits*");
  skimOutput->Drop("MCVertexes");
  skimOutput->Drop("PFEcal*SuperClusters");
  skimOutput->Drop("*Tracks");
  skimOutput->Drop("StandaloneMuonTracksWVtxConstraint");
  skimOutput->Drop("PrimaryVertexesBeamSpot");
  skimOutput->Drop("InclusiveSecondaryVertexes");
  skimOutput->Drop("CosmicMuons");
  skimOutput->Drop("MergedElectronsStable");
  skimOutput->Drop("MergedConversions*");
  skimOutput->Drop("AKT8GenJets");
  skimOutput->Drop("AKt4PFJets");
  skimOutput->Drop("DCASig");
  skimOutput->AddNewBranch(type1MetCorr->GetOutputName());
  skimOutput->AddNewBranch(monojetSel->GetCategoryFlagsName());

  skimOutput->SetMaxFileSize(10 * 1024); // 10 GB - should never exceed
  skimOutput->SetFileName(outputName);
  skimOutput->SetPathName(".");
  skimOutput->SetCheckTamBr(false);
  skimOutput->SetKeepTamBr(false);
  skimOutput->SetCheckBrDep(true);
  skimOutput->SetUseBrDep(true);

  skimOutput->AddCondition(monojetSel);

  //------------------------------------------------------------------------------------------------
  // making the analysis chain
  //------------------------------------------------------------------------------------------------
  auto mItr(modules.begin());
  while (true) {
    auto* mod = *(mItr++);
    if (mItr == modules.end())
      break;
    mod->Add(*mItr);
  }

  //------------------------------------------------------------------------------------------------
  // setup analysis
  //------------------------------------------------------------------------------------------------
  Analysis *ana = new Analysis;
  ana->SetUseCacher(1);
  ana->SetUseHLT(kTRUE);
  ana->SetAllowNoHLTTree(kTRUE); // for private MC with no HLT info
  ana->SetKeepHierarchy(kFALSE);
  ana->SetPrintScale(100);
  ana->SetOutputName(outputName + "_hist.root");
  if (nEvents >= 0)
    ana->SetProcessNEvents(nEvents);

  ana->AddSuperModule(modules.front());
  ana->AddOutputMod(skimOutput);

  //------------------------------------------------------------------------------------------------
  // organize input
  //------------------------------------------------------------------------------------------------
  Catalog *c = new Catalog(catalogDir);
  TString skimDataset = TString(dataset)+TString("/") +TString(skim);
  Dataset *d = NULL;
  if (TString(skim).CompareTo("noskim") == 0)
    d = c->FindDataset(book,dataset,fileset, 1); // 1 to use smartcache
  else
    d = c->FindDataset(book,skimDataset.Data(),fileset, 1);
  ana->AddDataset(d);
  ana->SetCacheSize(0);

  //------------------------------------------------------------------------------------------------
  // Say what we are doing
  //------------------------------------------------------------------------------------------------
  printf("\n==== PARAMETER SUMMARY FOR THIS JOB ====\n");
  printf("\n JSON file: %s\n", json.Data());
  printf("\n Rely on Catalog: %s\n",catalogDir);
  printf("  -> Book: %s  Dataset: %s  Skim: %s  Fileset: %s <-\n",book,dataset,skim,fileset);
  printf("\n========================================\n");

  std::cout << std::endl;
  std::cout << "+++++ ANALYSIS FLOW +++++" << std::endl;
  ana->PrintModuleTree();
  std::cout << std::endl;
  std::cout << "+++++++++++++++++++++++++" << std::endl;

  //------------------------------------------------------------------------------------------------
  // run the analysis after successful initialisation
  //------------------------------------------------------------------------------------------------
  ana->Run(false);

  delete ana; // all modules deleted recursively

  // rename the output file so that condor can see it
  gSystem->Rename("./" + outputName + "_000.root", "./" + outputName + ".root");

  return;
}
开发者ID:DylanHsu,项目名称:MitPhysics,代码行数:101,代码来源:runMonoJetSkim.C


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