CMS 3D CMS Logo

VertexFitterManager.cc
Go to the documentation of this file.
5 
6 using namespace std;
7 
9  theAbstractConfFitters[name] = o;
10  theDescription[name] = d;
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 }
22 
24 
26  auto found = theDescription.find(d);
27  if (found == theDescription.end()) {
28  return std::string{};
29  }
30  return found->first;
31 }
32 
34 
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 }
48 
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 }
56 
57 std::unique_ptr<AbstractConfFitter> VertexFitterManager::get(const string& s) const {
58  auto found = theAbstractConfFitters.find(s);
59  if (found == theAbstractConfFitters.end()) {
60  return std::unique_ptr<AbstractConfFitter>{};
61  }
62  return std::unique_ptr<AbstractConfFitter>{found->second()};
63 }
64 
65 std::vector<std::string> VertexFitterManager::getNames() const {
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 }
74 
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
mps_fire.i
i
Definition: mps_fire.py:428
gather_cfg.cout
cout
Definition: gather_cfg.py:144
VertexFitterManager::VertexFitterManager
VertexFitterManager()
Definition: VertexFitterManager.cc:75
VertexFitterManager::registerFitter
void registerFitter(const std::string &name, std::function< AbstractConfFitter *()> o, const std::string &description)
Definition: VertexFitterManager.cc:8
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
VertexFitterManager::get
std::unique_ptr< AbstractConfFitter > get(const std::string &) const
Definition: VertexFitterManager.cc:57
VertexRecoManager.h
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
ReconstructorFromFitter
Definition: ReconstructorFromFitter.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ReconstructorFromFitter.h
thread_safety_macros.h
VertexFitterManager
Definition: VertexFitterManager.h:15
VertexFitterManager::getNames
std::vector< std::string > getNames() const
Definition: VertexFitterManager.cc:65
VertexFitterManager::describe
std::string describe(const std::string &) const
Definition: VertexFitterManager.cc:25
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
AbstractConfFitter
Definition: AbstractConfFitter.h:12
VertexFitterManager.h
electrons_cff.singleton
singleton
Definition: electrons_cff.py:374
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
VertexFitterManager::~VertexFitterManager
~VertexFitterManager()
Definition: VertexFitterManager.cc:23
ztail.d
d
Definition: ztail.py:151
VertexFitterManager::Instance
static VertexFitterManager & Instance()
Definition: VertexFitterManager.cc:49
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
VertexRecoManager::registerReconstructor
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
Definition: VertexRecoManager.cc:6
VertexFitterManager::clone
VertexFitterManager * clone() const
Definition: VertexFitterManager.cc:33