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 83 of file VertexFitterManager.cc.

84 {}

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 }
tuple d
Definition: ztail.py:151
std::map< std::string, std::string > theDescription
std::unique_ptr< AbstractConfFitter > VertexFitterManager::get ( const std::string &  ) const

Definition at line 63 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().

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

Definition at line 72 of file VertexFitterManager.cc.

References i, and run_regression::ret.

73 {
74  std::vector<std::string> ret;
75  ret.reserve(theAbstractConfFitters.size());
76 
77  for(const auto& i : theAbstractConfFitters) {
78  ret.push_back(i.first);
79  }
80  return ret;
81 }
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  //The singleton's internal structure only changes while
57  // this library is being loaded. All other methods are const.
58 
59  [[cms::thread_safe]] static VertexFitterManager singleton;
60  return singleton;
61 }
void VertexFitterManager::registerFitter ( const std::string &  name,
std::function< AbstractConfFitter *()>  o,
const std::string &  description 
)

Definition at line 7 of file VertexFitterManager.cc.

References ztail::d, VertexRecoManager::Instance(), eostools::move(), 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
tuple d
Definition: ztail.py:151
def move
Definition: eostools.py:508
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.