CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer Class Reference
Inheritance diagram for ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer:
edm::ESProducer edm::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

Public Member Functions

 EcalMultifitParametersHostESProducer (edm::ParameterSet const &)
 
std::unique_ptr< EcalMultifitParametersHostproduce (EcalMultifitParametersRcd const &)
 
 ~EcalMultifitParametersHostESProducer () override=default
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &)
 
- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 

Private Attributes

std::vector< float > ebAmplitudeFitParameters_
 
std::vector< float > ebTimeFitParameters_
 
std::vector< float > eeAmplitudeFitParameters_
 
std::vector< float > eeTimeFitParameters_
 

Additional Inherited Members

- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Definition at line 19 of file EcalMultifitParametersHostESProducer.cc.

Constructor & Destructor Documentation

◆ EcalMultifitParametersHostESProducer()

ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::EcalMultifitParametersHostESProducer ( edm::ParameterSet const &  iConfig)

Definition at line 34 of file EcalMultifitParametersHostESProducer.cc.

References cms::cuda::assert(), ebAmplitudeFitParameters_, ebTimeFitParameters_, eeAmplitudeFitParameters_, eeTimeFitParameters_, edm::ParameterSet::getParameter(), kNAmplitudeFitParams, kNTimeFitParams, and edm::ESProducer::setWhatProduced().

35  : ESProducer(iConfig) {
36  setWhatProduced(this);
37 
38  auto const ebTimeFitParamsFromPSet = iConfig.getParameter<std::vector<double>>("EBtimeFitParameters");
39  auto const eeTimeFitParamsFromPSet = iConfig.getParameter<std::vector<double>>("EEtimeFitParameters");
40  // Assert that there are as many parameters as the EcalMultiFitParametersSoA expects
41  assert(ebTimeFitParamsFromPSet.size() == kNTimeFitParams);
42  assert(eeTimeFitParamsFromPSet.size() == kNTimeFitParams);
43  ebTimeFitParameters_.assign(ebTimeFitParamsFromPSet.begin(), ebTimeFitParamsFromPSet.end());
44  eeTimeFitParameters_.assign(eeTimeFitParamsFromPSet.begin(), eeTimeFitParamsFromPSet.end());
45 
46  auto const ebAmplFitParamsFromPSet = iConfig.getParameter<std::vector<double>>("EBamplitudeFitParameters");
47  auto const eeAmplFitParamsFromPSet = iConfig.getParameter<std::vector<double>>("EEamplitudeFitParameters");
48  // Assert that there are as many parameters as the EcalMultiFitParametersSoA expects
49  assert(ebAmplFitParamsFromPSet.size() == kNAmplitudeFitParams);
50  assert(eeAmplFitParamsFromPSet.size() == kNAmplitudeFitParams);
51  ebAmplitudeFitParameters_.assign(ebAmplFitParamsFromPSet.begin(), ebAmplFitParamsFromPSet.end());
52  eeAmplitudeFitParameters_.assign(eeAmplFitParamsFromPSet.begin(), eeAmplFitParamsFromPSet.end());
53  }
constexpr size_t kNTimeFitParams
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
assert(be >=bs)
constexpr size_t kNAmplitudeFitParams

◆ ~EcalMultifitParametersHostESProducer()

ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::~EcalMultifitParametersHostESProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 55 of file EcalMultifitParametersHostESProducer.cc.

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

55  {
57  desc.add<std::vector<double>>("EBtimeFitParameters",
58  {-2.015452e+00,
59  3.130702e+00,
60  -1.234730e+01,
61  4.188921e+01,
62  -8.283944e+01,
63  9.101147e+01,
64  -5.035761e+01,
65  1.105621e+01});
66  desc.add<std::vector<double>>("EEtimeFitParameters",
67  {-2.390548e+00,
68  3.553628e+00,
69  -1.762341e+01,
70  6.767538e+01,
71  -1.332130e+02,
72  1.407432e+02,
73  -7.541106e+01,
74  1.620277e+01});
75  desc.add<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652});
76  desc.add<std::vector<double>>("EEamplitudeFitParameters", {1.890, 1.400});
77  descriptions.addWithDefaultLabel(desc);
78  }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

std::unique_ptr< EcalMultifitParametersHost > ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::produce ( EcalMultifitParametersRcd const &  iRecord)

Definition at line 80 of file EcalMultifitParametersHostESProducer.cc.

References ebAmplitudeFitParameters_, ebTimeFitParameters_, eeAmplitudeFitParameters_, eeTimeFitParameters_, nano_mu_digi_cff::float, cms::alpakatools::host(), kNAmplitudeFitParams, and kNTimeFitParams.

81  {
82  size_t const sizeone = 1;
83  auto product = std::make_unique<EcalMultifitParametersHost>(sizeone, cms::alpakatools::host());
84  auto view = product->view();
85 
86  std::memcpy(view.timeFitParamsEB().data(), ebTimeFitParameters_.data(), sizeof(float) * kNTimeFitParams);
87  std::memcpy(view.timeFitParamsEE().data(), eeTimeFitParameters_.data(), sizeof(float) * kNTimeFitParams);
88 
89  std::memcpy(
90  view.amplitudeFitParamsEB().data(), ebAmplitudeFitParameters_.data(), sizeof(float) * kNAmplitudeFitParams);
91  std::memcpy(
92  view.amplitudeFitParamsEE().data(), eeAmplitudeFitParameters_.data(), sizeof(float) * kNAmplitudeFitParams);
93 
94  return product;
95  }
constexpr size_t kNTimeFitParams
constexpr size_t kNAmplitudeFitParams
alpaka::DevCpu const & host()
Definition: host.h:14

Member Data Documentation

◆ ebAmplitudeFitParameters_

std::vector<float> ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::ebAmplitudeFitParameters_
private

◆ ebTimeFitParameters_

std::vector<float> ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::ebTimeFitParameters_
private

◆ eeAmplitudeFitParameters_

std::vector<float> ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::eeAmplitudeFitParameters_
private

◆ eeTimeFitParameters_

std::vector<float> ALPAKA_ACCELERATOR_NAMESPACE::EcalMultifitParametersHostESProducer::eeTimeFitParameters_
private