CMS 3D CMS Logo

VertexRecoManager.cc
Go to the documentation of this file.
3 
4 using namespace std;
5 
8  const string& d) {
9  theAbstractConfReconstructors[name] = o;
10  theDescription[name] = d;
11 }
12 
14 
16  auto found = theDescription.find(d);
17  if (found == theDescription.end()) {
18  return std::string();
19  }
20  return found->second;
21 }
22 
24 
26  std::cout << "[VertexRecoManager] copy constructor! Error!" << std::endl;
27  exit(0);
28  /*
29  for ( map < string, AbstractConfReconstructor * >::const_iterator i=o.theAbstractConfReconstructors.begin();
30  i!=o.theAbstractConfReconstructors.end() ; ++i )
31  {
32  theAbstractConfReconstructors[ i->first ] = i->second->clone();
33  }
34 
35  theIsEnabled=o.theIsEnabled;
36  */
37 }
38 
40  //The singleton's internal structure only changes while
41  // this library is being loaded. All other methods are const.
43  return singleton;
44 }
45 
46 std::unique_ptr<AbstractConfReconstructor> VertexRecoManager::get(const string& s) const {
47  auto found = theAbstractConfReconstructors.find(s);
48  if (found == theAbstractConfReconstructors.end()) {
49  return std::unique_ptr<AbstractConfReconstructor>{};
50  }
51  return std::unique_ptr<AbstractConfReconstructor>{found->second()};
52 }
53 
54 std::vector<std::string> VertexRecoManager::getNames() const {
55  std::vector<std::string> ret;
56  ret.reserve(theAbstractConfReconstructors.size());
57  for (const auto& i : theAbstractConfReconstructors) {
58  ret.push_back(i.first);
59  }
60  return ret;
61 }
62 
VertexRecoManager * clone() const
ret
prodAgent to be discontinued
std::string describe(const std::string &) const
static VertexRecoManager & Instance()
std::unique_ptr< AbstractConfReconstructor > get(const std::string &) const
#define CMS_THREAD_SAFE
d
Definition: ztail.py:151
std::vector< std::string > getNames() const
void registerReconstructor(const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
def exit(msg="")