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
SiStripRawProcessingFactory Class Reference

#include <SiStripRawProcessingFactory.h>

Static Public Member Functions

static std::auto_ptr
< SiStripRawProcessingAlgorithms
create (const edm::ParameterSet &)
 
static bool create_doAPVRestorer (const edm::ParameterSet &)
 
static std::auto_ptr
< SiStripAPVRestorer
create_Restorer (const edm::ParameterSet &)
 
static std::auto_ptr
< SiStripCommonModeNoiseSubtractor
create_SubtractorCMN (const edm::ParameterSet &)
 
static std::auto_ptr
< SiStripPedestalsSubtractor
create_SubtractorPed (const edm::ParameterSet &)
 
static std::auto_ptr
< SiStripFedZeroSuppression
create_Suppressor (const edm::ParameterSet &)
 
static bool create_useCMMeanMap (const edm::ParameterSet &)
 

Detailed Description

Definition at line 12 of file SiStripRawProcessingFactory.h.

Member Function Documentation

std::auto_ptr< SiStripRawProcessingAlgorithms > SiStripRawProcessingFactory::create ( const edm::ParameterSet conf)
static

Definition at line 15 of file SiStripRawProcessingFactory.cc.

References create_doAPVRestorer(), create_Restorer(), create_SubtractorCMN(), create_SubtractorPed(), create_Suppressor(), and create_useCMMeanMap().

15  {
16  return std::auto_ptr<SiStripRawProcessingAlgorithms>(
20  create_Suppressor(conf),
21  create_Restorer(conf),
23  create_useCMMeanMap(conf)));
24 }
static std::auto_ptr< SiStripFedZeroSuppression > create_Suppressor(const edm::ParameterSet &)
static bool create_useCMMeanMap(const edm::ParameterSet &)
static std::auto_ptr< SiStripCommonModeNoiseSubtractor > create_SubtractorCMN(const edm::ParameterSet &)
static std::auto_ptr< SiStripAPVRestorer > create_Restorer(const edm::ParameterSet &)
static bool create_doAPVRestorer(const edm::ParameterSet &)
static std::auto_ptr< SiStripPedestalsSubtractor > create_SubtractorPed(const edm::ParameterSet &)
bool SiStripRawProcessingFactory::create_doAPVRestorer ( const edm::ParameterSet conf)
static

Definition at line 26 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create().

26  {
27  bool doAPVRestore = conf.getParameter<bool>("doAPVRestore");
28  return doAPVRestore;
29 }
T getParameter(std::string const &) const
std::auto_ptr< SiStripAPVRestorer > SiStripRawProcessingFactory::create_Restorer ( const edm::ParameterSet conf)
static

Definition at line 88 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::exists().

Referenced by create().

88  {
89  if(!conf.exists("APVRestoreMode")) {
90  return std::auto_ptr<SiStripAPVRestorer>( 0 );
91  } else {
92  return std::auto_ptr<SiStripAPVRestorer> (new SiStripAPVRestorer(conf));
93  }
94 }
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::auto_ptr< SiStripCommonModeNoiseSubtractor > SiStripRawProcessingFactory::create_SubtractorCMN ( const edm::ParameterSet conf)
static

Definition at line 43 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), universalConfigTemplate::mode, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by create().

43  {
44  std::string mode = conf.getParameter<std::string>("CommonModeNoiseSubtractionMode");
45 
46  if ( mode == "Median")
47  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new MedianCMNSubtractor() );
48 
49  if ( mode == "Percentile") {
50  double percentile = conf.getParameter<double>("Percentile");
51  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new PercentileCMNSubtractor(percentile) );
52  }
53 
54  if ( mode == "IteratedMedian") {
55  double cutToAvoidSignal = conf.getParameter<double>("CutToAvoidSignal");
56  int iterations = conf.getParameter<int>("Iterations");
57  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new IteratedMedianCMNSubtractor(cutToAvoidSignal,iterations) );
58  }
59 
60  if ( mode == "FastLinear")
61  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new FastLinearCMNSubtractor() );
62 
63  if ( mode == "TT6") {
64  double cutToAvoidSignal = conf.getParameter<double>("CutToAvoidSignal");
65  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new TT6CMNSubtractor(cutToAvoidSignal) );
66  }
67 
68  edm::LogError("SiStripRawProcessingFactory::create_SubtractorCMN")
69  << "Unregistered Algorithm: "<<mode<<". Use one of {Median, Percentile, IteratedMedian, FastLinear, TT6}";
70  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new MedianCMNSubtractor() );
71 }
T getParameter(std::string const &) const
std::auto_ptr< SiStripPedestalsSubtractor > SiStripRawProcessingFactory::create_SubtractorPed ( const edm::ParameterSet conf)
static

Definition at line 37 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create().

37  {
38  bool fedMode = conf.getParameter<bool>("PedestalSubtractionFedMode");
39  return std::auto_ptr<SiStripPedestalsSubtractor>( new SiStripPedestalsSubtractor(fedMode) );
40 }
T getParameter(std::string const &) const
std::auto_ptr< SiStripFedZeroSuppression > SiStripRawProcessingFactory::create_Suppressor ( const edm::ParameterSet conf)
static

Definition at line 74 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), universalConfigTemplate::mode, and estimatePileup_makeJSON::trunc.

Referenced by create().

74  {
75  uint32_t mode = conf.getParameter<uint32_t>("SiStripFedZeroSuppressionMode");
76  bool trunc = conf.getParameter<bool>("TruncateInSuppressor");
77  switch(mode) {
78  case 1: case 2: case 3: case 4:
79  return std::auto_ptr<SiStripFedZeroSuppression>( new SiStripFedZeroSuppression(mode,trunc));
80  default:
81  edm::LogError("SiStripRawProcessingFactory::createSuppressor")
82  << "Unregistered mode: "<<mode<<". Use one of {1,2,3,4}.";
83  return std::auto_ptr<SiStripFedZeroSuppression>( new SiStripFedZeroSuppression(4,true));
84  }
85 }
T getParameter(std::string const &) const
bool SiStripRawProcessingFactory::create_useCMMeanMap ( const edm::ParameterSet conf)
static

Definition at line 31 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create().

31  {
32  bool useCMMeanMap = conf.getParameter<bool>("useCMMeanMap");
33  return useCMMeanMap;
34 }
T getParameter(std::string const &) const