![]() |
![]() |
#include <CommonTools/SiStripClusterization/interface/SiStripClusterizerFactory.h>
Public Types | |
typedef std::list< std::string > | RegisteredAlgorithms |
Public Member Functions | |
SiStripClusterizerAlgo *const | algorithm () const |
Access to the algorithm object. | |
void | clusterize (const edm::DetSet< SiStripRawDigi > &raw_digis, edm::DetSetVector< SiStripCluster > &clusters) |
Clusterization from raw data for a single DetId. | |
void | clusterize (const edm::DetSetVector< SiStripRawDigi > &raw_digis, edm::DetSetVector< SiStripCluster > &clusters) |
Clusterization from raw data for several DetIds. | |
void | clusterize (const edm::DetSet< SiStripDigi > &digis, edm::DetSetVector< SiStripCluster > &clusters) |
Clusterization from zero-suppressed data for a single DetId. | |
void | clusterize (const edm::DetSetVector< SiStripDigi > &digis, edm::DetSetVector< SiStripCluster > &clusters) |
Clusterization from zero-suppressed data for several DetIds. | |
void | eventSetup (const edm::EventSetup &) |
Provides access to calibration constants for algorithm. | |
SiStripClusterizerFactory (const edm::ParameterSet &) | |
~SiStripClusterizerFactory () | |
Private Attributes | |
SiStripClusterizerAlgo * | algorithm_ |
RegisteredAlgorithms | algorithms_ |
SiStripZeroSuppressorFactory * | factory_ |
Factory for clusterization algorithms.
Definition at line 21 of file SiStripClusterizerFactory.h.
typedef std::list<std::string> SiStripClusterizerFactory::RegisteredAlgorithms |
Definition at line 25 of file SiStripClusterizerFactory.h.
SiStripClusterizerFactory::SiStripClusterizerFactory | ( | const edm::ParameterSet & | pset | ) |
Definition at line 7 of file SiStripClusterizerFactory.cc.
References algorithm_, factory_, edm::ParameterSet::getUntrackedParameter(), and NULL.
00008 : algorithms_(), 00009 algorithm_(0), 00010 factory_(0) 00011 { 00012 00013 // Create clusterizer algorithm object 00014 std::string algo = pset.getUntrackedParameter<std::string>("ClusterizerAlgorithm","DummyAlgorithm"); 00015 if ( algo == "DummyAlgorithm" ) { 00016 algorithm_ = new SiStripDummyAlgo(pset); 00017 } else if ( algo == "FrontEndDriver" ) { 00018 algorithm_ = new SiStripFrontEndDriverAlgo(pset); 00019 } else if ( algo == "ThreeThreshold" ) { 00020 algorithm_ = new SiStripThreeThresholdAlgo(pset); 00021 } else { 00022 edm::LogWarning("UNDEFINED_CATEGORY") 00023 << "[SiStripClusterizerFactory::" << __func__ << "]" 00024 << " Unknown clusterizer specified in .cfg file: \"" 00025 << algo 00026 << "\". Defaulting to 'FrontEndDriver' algorithm..."; 00027 algorithm_ = new SiStripFrontEndDriverAlgo(pset); 00028 } 00029 00030 // Create zero-suppressor factory 00031 bool zero_suppr = pset.getUntrackedParameter<bool>("PerformZeroSuppression",false); 00032 if ( zero_suppr ) { factory_ = NULL; } //@@ to come 00033 00034 }
SiStripClusterizerFactory::~SiStripClusterizerFactory | ( | ) |
Definition at line 36 of file SiStripClusterizerFactory.cc.
References algorithm_.
00036 { 00037 delete algorithm_; 00038 }
SiStripClusterizerAlgo *const SiStripClusterizerFactory::algorithm | ( | ) | const [inline] |
Access to the algorithm object.
Definition at line 59 of file SiStripClusterizerFactory.h.
References algorithm_.
Referenced by clusterize(), eventSetup(), and SiStripRawToClustersLazyUnpacker::fill().
00059 { return algorithm_; }
void SiStripClusterizerFactory::clusterize | ( | const edm::DetSet< SiStripRawDigi > & | raw_digis, | |
edm::DetSetVector< SiStripCluster > & | clusters | |||
) |
Clusterization from raw data for a single DetId.
Definition at line 54 of file SiStripClusterizerFactory.cc.
void SiStripClusterizerFactory::clusterize | ( | const edm::DetSetVector< SiStripRawDigi > & | raw_digis, | |
edm::DetSetVector< SiStripCluster > & | clusters | |||
) |
Clusterization from raw data for several DetIds.
Definition at line 52 of file SiStripClusterizerFactory.cc.
void SiStripClusterizerFactory::clusterize | ( | const edm::DetSet< SiStripDigi > & | digis, | |
edm::DetSetVector< SiStripCluster > & | clusters | |||
) |
Clusterization from zero-suppressed data for a single DetId.
Definition at line 48 of file SiStripClusterizerFactory.cc.
References algorithm(), and SiStripClusterizerAlgo::clusterize().
00048 { 00049 if (algorithm()) algorithm()->clusterize( digis, clusters ); 00050 }
void SiStripClusterizerFactory::clusterize | ( | const edm::DetSetVector< SiStripDigi > & | digis, | |
edm::DetSetVector< SiStripCluster > & | clusters | |||
) |
Clusterization from zero-suppressed data for several DetIds.
Definition at line 40 of file SiStripClusterizerFactory.cc.
References edm::DetSetVector< T >::begin(), and edm::DetSetVector< T >::end().
00040 { 00041 00042 edm::DetSetVector<SiStripDigi>::const_iterator idigis = digis.begin(); 00043 for ( ; idigis != digis.end(); idigis++ ) { 00044 clusterize( *idigis, clusters ); 00045 } 00046 }
void SiStripClusterizerFactory::eventSetup | ( | const edm::EventSetup & | setup | ) |
Provides access to calibration constants for algorithm.
Definition at line 56 of file SiStripClusterizerFactory.cc.
References algorithm(), and SiStripClusterizerAlgo::eventSetup().
Referenced by SiStripRawToClusters::beginRun(), and SiStripRawToClusters::produce().
00056 { 00057 if (algorithm()) algorithm()->eventSetup(setup); 00058 }
Definition at line 53 of file SiStripClusterizerFactory.h.
Referenced by algorithm(), SiStripClusterizerFactory(), and ~SiStripClusterizerFactory().
Definition at line 51 of file SiStripClusterizerFactory.h.
SiStripZeroSuppressorFactory* SiStripClusterizerFactory::factory_ [private] |
Definition at line 55 of file SiStripClusterizerFactory.h.
Referenced by SiStripClusterizerFactory().