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 13 of file VertexRecoManager.cc.

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

Definition at line 31 of file VertexRecoManager.cc.

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

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

Definition at line 73 of file VertexRecoManager.cc.

74 {}

Member Function Documentation

VertexRecoManager * VertexRecoManager::clone ( void  ) const

Definition at line 26 of file VertexRecoManager.cc.

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

Definition at line 17 of file VertexRecoManager.cc.

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

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

Definition at line 54 of file VertexRecoManager.cc.

References runEdmFileComparison::found.

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

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

Definition at line 63 of file VertexRecoManager.cc.

References mps_fire::i.

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

Definition at line 46 of file VertexRecoManager.cc.

References CMS_THREAD_SAFE, and electrons_cff::singleton.

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

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

Definition at line 6 of file VertexRecoManager.cc.

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

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

8 {
11 }
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.