1 #include <cuda_runtime.h>
23 BeamSpotHost() : data_h_{cms::cuda::make_host_noncached_unique<BeamSpotPOD>(cudaHostAllocWriteCombined)} {}
25 BeamSpotHost(BeamSpotHost
const&) =
delete;
26 BeamSpotHost(BeamSpotHost&&) =
default;
28 BeamSpotHost& operator=(BeamSpotHost
const&) =
delete;
29 BeamSpotHost& operator=(BeamSpotHost&&) =
default;
53 return std::make_unique<BeamSpotHost>();
67 bsPutToken_{produces<cms::cuda::Product<BeamSpotCUDA>>()} {}
72 descriptions.
add(
"offlineBeamSpotToCUDA", desc);
80 auto& bsHost = streamCache(streamID)->ptr();
86 bsHost->sigmaZ = bs.
sigmaZ();
89 bsHost->dxdz = bs.
dxdz();
90 bsHost->dydz = bs.
dydz();
const edm::EDGetTokenT< reco::BeamSpot > bsGetToken_
double z0() const
z coordinate
~BeamSpotToCUDA() override=default
#define DEFINE_FWK_MODULE(type)
unique_ptr< ClusterSequence > cs
std::unique_ptr< T, impl::HostDeleter > unique_ptr
double emittanceX() const
additional information
double dydz() const
dydz slope
double emittanceY() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
bool get(ProductID const &oid, Handle< PROD > &result) const
double BeamWidthX() const
beam width X
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double dxdz() const
dxdz slope
std::unique_ptr< BeamSpotHost > beginStream(edm::StreamID) const override
double sigmaZ() const
sigma z
T getParameter(std::string const &) const
double BeamWidthY() const
beam width Y
void add(std::string const &label, ParameterSetDescription const &psetDescription)
char data[epos_bytes_allocation]
double y0() const
y coordinate
const edm::EDPutTokenT< cms::cuda::Product< BeamSpotCUDA > > bsPutToken_
BeamSpotToCUDA(const edm::ParameterSet &iConfig)
void produce(edm::StreamID streamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
double x0() const
x coordinate