File indexing completed on 2024-12-05 02:48:05
0001
0002 #include "RecoTracker/LSTCore/interface/alpaka/LST.h"
0003
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005
0006 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESProducer.h"
0007 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ModuleFactory.h"
0008 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/memory.h"
0010
0011 #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
0012
0013 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0014
0015 class LSTModulesDevESProducer : public ESProducer {
0016 private:
0017 std::string ptCutLabel_;
0018
0019 public:
0020 LSTModulesDevESProducer(edm::ParameterSet const& iConfig)
0021 : ESProducer(iConfig), ptCutLabel_(iConfig.getParameter<std::string>("ptCutLabel")) {
0022 setWhatProduced(this, ptCutLabel_);
0023 }
0024
0025 static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0026 edm::ParameterSetDescription desc;
0027 desc.add<std::string>("ptCutLabel", "0.8");
0028 descriptions.addWithDefaultLabel(desc);
0029 }
0030
0031 std::unique_ptr<lst::LSTESData<DevHost>> produce(TrackerRecoGeometryRecord const& iRecord) {
0032 return lst::loadAndFillESHost(ptCutLabel_);
0033 }
0034 };
0035
0036 }
0037
0038 DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(LSTModulesDevESProducer);