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

Constructor & Destructor Documentation

◆ SiStripClusterizerFromRaw()

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

Definition at line 173 of file ClustersFromRawProducer.cc.

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

174  : onDemand(conf.getParameter<bool>("onDemand")),
176  conf.getParameter<edm::ParameterSet>("Clusterizer"))),
178  consumesCollector())),
179  doAPVEmulatorCheck_(conf.getParameter<bool>("DoAPVEmulatorCheck")),
180  legacy_(conf.getParameter<bool>("LegacyUnpacker")),
181  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed")) {
182  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
183  produces<edmNew::DetSetVector<SiStripCluster> >();
184  assert(clusterizer_.get());
185  assert(rawAlgos_.get());
186  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
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 238 of file ClustersFromRawProducer.cc.

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

238  {
240 
241  desc.add("ProductLabel", edm::InputTag("rawDataCollector"));
242  desc.add<std::string>("ConditionsLabel", "");
243  desc.add("onDemand", true);
244  desc.add("DoAPVEmulatorCheck", true);
245  desc.add("LegacyUnpacker", false);
246  desc.add("HybridZeroSuppressed", false);
247 
250  desc.add("Clusterizer", clusterizer);
251 
254  desc.add("Algorithms", algorithms);
255 
256  descriptions.addWithDefaultLabel(desc);
257 }
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 262 of file ClustersFromRawProducer.cc.

Referenced by produce().

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

◆ produce()

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

Definition at line 188 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().

188  {
189  initialize(es);
190 
191  // get raw data
193  ev.getByToken(productToken_, rawData);
194 
195  std::unique_ptr<edmNew::DetSetVector<SiStripCluster> > output(
197  std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(
199  clusterizer_->conditions().allDetIds())
201 
202  if (onDemand)
203  assert(output->onDemand());
204 
205  output->reserve(15000, 24 * 10000);
206 
207  if (!onDemand) {
208  run(*rawData, *output);
209  output->shrink_to_fit();
210  COUT << output->dataSize() << " clusters from " << output->size() << " modules" << std::endl;
211  }
212 
213  ev.put(std::move(output));
214  }
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
Definition: output.py:1
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 267 of file ClustersFromRawProducer.cc.

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

Referenced by produce().

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

Member Data Documentation

◆ clusterizer_

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

Definition at line 228 of file ClustersFromRawProducer.cc.

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

◆ doAPVEmulatorCheck_

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 232 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ hybridZeroSuppressed_

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 235 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ legacy_

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 234 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ onDemand

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 224 of file ClustersFromRawProducer.cc.

Referenced by produce().

◆ productToken_

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

Definition at line 226 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

◆ rawAlgos_

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

Definition at line 229 of file ClustersFromRawProducer.cc.

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