CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiStripClustersFromSOA Class Referencefinal
Inheritance diagram for SiStripClustersFromSOA:
edm::stream::EDProducer<>

Public Member Functions

 SiStripClustersFromSOA (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 produce (edm::Event &ev, const edm::EventSetup &es) override
 

Private Attributes

edm::EDGetTokenT< SiStripClustersCUDAHostinputToken_
 
edm::EDPutTokenT< edmNew::DetSetVector< SiStripCluster > > outputToken_
 

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 20 of file SiStripClustersFromSOA.cc.

Constructor & Destructor Documentation

◆ SiStripClustersFromSOA()

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

Definition at line 22 of file SiStripClustersFromSOA.cc.

23  : inputToken_(consumes<SiStripClustersCUDAHost>(conf.getParameter<edm::InputTag>("ProductLabel"))),
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< SiStripClustersCUDAHost > inputToken_
edm::EDPutTokenT< edmNew::DetSetVector< SiStripCluster > > outputToken_

Member Function Documentation

◆ fillDescriptions()

static void SiStripClustersFromSOA::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 26 of file SiStripClustersFromSOA.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), and submitPVResolutionJobs::desc.

26  {
28 
29  desc.add("ProductLabel", edm::InputTag("siStripClustersSOAtoHost"));
30  descriptions.addWithDefaultLabel(desc);
31  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void SiStripClustersFromSOA::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlineoverrideprivate

Definition at line 34 of file SiStripClustersFromSOA.cc.

References nano_mu_local_reco_cff::clusterSize, SiStripSpyDisplay_cfi::detIDs, makeMEIFBenchmarkPlots::ev, mps_fire::i, inputToken_, dqmiolumiharvest::j, eostools::move(), AlCaHarvesting_cff::record, findQualityFiles::size, and Ecal07UnpackerData_cfi::stripIDs.

34  {
35  const auto& clust_data = ev.get(inputToken_);
36 
37  const int nSeedStripsNC = clust_data.nClusters();
38  const auto clusterSize = clust_data.clusterSize().get();
39  const auto clusterADCs = clust_data.clusterADCs().get();
40  const auto detIDs = clust_data.clusterDetId().get();
41  const auto stripIDs = clust_data.firstStrip().get();
42  const auto trueCluster = clust_data.trueCluster().get();
43 
44  const unsigned int initSeedStripsSize = 15000;
45 
47  auto output{std::make_unique<out_t>(edmNew::DetSetVector<SiStripCluster>())};
48  output->reserve(initSeedStripsSize, nSeedStripsNC);
49 
50  std::vector<uint8_t> adcs;
51 
52  for (int i = 0; i < nSeedStripsNC;) {
53  const auto detid = detIDs[i];
54  out_t::FastFiller record(*output, detid);
55 
56  while (i < nSeedStripsNC && detIDs[i] == detid) {
57  if (trueCluster[i]) {
58  const auto size = clusterSize[i];
59  const auto firstStrip = stripIDs[i];
60 
61  adcs.clear();
62  adcs.reserve(size);
63 
64  for (uint32_t j = 0; j < size; ++j) {
65  adcs.push_back(clusterADCs[i + j * nSeedStripsNC]);
66  }
67  record.push_back(SiStripCluster(firstStrip, std::move(adcs)));
68  }
69  i++;
70  }
71  }
72 
73  output->shrink_to_fit();
74  ev.put(std::move(output));
75  }
size
Write out results.
edm::EDGetTokenT< SiStripClustersCUDAHost > inputToken_
Definition: output.py:1
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ inputToken_

edm::EDGetTokenT<SiStripClustersCUDAHost> SiStripClustersFromSOA::inputToken_
private

Definition at line 78 of file SiStripClustersFromSOA.cc.

Referenced by produce().

◆ outputToken_

edm::EDPutTokenT<edmNew::DetSetVector<SiStripCluster> > SiStripClustersFromSOA::outputToken_
private

Definition at line 79 of file SiStripClustersFromSOA.cc.