Skip to content

Commit

Permalink
fill modules data in the buffer as an ES product
Browse files Browse the repository at this point in the history
  • Loading branch information
slava77devel committed Nov 17, 2023
1 parent efec09f commit 7942f33
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion RecoTracker/LST/plugins/alpaka/LSTModulesDevESProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"

// LST includes
#include <SDL/ModuleMethods.h>
#include <SDL/LST.h>

namespace ALPAKA_ACCELERATOR_NAMESPACE {

Expand Down Expand Up @@ -39,7 +41,12 @@ void LSTModulesDevESProducer::fillDescriptions(edm::ConfigurationDescriptions &d
}

std::optional<SDL::modulesBuffer<alpaka_common::DevHost>> LSTModulesDevESProducer::produce(const TrackerRecoGeometryRecord &iRecord) {
return SDL::modulesBuffer<alpaka_common::DevHost>(cms::alpakatools::host());
// write directly to SDL : FIXME : SHOULD NOT HAPPEN HERE
SDL::modulesBuffer<alpaka_common::DevHost> modules(cms::alpakatools::host());
alpaka::QueueCpuBlocking queue(cms::alpakatools::host());
SDL::LST::loadMaps();
SDL::loadModulesFromFile(&modules, SDL::nModules, SDL::nLowerModules, *SDL::pixelMapping, queue, txtFile_.c_str());
return modules;
}

} // namespace ALPAKA_ACCELERATOR_NAMESPACE
Expand Down
3 changes: 1 addition & 2 deletions RecoTracker/LST/plugins/alpaka/LSTProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
auto const& phase2OTHits = event.get(lstPhase2OTHitsInputToken_);

auto const& modulesData = setup.getData(modulesESToken_);
edm::LogWarning("MYDEBUG")<<*modulesData.nLowerModules<<" "<<*modulesData.nModules;
lst_.eventSetup();
SDL::modulesInGPU->setData(modulesData);
lst_.run(event.queue(),
verbose_,
pixelSeeds.px(),
Expand Down

0 comments on commit 7942f33

Please sign in to comment.