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<>

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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<>
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
 

Detailed Description

Definition at line 168 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

◆ SiStripClusterizerFromRaw()

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

Definition at line 170 of file ClustersFromRawProducer.cc.

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  }

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

Member Function Documentation

◆ initialize()

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

Definition at line 237 of file ClustersFromRawProducer.cc.

237  {
238  (*clusterizer_).initialize(es);
239  (*rawAlgos_).initialize(es);
240 }

Referenced by produce().

◆ produce()

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

Definition at line 186 of file ClustersFromRawProducer.cc.

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  }

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

◆ run()

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

Definition at line 242 of file ClustersFromRawProducer.cc.

242  {
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 }

References clusterizer_, doAPVEmulatorCheck_, trigObjTnPSource_cfi::filler, hybridZeroSuppressed_, legacy_, convertSQLitetoXML_cfg::output, rawAlgos_, and GlobalPosition_Frontier_DevDB_cff::record.

Referenced by produce().

Member Data Documentation

◆ clusterizer_

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

Definition at line 224 of file ClustersFromRawProducer.cc.

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

◆ doAPVEmulatorCheck_

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 228 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ hybridZeroSuppressed_

bool SiStripClusterizerFromRaw::hybridZeroSuppressed_
private

Definition at line 231 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ legacy_

bool SiStripClusterizerFromRaw::legacy_
private

Definition at line 230 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

◆ onDemand

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 220 of file ClustersFromRawProducer.cc.

Referenced by produce().

◆ productToken_

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

Definition at line 222 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

◆ rawAlgos_

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

Definition at line 225 of file ClustersFromRawProducer.cc.

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

convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
SiStripClusterizerFromRaw::legacy_
bool legacy_
Definition: ClustersFromRawProducer.cc:230
SiStripClusterizerFromRaw::hybridZeroSuppressed_
bool hybridZeroSuppressed_
Definition: ClustersFromRawProducer.cc:231
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:162
edmNew::DetSetVector::TSFastFiller
Definition: DetSetVectorNew.h:300
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
SiStripClusterizerFromRaw::productToken_
edm::EDGetTokenT< FEDRawDataCollection > productToken_
Definition: ClustersFromRawProducer.cc:222
cms::cuda::assert
assert(be >=bs)
SiStripRawProcessingFactory::create
static std::unique_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &, edm::ConsumesCollector)
Definition: SiStripRawProcessingFactory.cc:16
edmNew::dslv::LazyGetter
Definition: DetSetVectorNew.h:41
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
edm::Handle
Definition: AssociativeIterator.h:50
SiStripClusterizerFromRaw::doAPVEmulatorCheck_
bool doAPVEmulatorCheck_
Definition: ClustersFromRawProducer.cc:228
COUT
#define COUT
Definition: ClustersFromRawProducer.cc:37
SiStripClusterizerFromRaw::rawAlgos_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
Definition: ClustersFromRawProducer.cc:225
SiStripClusterizerFromRaw::run
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
Definition: ClustersFromRawProducer.cc:242
SiStripClusterizerFromRaw::onDemand
bool onDemand
Definition: ClustersFromRawProducer.cc:220
edm::ParameterSet
Definition: ParameterSet.h:47
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
SiStripClusterizerFromRaw::initialize
void initialize(const edm::EventSetup &es)
Definition: ClustersFromRawProducer.cc:237
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
SiStripClusterizerFromRaw::clusterizer_
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
Definition: ClustersFromRawProducer.cc:224
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::InputTag
Definition: InputTag.h:15
StripClusterizerAlgorithmFactory::create
static std::unique_ptr< StripClusterizerAlgorithm > create(edm::ConsumesCollector &&, const edm::ParameterSet &)
Definition: StripClusterizerAlgorithmFactory.cc:8