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 10 of file StripClusterizerAlgorithmFactory.cc.

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

Referenced by SiStripClusterInfo::reclusterize().

10  {
11  std::string algorithm = conf.getParameter<std::string>("Algorithm");
12 
13  bool setDetId=false;
14  if (conf.exists("setDetId"))
15  setDetId = conf.getParameter<bool>("setDetId");
16  if(algorithm == "ThreeThresholdAlgorithm") {
17  return std::auto_ptr<StripClusterizerAlgorithm>(
19  conf.getParameter<double>("ChannelThreshold"),
20  conf.getParameter<double>("SeedThreshold"),
21  conf.getParameter<double>("ClusterThreshold"),
22  conf.getParameter<unsigned>("MaxSequentialHoles"),
23  conf.getParameter<unsigned>("MaxSequentialBad"),
24  conf.getParameter<unsigned>("MaxAdjacentBad"),
25  conf.getParameter<std::string>("QualityLabel"),
26  setDetId,
27  conf.getParameter<bool>("RemoveApvShots"),
28  clusterChargeCut(conf)
29  ));
30  }
31 
32  if(algorithm == "OldThreeThresholdAlgorithm") {
33  return std::auto_ptr<StripClusterizerAlgorithm>(
35  conf.getParameter<double>("ChannelThreshold"),
36  conf.getParameter<double>("SeedThreshold"),
37  conf.getParameter<double>("ClusterThreshold"),
38  conf.getParameter<unsigned>("MaxSequentialHoles"),
39  conf.getParameter<std::string>("QualityLabel"),
40  setDetId));
41  }
42 
43  throw cms::Exception("[StripClusterizerAlgorithmFactory] Unregistered Algorithm")
44  << algorithm << " is not a registered StripClusterizerAlgorithm";
45 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")