CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
StripClusterizerAlgorithmFactory Class Reference

#include <StripClusterizerAlgorithmFactory.h>

Static Public Member Functions

static std::auto_ptr
< StripClusterizerAlgorithm
create (const edm::ParameterSet &)
 

Detailed Description

Definition at line 8 of file StripClusterizerAlgorithmFactory.h.

Member Function Documentation

std::auto_ptr< StripClusterizerAlgorithm > StripClusterizerAlgorithmFactory::create ( const edm::ParameterSet conf)
static

Definition at line 9 of file StripClusterizerAlgorithmFactory.cc.

References IterativeInitialStep_cff::algorithm, edm::hlt::Exception, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripClusterInfo::reclusterize().

9  {
10  std::string algorithm = conf.getParameter<std::string>("Algorithm");
11 
12  bool setDetId=false;
13  if (conf.exists("setDetId"))
14  setDetId = conf.getParameter<bool>("setDetId");
15  if(algorithm == "ThreeThresholdAlgorithm") {
16  return std::auto_ptr<StripClusterizerAlgorithm>(
18  conf.getParameter<double>("ChannelThreshold"),
19  conf.getParameter<double>("SeedThreshold"),
20  conf.getParameter<double>("ClusterThreshold"),
21  conf.getParameter<unsigned>("MaxSequentialHoles"),
22  conf.getParameter<unsigned>("MaxSequentialBad"),
23  conf.getParameter<unsigned>("MaxAdjacentBad"),
24  conf.getParameter<std::string>("QualityLabel"),
25  setDetId,
26  conf.getParameter<bool>("RemoveApvShots"),
27  conf.existsAs<double>("minGoodCharge") ? conf.getParameter<double>("minGoodCharge") : -2069.
28  ));
29  }
30 
31  if(algorithm == "OldThreeThresholdAlgorithm") {
32  return std::auto_ptr<StripClusterizerAlgorithm>(
34  conf.getParameter<double>("ChannelThreshold"),
35  conf.getParameter<double>("SeedThreshold"),
36  conf.getParameter<double>("ClusterThreshold"),
37  conf.getParameter<unsigned>("MaxSequentialHoles"),
38  conf.getParameter<std::string>("QualityLabel"),
39  setDetId));
40  }
41 
42  throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm")
43  << algorithm << " is not a registered StripClusterizerAlgorithm";
44 }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:184
bool exists(std::string const &parameterName) const
checks if a parameter exists