ATLAS Offline Software
TopEventReconstructionToolsLoader.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3  */
4 
10 
11 #include "TopAnalysis/Tools.h" //for the loadLibraries function
12 
13 namespace top {
15  TFile* /*outputFile*/,
16  std::shared_ptr<top::TopConfig> config,
17  EL::Worker* /*wk*/) {
18  //get the first bit of the string and store it in toolname
19  std::istringstream iss(line);
20  std::string toolname;
21  getline(iss, toolname, ' ');
22 
23  //any parameters?
24  std::string param;
25  if (line.size() > toolname.size()) param = line.substr(toolname.size() + 1);
26 
27  if (toolname == "RECO::SONNENSCHEIN") return new top::Sonnenschein();
28 
29  else if (toolname == "RECO::KLFITTERRUN") {
30  loadLibraries("libKLFitter");
31  return new top::KLFitterRun(name, param, config);
32  } else if (toolname == "RECO::PSEUDOTOP") {
33  return new top::PseudoTopRecoRun(param, config);
34  }
35 
36 
37  return nullptr;
38  }
39 }
checkFileSG.line
line
Definition: checkFileSG.py:75
top::loadLibraries
void loadLibraries(const std::string &libraryNames)
So that we can load external libraries with (1) extra event selection tools in, (2) user defined obje...
Definition: Tools.cxx:275
top
TopConfig A simple configuration that is NOT a singleton.
Definition: AnalysisTrackingHelper.cxx:58
TopEventReconstructionToolsLoader.h
Tools.h
Sonnenschein.h
PseudoTopRecoRun.h
top::Sonnenschein
An AnalysisTop friendly wrapper for the Sonnenschein reconstruction that is implemented in Sonnensche...
Definition: Sonnenschein.h:20
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
EL::Worker
Definition: Worker.h:25
top::KLFitterRun
Definition: KLFitterRun.h:16
python.hypoToolDisplay.toolname
def toolname(tool)
Definition: hypoToolDisplay.py:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
KLFitterRun.h
top::EventSelectorBase
This should apply event-level cuts and perform simple plotting on top::Event objects.
Definition: EventSelectorBase.h:20
TopConfig.h
top::TopEventReconstructionToolsLoader::initTool
top::EventSelectorBase * initTool(const std::string &name, const std::string &line, TFile *outputFile, std::shared_ptr< top::TopConfig > config, EL::Worker *wk=nullptr)
Some sort of factory that can create the tool you need given a string.
Definition: TopEventReconstructionToolsLoader.cxx:14
top::PseudoTopRecoRun
Definition: PseudoTopRecoRun.h:15