CMS 3D CMS Logo

SiStripClusterizerConditionsGPUESProducer.cc
Go to the documentation of this file.
1 
7 #include <memory>
8 
14 
16 
20 
21 using namespace stripgpu;
22 
24 public:
25  SiStripClusterizerConditionsGPUESProducer(const edm::ParameterSet&);
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
29 
30  using ReturnType = std::unique_ptr<SiStripClusterizerConditionsGPU>;
32 
33 private:
37 };
38 
40  auto cc = setWhatProduced(this, iConfig.getParameter<std::string>("Label"));
41 
42  gainToken_ = cc.consumesFrom<SiStripGain, SiStripGainRcd>();
43  noisesToken_ = cc.consumesFrom<SiStripNoises, SiStripNoisesRcd>();
44  qualityToken_ = cc.consumesFrom<SiStripQuality, SiStripQualityRcd>(
45  edm::ESInputTag{"", iConfig.getParameter<std::string>("QualityLabel")});
46 }
47 
50  desc.add<std::string>("QualityLabel", "");
51  desc.add<std::string>("Label", "");
52  descriptions.add("SiStripClusterizerConditionsGPUESProducer", desc);
53 }
54 
56  const SiStripClusterizerConditionsRcd& iRecord) {
57  auto gainsH = iRecord.getTransientHandle(gainToken_);
58  const auto& noises = iRecord.get(noisesToken_);
59  const auto& quality = iRecord.get(qualityToken_);
60 
61  return std::make_unique<SiStripClusterizerConditionsGPU>(quality, gainsH.product(), noises);
62 }
63 
64 DEFINE_FWK_EVENTSETUP_MODULE(SiStripClusterizerConditionsGPUESProducer);
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noisesToken_
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
string quality
std::unique_ptr< SiStripClusterizerConditionsGPU > ReturnType
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > qualityToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ReturnType produce(const SiStripClusterizerConditionsRcd &)