CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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
 

Private Member Functions

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

Private Attributes

std::unique_ptr
< StripClusterizerAlgorithm
clusterizer_
 
bool doAPVEmulatorCheck_
 
bool hybridZeroSuppressed_
 
bool legacy_
 
bool onDemand
 
edm::EDGetTokenT
< FEDRawDataCollection
productToken_
 
std::unique_ptr
< SiStripRawProcessingAlgorithms
rawAlgos_
 

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

Constructor & Destructor Documentation

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

Definition at line 170 of file ClustersFromRawProducer.cc.

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

171  : onDemand(conf.getParameter<bool>("onDemand")),
173  conf.getParameter<edm::ParameterSet>("Clusterizer"))),
175  consumesCollector())),
176  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck")
177  : true),
178  legacy_(conf.existsAs<bool>("LegacyUnpacker") ? conf.getParameter<bool>("LegacyUnpacker") : false),
179  hybridZeroSuppressed_(conf.getParameter<bool>("HybridZeroSuppressed")) {
180  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
181  produces<edmNew::DetSetVector<SiStripCluster> >();
182  assert(clusterizer_.get());
183  assert(rawAlgos_.get());
184  }
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
assert(be >=bs)
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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

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

Definition at line 237 of file ClustersFromRawProducer.cc.

Referenced by produce().

237  {
238  (*clusterizer_).initialize(es);
239  (*rawAlgos_).initialize(es);
240 }
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverride

Definition at line 186 of file ClustersFromRawProducer.cc.

References cms::cuda::assert(), clusterizer_, COUT, doAPVEmulatorCheck_, edm::Event::getByToken(), hybridZeroSuppressed_, initialize(), legacy_, eostools::move(), onDemand, convertSQLitetoXML_cfg::output, productToken_, edm::Event::put(), rawAlgos_, and run().

186  {
187  initialize(es);
188 
189  // get raw data
191  ev.getByToken(productToken_, rawData);
192 
193  std::unique_ptr<edmNew::DetSetVector<SiStripCluster> > output(
195  std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(
197  clusterizer_->conditions().allDetIds())
199 
200  if (onDemand)
201  assert(output->onDemand());
202 
203  output->reserve(15000, 24 * 10000);
204 
205  if (!onDemand) {
206  run(*rawData, *output);
207  output->shrink_to_fit();
208  COUT << output->dataSize() << " clusters from " << output->size() << " modules" << std::endl;
209  }
210 
211  ev.put(std::move(output));
212  }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void initialize(const edm::EventSetup &es)
assert(be >=bs)
def move
Definition: eostools.py:511
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
#define COUT
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
edm::EDGetTokenT< FEDRawDataCollection > productToken_
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 242 of file ClustersFromRawProducer.cc.

References edmNew::DetSetVector< T >::TSFastFiller::abort(), clusterizer_, doAPVEmulatorCheck_, edmNew::DetSetVector< T >::TSFastFiller::empty(), hybridZeroSuppressed_, legacy_, rawAlgos_, and GlobalPosition_Frontier_DevDB_cff::record.

Referenced by produce().

242  {
243  ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_, legacy_, hybridZeroSuppressed_);
244 
245  // loop over good det in cabling
246  for (auto idet : clusterizer_->conditions().allDetIds()) {
248 
249  filler.fill(record);
250 
251  if (record.empty())
252  record.abort();
253 
254  } // end loop over dets
255 }
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_

Member Data Documentation

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

Definition at line 224 of file ClustersFromRawProducer.cc.

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

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 228 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 231 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 230 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 220 of file ClustersFromRawProducer.cc.

Referenced by produce().

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

Definition at line 222 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

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

Definition at line 225 of file ClustersFromRawProducer.cc.

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