CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
VertexRecoManager Class Reference

#include <VertexRecoManager.h>

Public Member Functions

VertexRecoManagerclone () const
 
std::string describe (const std::string &) const
 
std::unique_ptr< AbstractConfReconstructorget (const std::string &) const
 
std::vector< std::string > getNames () const
 
void registerReconstructor (const std::string &name, std::function< AbstractConfReconstructor *()> o, const std::string &description)
 
 ~VertexRecoManager ()
 

Static Public Member Functions

static VertexRecoManagerInstance ()
 

Private Member Functions

 VertexRecoManager (const VertexRecoManager &)
 
 VertexRecoManager ()
 

Private Attributes

std::map< std::string, std::function< AbstractConfReconstructor *()> > theAbstractConfReconstructors
 
std::map< std::string, std::string > theDescription
 

Detailed Description

Class that manages the vertex reconstruction strategies

Definition at line 14 of file VertexRecoManager.h.

Constructor & Destructor Documentation

VertexRecoManager::~VertexRecoManager ( )

Definition at line 12 of file VertexRecoManager.cc.

13 {
14 }
VertexRecoManager::VertexRecoManager ( const VertexRecoManager o)
private

Definition at line 30 of file VertexRecoManager.cc.

References gather_cfg::cout, and cmsRelvalreport::exit.

31 {
32  std::cout << "[VertexRecoManager] copy constructor! Error!" << std::endl;
33  exit(0);
34  /*
35  for ( map < string, AbstractConfReconstructor * >::const_iterator i=o.theAbstractConfReconstructors.begin();
36  i!=o.theAbstractConfReconstructors.end() ; ++i )
37  {
38  theAbstractConfReconstructors[ i->first ] = i->second->clone();
39  }
40 
41  theIsEnabled=o.theIsEnabled;
42  */
43 }
VertexRecoManager::VertexRecoManager ( )
private

Definition at line 72 of file VertexRecoManager.cc.

73 {}

Member Function Documentation

VertexRecoManager * VertexRecoManager::clone ( void  ) const

Definition at line 25 of file VertexRecoManager.cc.

26 {
27  return new VertexRecoManager ( * this );
28 }
std::string VertexRecoManager::describe ( const std::string &  d) const

Definition at line 16 of file VertexRecoManager.cc.

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

17 {
18  auto found = theDescription.find(d);
19  if(found == theDescription.end()) {
20  return std::string();
21  }
22  return found->second;
23 }
std::map< std::string, std::string > theDescription
std::unique_ptr< AbstractConfReconstructor > VertexRecoManager::get ( const std::string &  ) const

Definition at line 53 of file VertexRecoManager.cc.

References runEdmFileComparison::found.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), ConfigurableVertexReconstructor::ConfigurableVertexReconstructor(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

54 {
56  if( found == theAbstractConfReconstructors.end()) {
57  return std::unique_ptr<AbstractConfReconstructor>{};
58  }
59  return std::unique_ptr<AbstractConfReconstructor>{found->second()};
60 }
std::map< std::string, std::function< AbstractConfReconstructor *()> > theAbstractConfReconstructors
std::vector< std::string > VertexRecoManager::getNames ( ) const

Definition at line 62 of file VertexRecoManager.cc.

References mps_fire::i.

63 {
64  std::vector<std::string> ret;
65  ret.reserve(theAbstractConfReconstructors.size());
66  for(const auto& i : theAbstractConfReconstructors ) {
67  ret.push_back(i.first);
68  }
69  return ret;
70 }
std::map< std::string, std::function< AbstractConfReconstructor *()> > theAbstractConfReconstructors
VertexRecoManager & VertexRecoManager::Instance ( )
static

Definition at line 45 of file VertexRecoManager.cc.

References electrons_cff::singleton.

Referenced by ConfigurableVertexReconstructor::ConfigurableVertexReconstructor(), ConfRecoBuilder< O >::ConfRecoBuilder(), and VertexFitterManager::registerFitter().

46 {
47  //The singleton's internal structure only changes while
48  // this library is being loaded. All other methods are const.
49  [[cms::thread_safe]] static VertexRecoManager singleton;
50  return singleton;
51 }
void VertexRecoManager::registerReconstructor ( const std::string &  name,
std::function< AbstractConfReconstructor *()>  o,
const std::string &  description 
)

Definition at line 5 of file VertexRecoManager.cc.

References edmIntegrityCheck::d, dataset::name, and connectstrParser::o.

Referenced by ConfRecoBuilder< O >::ConfRecoBuilder(), and VertexFitterManager::registerFitter().

7 {
10 }
std::map< std::string, std::function< AbstractConfReconstructor *()> > theAbstractConfReconstructors
std::map< std::string, std::string > theDescription

Member Data Documentation

std::map< std::string, std::function<AbstractConfReconstructor*()> > VertexRecoManager::theAbstractConfReconstructors
private

Definition at line 31 of file VertexRecoManager.h.

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

Definition at line 32 of file VertexRecoManager.h.