CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
VertexFitterManager Class Reference

#include <VertexFitterManager.h>

Public Member Functions

VertexFitterManagerclone () const
 
std::string describe (const std::string &) const
 
std::unique_ptr
< AbstractConfFitter
get (const std::string &) const
 
std::vector< std::string > getNames () const
 
void registerFitter (const std::string &name, std::function< AbstractConfFitter *()> o, const std::string &description)
 
 ~VertexFitterManager ()
 

Static Public Member Functions

static VertexFitterManagerInstance ()
 

Private Member Functions

 VertexFitterManager (const VertexFitterManager &)
 
 VertexFitterManager ()
 

Private Attributes

std::map< std::string,
std::function
< AbstractConfFitter *()> > 
theAbstractConfFitters
 
std::map< std::string,
std::string > 
theDescription
 

Detailed Description

Class that manages the vertex reconstruction strategies

Definition at line 15 of file VertexFitterManager.h.

Constructor & Destructor Documentation

VertexFitterManager::~VertexFitterManager ( )

Definition at line 21 of file VertexFitterManager.cc.

22 {
23 }
VertexFitterManager::VertexFitterManager ( const VertexFitterManager o)
private

Definition at line 39 of file VertexFitterManager.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

40 {
41  std::cout << "[VertexFitterManager] copy constructor! Error!" << std::endl;
42  exit(0);
43  /*
44  for ( map < string, AbstractConfFitter * >::const_iterator i=o.theAbstractConfFitters.begin();
45  i!=o.theAbstractConfFitters.end() ; ++i )
46  {
47  theAbstractConfFitters[ i->first ] = i->second->clone();
48  }
49 
50  theIsEnabled=o.theIsEnabled;
51  */
52 }
tuple cout
Definition: gather_cfg.py:121
VertexFitterManager::VertexFitterManager ( )
private

Definition at line 80 of file VertexFitterManager.cc.

81 {}

Member Function Documentation

VertexFitterManager * VertexFitterManager::clone ( void  ) const

Definition at line 34 of file VertexFitterManager.cc.

35 {
36  return new VertexFitterManager ( * this );
37 }
std::string VertexFitterManager::describe ( const std::string &  d) const

Definition at line 25 of file VertexFitterManager.cc.

References newFWLiteAna::found, and AlCaHLTBitMon_QueryRunRegistry::string.

26 {
27  auto found = theDescription.find(d);
28  if(found == theDescription.end()) {
29  return std::string{};
30  }
31  return found->first;
32 }
std::map< std::string, std::string > theDescription
std::unique_ptr< AbstractConfFitter > VertexFitterManager::get ( const std::string &  ) const

Definition at line 60 of file VertexFitterManager.cc.

References newFWLiteAna::found.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), ConfigurableVertexFitter::ConfigurableVertexFitter(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

61 {
62  auto found = theAbstractConfFitters.find(s);
63  if(found == theAbstractConfFitters.end()) {
64  return std::unique_ptr<AbstractConfFitter>{};
65  }
66  return std::unique_ptr<AbstractConfFitter>{found->second()};
67 }
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
std::vector< std::string > VertexFitterManager::getNames ( ) const

Definition at line 69 of file VertexFitterManager.cc.

References i, and run_regression::ret.

70 {
71  std::vector<std::string> ret;
72  ret.reserve(theAbstractConfFitters.size());
73 
74  for(const auto& i : theAbstractConfFitters) {
75  ret.push_back(i.first);
76  }
77  return ret;
78 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
VertexFitterManager & VertexFitterManager::Instance ( )
static

Definition at line 54 of file VertexFitterManager.cc.

Referenced by ConfFitterBuilder< O >::ConfFitterBuilder(), and ConfigurableVertexFitter::ConfigurableVertexFitter().

55 {
56  static VertexFitterManager singleton;
57  return singleton;
58 }
void VertexFitterManager::registerFitter ( const std::string &  name,
std::function< AbstractConfFitter *()>  o,
const std::string &  description 
)

Definition at line 7 of file VertexFitterManager.cc.

References VertexRecoManager::Instance(), mergeVDriftHistosByStation::name, python.connectstrParser::o, VertexRecoManager::registerReconstructor(), and edmStreamStallGrapher::t.

Referenced by ConfFitterBuilder< O >::ConfFitterBuilder().

9 {
12 
13  // every fitter registers as a reconstructor, also
15  //ReconstructorFromFitter clones the object passed
16  std::unique_ptr<AbstractConfFitter> t{o()};
17  return new ReconstructorFromFitter ( std::move(t) );},
18  d);
19 }
static VertexRecoManager & Instance()
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
std::map< std::string, std::string > theDescription
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)

Member Data Documentation

std::map< std::string, std::function<AbstractConfFitter*()> > VertexFitterManager::theAbstractConfFitters
private

Definition at line 32 of file VertexFitterManager.h.

std::map< std::string, std::string > VertexFitterManager::theDescription
private

Definition at line 33 of file VertexFitterManager.h.