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 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 190 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 194 of file ClustersFromRawProducer.cc.

References edm::ParameterSet::getParameter().

194  :
195  onDemand(conf.getParameter<bool>("onDemand")),
196  cabling_(nullptr),
199  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true),
200  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed"))
201  {
202  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
203  produces< edmNew::DetSetVector<SiStripCluster> > ();
204  assert(clusterizer_.get());
205  assert(rawAlgos_.get());
206  }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
static std::unique_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &)
static std::auto_ptr< StripClusterizerAlgorithm > 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 209 of file ClustersFromRawProducer.cc.

References initialize().

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

Definition at line 281 of file ClustersFromRawProducer.cc.

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

Definition at line 214 of file ClustersFromRawProducer.cc.

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

214  {
215 
216  initialize(es);
217 
218  // get raw data
220  ev.getByToken( productToken_, rawData);
221 
222 
223  std::unique_ptr< edmNew::DetSetVector<SiStripCluster> > output(
224  onDemand ?
227  std::make_shared<ClusterFiller>(*rawData, *clusterizer_, *rawAlgos_,
229  clusterizer_->allDetIds())
231  );
232 
233  if(onDemand) assert(output->onDemand());
234 
235  output->reserve(15000,24*10000);
236 
237 
238  if (!onDemand) {
239  run(*rawData, *output);
240  output->shrink_to_fit();
241  COUT << output->dataSize() << " clusters from "
242  << output->size() << " modules"
243  << std::endl;
244  }
245 
246  ev.put(std::move(output));
247 
248  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
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:510
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 289 of file ClustersFromRawProducer.cc.

References 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, end, edm::DetSet< T >::end(), JetChargeProducer_cfi::exp, l1t::stage2::layer2::fedId, lumiContext::fill, objects.autophobj::filler, sistrip::FEDRawChannelUnpacker::hasData(), edm::isDebugEnabled(), 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_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(), SiStripDigi::strip(), edmNew::DetSetVector< SiStripCluster >::TSFastFiller, UNLIKELY, sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(), sistrip::FEDBSChannelUnpacker::virginRawModeUnpacker(), and cms::Exception::what().

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

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

Definition at line 265 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 270 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 272 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 259 of file ClustersFromRawProducer.cc.

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

Definition at line 261 of file ClustersFromRawProducer.cc.

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

Definition at line 266 of file ClustersFromRawProducer.cc.