CMS 3D CMS Logo

Static Public Member Functions

SiStripRawProcessingFactory Class Reference

#include <SiStripRawProcessingFactory.h>

List of all members.

Static Public Member Functions

static std::auto_ptr
< SiStripRawProcessingAlgorithms
create (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 &)

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_Restorer(), create_SubtractorCMN(), create_SubtractorPed(), and create_Suppressor().

                                    {
  return std::auto_ptr<SiStripRawProcessingAlgorithms>(
                   new SiStripRawProcessingAlgorithms(
                                                      create_SubtractorPed(conf),
                                                      create_SubtractorCMN(conf),
                                                      create_Suppressor(conf),
                                                      create_Restorer(conf) ));
}
std::auto_ptr< SiStripAPVRestorer > SiStripRawProcessingFactory::create_Restorer ( const edm::ParameterSet conf) [static]

Definition at line 76 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::exists().

Referenced by create().

                                              {
  if(!conf.exists("APVRestoreMode")) {
    return std::auto_ptr<SiStripAPVRestorer>( 0 );
  } else {
    return std::auto_ptr<SiStripAPVRestorer> (new SiStripAPVRestorer(conf));
  }
}
std::auto_ptr< SiStripCommonModeNoiseSubtractor > SiStripRawProcessingFactory::create_SubtractorCMN ( const edm::ParameterSet conf) [static]

Definition at line 31 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), and mode.

Referenced by create().

                                                  {
  std::string mode = conf.getParameter<std::string>("CommonModeNoiseSubtractionMode");

  if ( mode == "Median")
    return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new MedianCMNSubtractor() );

  if ( mode == "Percentile") {
    double percentile = conf.getParameter<double>("Percentile");
    return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new PercentileCMNSubtractor(percentile) );
  }

  if ( mode == "IteratedMedian") {
    double cutToAvoidSignal = conf.getParameter<double>("CutToAvoidSignal");
    int iterations = conf.getParameter<int>("Iterations");
    return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new IteratedMedianCMNSubtractor(cutToAvoidSignal,iterations) );
  }

  if ( mode == "FastLinear")
    return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new FastLinearCMNSubtractor() );

  if ( mode == "TT6") {
    double cutToAvoidSignal = conf.getParameter<double>("CutToAvoidSignal");
    return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new TT6CMNSubtractor(cutToAvoidSignal) );
  }
  
  edm::LogError("SiStripRawProcessingFactory::create_SubtractorCMN")
    << "Unregistered Algorithm: "<<mode<<". Use one of {Median, Percentile, IteratedMedian, FastLinear, TT6}";
  return std::auto_ptr<SiStripCommonModeNoiseSubtractor>( new MedianCMNSubtractor() );
}
std::auto_ptr< SiStripPedestalsSubtractor > SiStripRawProcessingFactory::create_SubtractorPed ( const edm::ParameterSet conf) [static]

Definition at line 25 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter().

Referenced by create(), and SiStripBaselineAnalyzer::SiStripBaselineAnalyzer().

                                                  {
  bool fedMode = conf.getParameter<bool>("PedestalSubtractionFedMode");
  return std::auto_ptr<SiStripPedestalsSubtractor>( new SiStripPedestalsSubtractor(fedMode) );
}
std::auto_ptr< SiStripFedZeroSuppression > SiStripRawProcessingFactory::create_Suppressor ( const edm::ParameterSet conf) [static]

Definition at line 62 of file SiStripRawProcessingFactory.cc.

References edm::ParameterSet::getParameter(), and mode.

Referenced by create().

                                               {
  uint32_t mode = conf.getParameter<uint32_t>("SiStripFedZeroSuppressionMode");
  bool trunc = conf.getParameter<bool>("TruncateInSuppressor");
  switch(mode) {
  case 1: case 2: case 3:  case 4:
    return std::auto_ptr<SiStripFedZeroSuppression>( new SiStripFedZeroSuppression(mode,trunc));
  default:
    edm::LogError("SiStripRawProcessingFactory::createSuppressor")
      << "Unregistered mode: "<<mode<<". Use one of {1,2,3,4}.";
    return std::auto_ptr<SiStripFedZeroSuppression>( new SiStripFedZeroSuppression(4,true));
  }
}