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::~VertexFitterManager ( )

Definition at line 23 of file VertexFitterManager.cc.

23 {}

◆ VertexFitterManager() [1/2]

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 }
def exit(msg="")

◆ VertexFitterManager() [2/2]

VertexFitterManager::VertexFitterManager ( )
private

Definition at line 75 of file VertexFitterManager.cc.

75 {}

Member Function Documentation

◆ clone()

VertexFitterManager * VertexFitterManager::clone ( void  ) const

Definition at line 33 of file VertexFitterManager.cc.

33 { return new VertexFitterManager(*this); }

◆ describe()

std::string VertexFitterManager::describe ( const std::string &  d) const

Definition at line 25 of file VertexFitterManager.cc.

References ztail::d, 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 }
d
Definition: ztail.py:151
std::map< std::string, std::string > theDescription

◆ get()

std::unique_ptr< AbstractConfFitter > VertexFitterManager::get ( const std::string &  ) const

◆ getNames()

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 }
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
ret
prodAgent to be discontinued

◆ Instance()

VertexFitterManager & VertexFitterManager::Instance ( )
static

Definition at line 49 of file VertexFitterManager.cc.

References CMS_THREAD_SAFE, and boostedTaus_cff::singleton.

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 
54  return singleton;
55 }
#define CMS_THREAD_SAFE

◆ registerFitter()

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(), Skims_PA_cff::name, EcalTangentSkim_cfg::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()
d
Definition: ztail.py:151
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
std::map< std::string, std::string > theDescription
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ theAbstractConfFitters

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

Definition at line 30 of file VertexFitterManager.h.

◆ theDescription

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

Definition at line 31 of file VertexFitterManager.h.