Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-30 04:10:32

0001 #include "DataFormats/PortableTestObjects/interface/alpaka/TestDeviceCollection.h"
0002 #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
0003 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0004 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
0005 #include "FWCore/Utilities/interface/InputTag.h"
0006 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/global/EDProducer.h"
0007 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/EDPutToken.h"
0008 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/ESGetToken.h"
0009 #include "HeterogeneousCore/AlpakaInterface/interface/config.h"
0010 
0011 namespace ALPAKA_ACCELERATOR_NAMESPACE {
0012   /**
0013    * This EDProducer only consumes a device EDProduct, and is intended
0014    * only for testing purposes. Do not use it as an example.
0015    */
0016   class TestAlpakaGlobalProducerNoOutput : public global::EDProducer<> {
0017   public:
0018     TestAlpakaGlobalProducerNoOutput(edm::ParameterSet const& config)
0019         : getToken_(consumes(config.getParameter<edm::InputTag>("source"))) {}
0020 
0021     void produce(edm::StreamID, device::Event& iEvent, device::EventSetup const& iSetup) const override {
0022       [[maybe_unused]] auto const& input = iEvent.get(getToken_);
0023     }
0024 
0025     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0026       edm::ParameterSetDescription desc;
0027       desc.add("source", edm::InputTag{});
0028 
0029       descriptions.addWithDefaultLabel(desc);
0030     }
0031 
0032   private:
0033     const device::EDGetToken<portabletest::TestDeviceCollection> getToken_;
0034   };
0035 }  // namespace ALPAKA_ACCELERATOR_NAMESPACE
0036 
0037 #include "HeterogeneousCore/AlpakaCore/interface/alpaka/MakerMacros.h"
0038 DEFINE_FWK_ALPAKA_MODULE(TestAlpakaGlobalProducerNoOutput);