CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoVertex/ConfigurableVertexReco/src/VertexRecoManager.cc

Go to the documentation of this file.
00001 #include "RecoVertex/ConfigurableVertexReco/interface/VertexRecoManager.h"
00002 
00003 using namespace std;
00004 
00005 void VertexRecoManager::registerReconstructor (
00006     const string & name, AbstractConfReconstructor * o, const string & d )
00007 {
00008   theAbstractConfReconstructors[name]=o;
00009   theDescription[name]=d;
00010 }
00011 
00012 VertexRecoManager::~VertexRecoManager()
00013 {
00014   // why should we delete?
00015   /*
00016   for ( map < string, AbstractConfReconstructor * >::iterator i=theAbstractConfReconstructors.begin(); 
00017         i!=theAbstractConfReconstructors.end() ; ++i )
00018   {
00019     delete i->second;
00020   }*/
00021 }
00022 
00023 std::string VertexRecoManager::describe ( const std::string & d )
00024 {
00025   return theDescription[d];
00026 }
00027 
00028 VertexRecoManager * VertexRecoManager::clone() const
00029 {
00030   return new VertexRecoManager ( * this );
00031 }
00032 
00033 VertexRecoManager::VertexRecoManager ( const VertexRecoManager & o ) 
00034 {
00035   std::cout << "[VertexRecoManager] copy constructor! Error!" << std::endl;
00036   exit(0);
00037   /*
00038   for ( map < string, AbstractConfReconstructor * >::const_iterator i=o.theAbstractConfReconstructors.begin(); 
00039         i!=o.theAbstractConfReconstructors.end() ; ++i )
00040   {
00041     theAbstractConfReconstructors[ i->first ] = i->second->clone();
00042   }
00043   
00044   theIsEnabled=o.theIsEnabled;
00045   */
00046 }
00047 
00048 VertexRecoManager & VertexRecoManager::Instance()
00049 {
00050   static VertexRecoManager singleton;
00051   return singleton;
00052 }
00053 
00054 AbstractConfReconstructor * VertexRecoManager::get ( const string & s )
00055 {
00056   return theAbstractConfReconstructors[s];
00057 }
00058 
00059 map < string, AbstractConfReconstructor * > VertexRecoManager::get()
00060 {
00061   return theAbstractConfReconstructors;
00062 }
00063 
00064 VertexRecoManager::VertexRecoManager()
00065 {}