CMS 3D CMS Logo

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< AbstractConfFitterget (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 22 of file VertexFitterManager.cc.

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

Definition at line 40 of file VertexFitterManager.cc.

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

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

Definition at line 84 of file VertexFitterManager.cc.

85 {}

Member Function Documentation

VertexFitterManager * VertexFitterManager::clone ( void  ) const

Definition at line 35 of file VertexFitterManager.cc.

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

Definition at line 26 of file VertexFitterManager.cc.

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

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

Definition at line 64 of file VertexFitterManager.cc.

References runEdmFileComparison::found.

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

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

Definition at line 73 of file VertexFitterManager.cc.

References mps_fire::i.

74 {
75  std::vector<std::string> ret;
76  ret.reserve(theAbstractConfFitters.size());
77 
78  for(const auto& i : theAbstractConfFitters) {
79  ret.push_back(i.first);
80  }
81  return ret;
82 }
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
VertexFitterManager & VertexFitterManager::Instance ( )
static

Definition at line 55 of file VertexFitterManager.cc.

References CMS_THREAD_SAFE, and electrons_cff::singleton.

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

56 {
57  //The singleton's internal structure only changes while
58  // this library is being loaded. All other methods are const.
59 
61  return singleton;
62 }
#define CMS_THREAD_SAFE
void VertexFitterManager::registerFitter ( const std::string &  name,
std::function< AbstractConfFitter *()>  o,
const std::string &  description 
)

Definition at line 8 of file VertexFitterManager.cc.

References edmIntegrityCheck::d, VertexRecoManager::Instance(), eostools::move(), dataset::name, connectstrParser::o, VertexRecoManager::registerReconstructor(), and lumiQTWidget::t.

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

10 {
13 
14  // every fitter registers as a reconstructor, also
16  //ReconstructorFromFitter clones the object passed
17  std::unique_ptr<AbstractConfFitter> t{o()};
18  return new ReconstructorFromFitter ( std::move(t) );},
19  d);
20 }
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)
def move(src, dest)
Definition: eostools.py:511

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.