CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 23 of file VertexFitterManager.cc.

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

Definition at line 35 of file VertexFitterManager.cc.

References gather_cfg::cout, and beamvalidation::exit().

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

Definition at line 75 of file VertexFitterManager.cc.

75 {}

Member Function Documentation

VertexFitterManager * VertexFitterManager::clone ( void  ) const

Definition at line 33 of file VertexFitterManager.cc.

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

Definition at line 25 of file VertexFitterManager.cc.

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

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

Definition at line 65 of file VertexFitterManager.cc.

References mps_fire::i, and runTheMatrix::ret.

65  {
66  std::vector<std::string> ret;
67  ret.reserve(theAbstractConfFitters.size());
68 
69  for (const auto& i : theAbstractConfFitters) {
70  ret.push_back(i.first);
71  }
72  return ret;
73 }
tuple ret
prodAgent to be discontinued
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
VertexFitterManager & VertexFitterManager::Instance ( )
static

Definition at line 49 of file VertexFitterManager.cc.

References CMS_THREAD_SAFE.

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

49  {
50  //The singleton's internal structure only changes while
51  // this library is being loaded. All other methods are const.
52 
53  CMS_THREAD_SAFE static VertexFitterManager singleton;
54  return singleton;
55 }
#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 ztail::d, VertexRecoManager::Instance(), eostools::move(), mergeVDriftHistosByStation::name, class-composition::o, VertexRecoManager::registerReconstructor(), and submitPVValidationJobs::t.

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

8  {
11 
12  // every fitter registers as a reconstructor, also
14  name,
16  //ReconstructorFromFitter clones the object passed
17  std::unique_ptr<AbstractConfFitter> t{o()};
18  return new ReconstructorFromFitter(std::move(t));
19  },
20  d);
21 }
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
static VertexRecoManager & Instance()
tuple d
Definition: ztail.py:151
def move
Definition: eostools.py:511
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
std::map< std::string, std::string > theDescription

Member Data Documentation

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

Definition at line 30 of file VertexFitterManager.h.

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

Definition at line 31 of file VertexFitterManager.h.