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 beginRun (const edm::Run &, const edm::EventSetup &es) override
 
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 hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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

SiStripDetCabling const * cabling_
 
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 169 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

◆ SiStripClusterizerFromRaw()

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

Definition at line 171 of file ClustersFromRawProducer.cc.

172  : onDemand(conf.getParameter<bool>("onDemand")),
173  cabling_(nullptr),
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

◆ beginRun()

void SiStripClusterizerFromRaw::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
inlineoverride

Definition at line 186 of file ClustersFromRawProducer.cc.

186 { initialize(es); }

References initialize().

◆ initialize()

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

Definition at line 241 of file ClustersFromRawProducer.cc.

241  {
242  (*clusterizer_).initialize(es);
243  cabling_ = (*clusterizer_).cabling();
244  (*rawAlgos_).initialize(es);
245 }

References cabling_.

Referenced by beginRun(), and produce().

◆ produce()

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

Definition at line 188 of file ClustersFromRawProducer.cc.

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

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

247  {
249 
250  // loop over good det in cabling
251  for (auto idet : clusterizer_->allDetIds()) {
253 
254  filler.fill(record);
255 
256  if (record.empty())
257  record.abort();
258 
259  } // end loop over dets
260 }

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

Referenced by produce().

Member Data Documentation

◆ cabling_

SiStripDetCabling const* SiStripClusterizerFromRaw::cabling_
private

Definition at line 226 of file ClustersFromRawProducer.cc.

Referenced by initialize().

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

Referenced by produce().

◆ productToken_

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

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

convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:32
SiStripClusterizerFromRaw::legacy_
bool legacy_
Definition: ClustersFromRawProducer.cc:234
SiStripClusterizerFromRaw::hybridZeroSuppressed_
bool hybridZeroSuppressed_
Definition: ClustersFromRawProducer.cc:235
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:162
edmNew::DetSetVector::TSFastFiller
Definition: DetSetVectorNew.h:334
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
SiStripClusterizerFromRaw::productToken_
edm::EDGetTokenT< FEDRawDataCollection > productToken_
Definition: ClustersFromRawProducer.cc:224
cms::cuda::assert
assert(be >=bs)
edmNew::dslv::LazyGetter
Definition: DetSetVectorNew.h:47
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:160
edm::Handle
Definition: AssociativeIterator.h:50
SiStripClusterizerFromRaw::doAPVEmulatorCheck_
bool doAPVEmulatorCheck_
Definition: ClustersFromRawProducer.cc:232
COUT
#define COUT
Definition: ClustersFromRawProducer.cc:37
SiStripClusterizerFromRaw::rawAlgos_
std::unique_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
Definition: ClustersFromRawProducer.cc:229
SiStripClusterizerFromRaw::run
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
Definition: ClustersFromRawProducer.cc:247
SiStripClusterizerFromRaw::onDemand
bool onDemand
Definition: ClustersFromRawProducer.cc:222
edm::ParameterSet
Definition: ParameterSet.h:36
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
SiStripClusterizerFromRaw::cabling_
SiStripDetCabling const * cabling_
Definition: ClustersFromRawProducer.cc:226
SiStripClusterizerFromRaw::initialize
void initialize(const edm::EventSetup &es)
Definition: ClustersFromRawProducer.cc:241
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edmNew::DetSetVector
Definition: DetSetNew.h:13
eostools.move
def move(src, dest)
Definition: eostools.py:511
SiStripRawProcessingFactory::create
static std::unique_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &)
Definition: SiStripRawProcessingFactory.cc:13
SiStripClusterizerFromRaw::clusterizer_
std::unique_ptr< StripClusterizerAlgorithm > clusterizer_
Definition: ClustersFromRawProducer.cc:228
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
StripClusterizerAlgorithmFactory::create
static std::unique_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
Definition: StripClusterizerAlgorithmFactory.cc:8
edm::InputTag
Definition: InputTag.h:15