CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripClusterizerFromRaw Class Referencefinal
Inheritance diagram for SiStripClusterizerFromRaw:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &es) override
 
void produce (edm::Event &ev, const edm::EventSetup &es) override
 
 SiStripClusterizerFromRaw (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void initialize (const edm::EventSetup &es)
 
void run (const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
 

Private Attributes

SiStripDetCabling const * cabling_
 
std::unique_ptr< StripClusterizerAlgorithmclusterizer_
 
bool doAPVEmulatorCheck_
 
bool hybridZeroSuppressed_
 
bool legacy_
 
bool onDemand
 
edm::EDGetTokenT< FEDRawDataCollectionproductToken_
 
std::unique_ptr< SiStripRawProcessingAlgorithmsrawAlgos_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 173 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

SiStripClusterizerFromRaw::SiStripClusterizerFromRaw ( const edm::ParameterSet conf)
inlineexplicit

Definition at line 175 of file ClustersFromRawProducer.cc.

References edm::ParameterSet::getParameter().

176  : onDemand(conf.getParameter<bool>("onDemand")),
177  cabling_(nullptr),
180  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck")
181  : true),
182  legacy_(conf.existsAs<bool>("LegacyUnpacker") ? conf.getParameter<bool>("LegacyUnpacker") : false),
183  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed")) {
184  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
185  produces<edmNew::DetSetVector<SiStripCluster> >();
186  assert(clusterizer_.get());
187  assert(rawAlgos_.get());
188  }
T getParameter(std::string const &) const
static std::unique_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
static std::unique_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &)
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
SiStripDetCabling const * cabling_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
edm::EDGetTokenT< FEDRawDataCollection > productToken_

Member Function Documentation

void SiStripClusterizerFromRaw::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
inlineoverride

Definition at line 190 of file ClustersFromRawProducer.cc.

References initialize().

190 { initialize(es); }
void initialize(const edm::EventSetup &es)
void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 245 of file ClustersFromRawProducer.cc.

245  {
246  (*clusterizer_).initialize(es);
247  cabling_ = (*clusterizer_).cabling();
248  (*rawAlgos_).initialize(es);
249 }
SiStripDetCabling const * cabling_
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverride

Definition at line 192 of file ClustersFromRawProducer.cc.

References COUT, edm::Event::getByToken(), initialize(), eostools::move(), HLT_2018_cff::onDemand, convertSQLitetoXML_cfg::output, edm::Event::put(), l1tstage2_dqm_sourceclient-live_cfg::rawData, and writedatasetfile::run.

192  {
193  initialize(es);
194 
195  // get raw data
197  ev.getByToken(productToken_, rawData);
198 
199  std::unique_ptr<edmNew::DetSetVector<SiStripCluster> > output(
201  std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(
203  clusterizer_->allDetIds())
205 
206  if (onDemand)
207  assert(output->onDemand());
208 
209  output->reserve(15000, 24 * 10000);
210 
211  if (!onDemand) {
212  run(*rawData, *output);
213  output->shrink_to_fit();
214  COUT << output->dataSize() << " clusters from " << output->size() << " modules" << std::endl;
215  }
216 
217  ev.put(std::move(output));
218  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
void initialize(const edm::EventSetup &es)
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
#define COUT
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
edm::EDGetTokenT< FEDRawDataCollection > productToken_
def move(src, dest)
Definition: eostools.py:511
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 251 of file ClustersFromRawProducer.cc.

References edmNew::DetSetVector< T >::TSFastFiller::abort(), SiStripDigi::adc(), sistrip::FEDRawChannelUnpacker::adc(), begin, edm::DetSet< T >::begin(), edmScanValgrind::buffer, officialStyle::chan, sistrip::FEDBufferBase::channel(), sistrip::FEDBuffer::channelGood(), GetRecoTauVFromDQM_MC_cff::cl, HLT_2018_cff::clusterizer, SiStripCommissioningClient_cfg::conn, filterCSVwithJSON::copy, COUT, fileCollector::done, MillePedeFileConverter_cfg::e, edmNew::DetSetVector< T >::TSFastFiller::empty(), end, edm::DetSet< T >::end(), JetChargeProducer_cfi::exp, l1tstage2_dqm_sourceclient-live_cfg::fedId, ntuplemaker::fill, trigObjTnPSource_cfi::filler, edmNew::DetSetVector< T >::TSFastFiller::full(), sistrip::FEDRawChannelUnpacker::hasData(), mps_fire::i, edmNew::DetSetVector< T >::TSFastFiller::id(), edm::isDebugEnabled(), sistrip::FEDBufferBase::legacyReadoutMode(), LIKELY, sistrip::mlRawToCluster_, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, operator*(), CfgNavigationSchool_cfi::OUT, MillePedeFileConverter_cfg::out, sistrip::PACKET_CODE_VIRGIN_RAW, sistrip::PACKET_CODE_VIRGIN_RAW10, sistrip::PACKET_CODE_VIRGIN_RAW8_BOTBOT, sistrip::PACKET_CODE_VIRGIN_RAW8_TOPBOT, sistrip::PACKET_CODE_ZERO_SUPPRESSED, sistrip::PACKET_CODE_ZERO_SUPPRESSED10, sistrip::PACKET_CODE_ZERO_SUPPRESSED8_BOTBOT, sistrip::PACKET_CODE_ZERO_SUPPRESSED8_TOPBOT, sistrip::FEDChannel::packetCode(), sistrip::FEDRawChannelUnpacker::procRawModeUnpacker(), sistrip::READOUT_MODE_LEGACY_INVALID, sistrip::READOUT_MODE_LEGACY_PROC_RAW_FAKE, sistrip::READOUT_MODE_LEGACY_PROC_RAW_REAL, sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_FAKE, sistrip::READOUT_MODE_LEGACY_VIRGIN_RAW_REAL, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_FAKE, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_FAKE, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_LITE_REAL, sistrip::READOUT_MODE_LEGACY_ZERO_SUPPRESSED_REAL, sistrip::READOUT_MODE_PROC_RAW, sistrip::READOUT_MODE_SPY, sistrip::READOUT_MODE_VIRGIN_RAW, Phase2Tracker::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_FAKE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_BOTBOT_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_CMOVERRIDE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8_TOPBOT_CMOVERRIDE, sistrip::FEDBufferBase::readoutMode(), record, RecoTauValidation_cfi::reference, edm::DetSet< T >::reserve(), EgammaValidation_cff::samples, sistrip::FEDBuffer::setLegacyMode(), edmNew::DetSetVector< T >::TSFastFiller::size(), contentValuesCheck::ss, SiStripDigi::strip(), UNLIKELY, sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(), sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(), cms::Exception::what(), testProducerWithPsetDescEmpty_cfi::x1, sistrip::FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(), and sistrip::FEDZSChannelUnpacker::zeroSuppressedModeUnpacker().

251  {
253 
254  // loop over good det in cabling
255  for (auto idet : clusterizer_->allDetIds()) {
257 
258  filler.fill(record);
259 
260  if (record.empty())
261  record.abort();
262 
263  } // end loop over dets
264 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_

Member Data Documentation

SiStripDetCabling const* SiStripClusterizerFromRaw::cabling_
private

Definition at line 230 of file ClustersFromRawProducer.cc.

std::unique_ptr<StripClusterizerAlgorithm> SiStripClusterizerFromRaw::clusterizer_
private

Definition at line 232 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 236 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 239 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 238 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 226 of file ClustersFromRawProducer.cc.

edm::EDGetTokenT<FEDRawDataCollection> SiStripClusterizerFromRaw::productToken_
private

Definition at line 228 of file ClustersFromRawProducer.cc.

std::unique_ptr<SiStripRawProcessingAlgorithms> SiStripClusterizerFromRaw::rawAlgos_
private

Definition at line 233 of file ClustersFromRawProducer.cc.