00001 // Created by Markus Klute on 2007 Jan 29. 00002 // $Id: Configurator.cc,v 1.2 2008/03/10 14:50:08 biery Exp $ 00003 00004 #include <EventFilter/StorageManager/interface/Configurator.h> 00005 00006 using stor::Configurator; 00007 using stor::Parameter; 00008 using boost::shared_ptr; 00009 using std::string; 00010 00011 shared_ptr<Configurator> Configurator::theInstance_; 00012 boost::mutex Configurator::singletonLock_; 00013 00014 Configurator::Configurator() 00015 { 00016 param_ = shared_ptr<Parameter>(new Parameter()); 00017 } 00018 00019 shared_ptr<Configurator> Configurator::instance() 00020 { 00021 boost::mutex::scoped_lock sl(singletonLock_); 00022 if (theInstance_.get() == NULL) { 00023 theInstance_.reset(new Configurator()); 00024 } 00025 return theInstance_; 00026 } 00027 00028 shared_ptr<Parameter> Configurator::getParameter() 00029 { 00030 return param_; 00031 }