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 ()
 
 VertexFitterManager (const 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.

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 }

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

◆ 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.

25  {
26  auto found = theDescription.find(d);
27  if (found == theDescription.end()) {
28  return std::string{};
29  }
30  return found->first;
31 }

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

◆ 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.

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 }

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

◆ Instance()

VertexFitterManager & VertexFitterManager::Instance ( )
static

Definition at line 49 of file VertexFitterManager.cc.

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 }

References CMS_THREAD_SAFE, and electrons_cff::singleton.

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

◆ registerFitter()

void VertexFitterManager::registerFitter ( const std::string &  name,
std::function< AbstractConfFitter *()>  o,
const std::string &  description 
)

Definition at line 8 of file VertexFitterManager.cc.

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 }

References ztail::d, VertexRecoManager::Instance(), eostools::move(), Skims_PA_cff::name, EcalTangentSkim_cfg::o, VertexRecoManager::registerReconstructor(), and OrderedSet::t.

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

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.

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
mps_fire.i
i
Definition: mps_fire.py:355
VertexFitterManager::theAbstractConfFitters
std::map< std::string, std::function< AbstractConfFitter *()> > theAbstractConfFitters
Definition: VertexFitterManager.h:30
gather_cfg.cout
cout
Definition: gather_cfg.py:144
VertexFitterManager::VertexFitterManager
VertexFitterManager()
Definition: VertexFitterManager.cc:75
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
AbstractConfReconstructor
Definition: AbstractConfReconstructor.h:12
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
alignCSCRings.s
s
Definition: alignCSCRings.py:92
VertexRecoManager::Instance
static VertexRecoManager & Instance()
Definition: VertexRecoManager.cc:39
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
OrderedSet.t
t
Definition: OrderedSet.py:90
ReconstructorFromFitter
Definition: ReconstructorFromFitter.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
VertexFitterManager::theDescription
std::map< std::string, std::string > theDescription
Definition: VertexFitterManager.h:31
VertexFitterManager
Definition: VertexFitterManager.h:15
eostools.move
def move(src, dest)
Definition: eostools.py:511
electrons_cff.singleton
singleton
Definition: electrons_cff.py:353
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ztail.d
d
Definition: ztail.py:151
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
VertexRecoManager::registerReconstructor
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
Definition: VertexRecoManager.cc:6