CMS 3D CMS Logo

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

Public Member Functions

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

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

Private Attributes

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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 170 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

◆ SiStripClusterizerFromRaw()

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

Definition at line 172 of file ClustersFromRawProducer.cc.

References cms::cuda::assert(), clusterizer_, edm::ParameterSet::getParameter(), productToken_, and rawAlgos_.

173  : onDemand(conf.getParameter<bool>("onDemand")),
175  conf.getParameter<edm::ParameterSet>("Clusterizer"))),
177  consumesCollector())),
178  doAPVEmulatorCheck_(conf.getParameter<bool>("DoAPVEmulatorCheck")),
179  legacy_(conf.getParameter<bool>("LegacyUnpacker")),
180  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed")) {
181  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
182  produces<edmNew::DetSetVector<SiStripCluster> >();
183  assert(clusterizer_.get());
184  assert(rawAlgos_.get());
185  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
assert(be >=bs)
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
static std::unique_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &, edm::ConsumesCollector)
static std::unique_ptr< StripClusterizerAlgorithm > create(edm::ConsumesCollector &&, const edm::ParameterSet &)
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
edm::EDGetTokenT< FEDRawDataCollection > productToken_

Member Function Documentation

◆ fillDescriptions()

void SiStripClusterizerFromRaw::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 237 of file ClustersFromRawProducer.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), analysisFilters_cff::algorithms, HLT_2022v15_cff::clusterizer, submitPVResolutionJobs::desc, StripClusterizerAlgorithmFactory::fillDescriptions(), SiStripRawProcessingFactory::fillDescriptions(), and AlCaHLTBitMon_QueryRunRegistry::string.

237  {
239 
240  desc.add("ProductLabel", edm::InputTag("rawDataCollector"));
241  desc.add<std::string>("ConditionsLabel", "");
242  desc.add("onDemand", true);
243  desc.add("DoAPVEmulatorCheck", true);
244  desc.add("LegacyUnpacker", false);
245  desc.add("HybridZeroSuppressed", false);
246 
249  desc.add("Clusterizer", clusterizer);
250 
253  desc.add("Algorithms", algorithms);
254 
255  descriptions.addWithDefaultLabel(desc);
256 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ParameterSetDescription &algorithms)
static void fillDescriptions(edm::ParameterSetDescription &clusterizer)

◆ initialize()

void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 261 of file ClustersFromRawProducer.cc.

Referenced by produce().

261  {
262  (*clusterizer_).initialize(es);
263  (*rawAlgos_).initialize(es);
264 }

◆ produce()

void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverride

Definition at line 187 of file ClustersFromRawProducer.cc.

References cms::cuda::assert(), clusterizer_, COUT, doAPVEmulatorCheck_, makeMEIFBenchmarkPlots::ev, hybridZeroSuppressed_, initialize(), legacy_, eostools::move(), onDemand, convertSQLitetoXML_cfg::output, productToken_, rawAlgos_, l1tstage2_dqm_sourceclient-live_cfg::rawData, and run().

187  {
188  initialize(es);
189 
190  // get raw data
192  ev.getByToken(productToken_, rawData);
193 
194  std::unique_ptr<edmNew::DetSetVector<SiStripCluster> > output(
196  std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(
198  clusterizer_->conditions().allDetIds())
200 
201  if (onDemand)
202  assert(output->onDemand());
203 
204  output->reserve(15000, 24 * 10000);
205 
206  if (!onDemand) {
207  run(*rawData, *output);
208  output->shrink_to_fit();
209  COUT << output->dataSize() << " clusters from " << output->size() << " modules" << std::endl;
210  }
211 
212  ev.put(std::move(output));
213  }
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
void initialize(const edm::EventSetup &es)
assert(be >=bs)
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
#define COUT
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
edm::EDGetTokenT< FEDRawDataCollection > productToken_
def move(src, dest)
Definition: eostools.py:511

◆ run()

void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 266 of file ClustersFromRawProducer.cc.

References clusterizer_, doAPVEmulatorCheck_, trigObjTnPSource_cfi::filler, hybridZeroSuppressed_, legacy_, convertSQLitetoXML_cfg::output, rawAlgos_, AlCaHarvesting_cff::record, and edmNew::DetSetVector< SiStripCluster >::TSFastFiller.

Referenced by produce().

266  {
268 
269  // loop over good det in cabling
270  for (auto idet : clusterizer_->conditions().allDetIds()) {
272 
273  filler.fill(record);
274 
275  if (record.empty())
276  record.abort();
277  } // end loop over dets
278 }
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_

Member Data Documentation

◆ clusterizer_

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

Definition at line 227 of file ClustersFromRawProducer.cc.

Referenced by produce(), run(), and SiStripClusterizerFromRaw().

◆ doAPVEmulatorCheck_

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 231 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ hybridZeroSuppressed_

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 234 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ legacy_

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 233 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ onDemand

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 223 of file ClustersFromRawProducer.cc.

Referenced by produce().

◆ productToken_

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

Definition at line 225 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

◆ rawAlgos_

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

Definition at line 228 of file ClustersFromRawProducer.cc.

Referenced by produce(), run(), and SiStripClusterizerFromRaw().