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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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 191 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 195 of file ClustersFromRawProducer.cc.

References edm::ParameterSet::getParameter().

195  :
196  onDemand(conf.getParameter<bool>("onDemand")),
197  cabling_(nullptr),
200  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true),
201  legacy_(conf.existsAs<bool>("LegacyUnpacker") ? conf.getParameter<bool>("LegacyUnpacker") : false),
202  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed"))
203  {
204  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
205  produces< edmNew::DetSetVector<SiStripCluster> > ();
206  assert(clusterizer_.get());
207  assert(rawAlgos_.get());
208  }
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:161
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 211 of file ClustersFromRawProducer.cc.

References initialize().

211  {
212  initialize(es);
213  }
void initialize(const edm::EventSetup &es)
void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 284 of file ClustersFromRawProducer.cc.

284  {
285 
286  (*clusterizer_).initialize(es);
287  cabling_ = (*clusterizer_).cabling();
288  (*rawAlgos_).initialize(es);
289 
290 }
SiStripDetCabling const * cabling_
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverride

Definition at line 216 of file ClustersFromRawProducer.cc.

References COUT, edm::Event::getByToken(), initialize(), eostools::move(), hltSiStripClustersFromRaw_cfi::onDemand, convertSQLitetoXML_cfg::output, edm::Event::put(), and writedatasetfile::run.

216  {
217 
218  initialize(es);
219 
220  // get raw data
222  ev.getByToken( productToken_, rawData);
223 
224 
225  std::unique_ptr< edmNew::DetSetVector<SiStripCluster> > output(
226  onDemand ?
229  std::make_shared<ClusterFiller>(*rawData, *clusterizer_, *rawAlgos_,
231  clusterizer_->allDetIds())
233  );
234 
235  if(onDemand) assert(output->onDemand());
236 
237  output->reserve(15000,24*10000);
238 
239 
240  if (!onDemand) {
241  run(*rawData, *output);
242  output->shrink_to_fit();
243  COUT << output->dataSize() << " clusters from "
244  << output->size() << " modules"
245  << std::endl;
246  }
247 
248  ev.put(std::move(output));
249 
250  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
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 292 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, inclusiveNegativeVertexing_cff::clusterizer, popcon2dropbox::copy(), COUT, MillePedeFileConverter_cfg::e, edmNew::DetSetVector< T >::TSFastFiller::empty(), end, edm::DetSet< T >::end(), JetChargeProducer_cfi::exp, l1t::stage2::layer2::fedId, lumiContext::fill, objects.autophobj::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(), hcalTTPDigis_cfi::samples, sistrip::FEDBuffer::setLegacyMode(), edmNew::DetSetVector< T >::TSFastFiller::size(), SiStripDigi::strip(), UNLIKELY, sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(), sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(), cms::Exception::what(), globals_cff::x1, sistrip::FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(), and sistrip::FEDZSChannelUnpacker::zeroSuppressedModeUnpacker().

293  {
294 
296 
297  // loop over good det in cabling
298  for ( auto idet : clusterizer_->allDetIds()) {
299 
301 
302  filler.fill(record);
303 
304  if(record.empty()) record.abort();
305 
306  } // end loop over dets
307 }
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 265 of file ClustersFromRawProducer.cc.

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

Definition at line 267 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 272 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 275 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 274 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 261 of file ClustersFromRawProducer.cc.

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

Definition at line 263 of file ClustersFromRawProducer.cc.

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

Definition at line 268 of file ClustersFromRawProducer.cc.