#include <StripClusterizerAlgorithmFactory.h>
Static Public Member Functions | |
static std::auto_ptr < StripClusterizerAlgorithm > | create (const edm::ParameterSet &) |
Definition at line 8 of file StripClusterizerAlgorithmFactory.h.
std::auto_ptr< StripClusterizerAlgorithm > StripClusterizerAlgorithmFactory::create | ( | const edm::ParameterSet & | conf | ) | [static] |
Definition at line 9 of file StripClusterizerAlgorithmFactory.cc.
References algorithm(), Exception, edm::ParameterSet::exists(), and edm::ParameterSet::getParameter().
{ std::string algorithm = conf.getParameter<std::string>("Algorithm"); bool setDetId=false; if (conf.exists("setDetId")) setDetId = conf.getParameter<bool>("setDetId"); if(algorithm == "ThreeThresholdAlgorithm") { return std::auto_ptr<StripClusterizerAlgorithm>( new ThreeThresholdAlgorithm( conf.getParameter<double>("ChannelThreshold"), conf.getParameter<double>("SeedThreshold"), conf.getParameter<double>("ClusterThreshold"), conf.getParameter<unsigned>("MaxSequentialHoles"), conf.getParameter<unsigned>("MaxSequentialBad"), conf.getParameter<unsigned>("MaxAdjacentBad"), conf.getParameter<std::string>("QualityLabel"), setDetId)); } if(algorithm == "OldThreeThresholdAlgorithm") { return std::auto_ptr<StripClusterizerAlgorithm>( new OldThreeThresholdAlgorithm( conf.getParameter<double>("ChannelThreshold"), conf.getParameter<double>("SeedThreshold"), conf.getParameter<double>("ClusterThreshold"), conf.getParameter<unsigned>("MaxSequentialHoles"), conf.getParameter<std::string>("QualityLabel"), setDetId)); } throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm") << algorithm << " is not a registered StripClusterizerAlgorithm"; }