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<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

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
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 186 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 190 of file ClustersFromRawProducer.cc.

References edm::ParameterSet::getParameter().

190  :
191  onDemand(conf.getParameter<bool>("onDemand")),
192  cabling_(nullptr),
195  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
196  {
197  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
198  produces< edmNew::DetSetVector<SiStripCluster> > ();
199  assert(clusterizer_.get());
200  assert(rawAlgos_.get());
201  }
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::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
static std::auto_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 204 of file ClustersFromRawProducer.cc.

References initialize().

204  {
205  initialize(es);
206  }
void initialize(const edm::EventSetup &es)
void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 273 of file ClustersFromRawProducer.cc.

273  {
274 
275  (*clusterizer_).initialize(es);
276  cabling_ = (*clusterizer_).cabling();
277  (*rawAlgos_).initialize(es);
278 
279 }
SiStripDetCabling const * cabling_
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverride

Definition at line 209 of file ClustersFromRawProducer.cc.

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

209  {
210 
211  initialize(es);
212 
213  // get raw data
215  ev.getByToken( productToken_, rawData);
216 
217 
218  std::unique_ptr< edmNew::DetSetVector<SiStripCluster> >
219  output( onDemand ?
220  new edmNew::DetSetVector<SiStripCluster>(std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(*rawData, *clusterizer_,
222  ),
223  clusterizer_->allDetIds())
225 
226  if(onDemand) assert(output->onDemand());
227 
228  output->reserve(15000,24*10000);
229 
230 
231  if (!onDemand) {
232  run(*rawData, *output);
233  output->shrink_to_fit();
234  COUT << output->dataSize() << " clusters from "
235  << output->size() << " modules"
236  << std::endl;
237  }
238 
239  ev.put(std::move(output));
240 
241  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
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 281 of file ClustersFromRawProducer.cc.

References sistrip::FEDRawChannelUnpacker::adc(), edm::DetSet< T >::begin(), edmScanValgrind::buffer, sistrip::FEDBufferBase::channel(), sistrip::FEDBuffer::channelGood(), GetRecoTauVFromDQM_MC_cff::cl, COUT, MillePedeFileConverter_cfg::e, 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, sistrip::FEDRawChannelUnpacker::procRawModeUnpacker(), sistrip::READOUT_MODE_PROC_RAW, sistrip::READOUT_MODE_VIRGIN_RAW, sistrip::READOUT_MODE_ZERO_SUPPRESSED, sistrip::READOUT_MODE_ZERO_SUPPRESSED_FAKE, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE10, sistrip::READOUT_MODE_ZERO_SUPPRESSED_LITE8, sistrip::FEDBufferBase::readoutMode(), record, edmNew::DetSetVector< SiStripCluster >::TSFastFiller, unlikely, sistrip::FEDRawChannelUnpacker::virginRawModeUnpacker(), cms::Exception::what(), sistrip::FEDZSChannelUnpacker::zeroSuppressedLiteModeUnpacker(), and sistrip::FEDZSChannelUnpacker::zeroSuppressedModeUnpacker().

282  {
283 
284  ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_);
285 
286  // loop over good det in cabling
287  for ( auto idet : clusterizer_->allDetIds()) {
288 
290 
291  filler.fill(record);
292 
293  if(record.empty()) record.abort();
294 
295  } // end loop over dets
296 }
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 256 of file ClustersFromRawProducer.cc.

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

Definition at line 258 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 263 of file ClustersFromRawProducer.cc.

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 252 of file ClustersFromRawProducer.cc.

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

Definition at line 254 of file ClustersFromRawProducer.cc.

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

Definition at line 259 of file ClustersFromRawProducer.cc.