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

Constructor & Destructor Documentation

◆ SiStripClusterizerFromRaw()

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

Definition at line 174 of file ClustersFromRawProducer.cc.

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

175  : onDemand(conf.getParameter<bool>("onDemand")),
177  conf.getParameter<edm::ParameterSet>("Clusterizer"))),
179  consumesCollector())),
180  doAPVEmulatorCheck_(conf.getParameter<bool>("DoAPVEmulatorCheck")),
181  legacy_(conf.getParameter<bool>("LegacyUnpacker")),
182  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed")) {
183  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
184  produces<edmNew::DetSetVector<SiStripCluster> >();
185  assert(clusterizer_.get());
186  assert(rawAlgos_.get());
187  }
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 239 of file ClustersFromRawProducer.cc.

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

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

Referenced by produce().

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

◆ produce()

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

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

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

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

Referenced by produce().

268  {
270 
271  // loop over good det in cabling
272  for (auto idet : clusterizer_->conditions().allDetIds()) {
274 
275  filler.fill(record);
276 
277  if (record.empty())
278  record.abort();
279  } // end loop over dets
280 }
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 229 of file ClustersFromRawProducer.cc.

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

◆ doAPVEmulatorCheck_

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 233 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ hybridZeroSuppressed_

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 236 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ legacy_

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 235 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ onDemand

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 225 of file ClustersFromRawProducer.cc.

Referenced by produce().

◆ productToken_

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

Definition at line 227 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

◆ rawAlgos_

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

Definition at line 230 of file ClustersFromRawProducer.cc.

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