8 #include <cuda_runtime.h>
26 : cablingMap_(&cablingMap), modToUnpDefault(pixelgpudetails::
MAX_SIZE), hasQuality_(badPixelInfo != nullptr) {
29 std::vector<unsigned int>
const& fedIds = cablingMap.
fedIds();
30 std::unique_ptr<SiPixelFedCablingTree>
const& cabling = cablingMap.
cablingTree();
32 unsigned int startFed = *(fedIds.begin());
33 unsigned int endFed = *(fedIds.end() - 1);
38 for (
unsigned int fed = startFed; fed <= endFed; fed++) {
46 if (pixelRoc !=
nullptr) {
50 if (badPixelInfo !=
nullptr)
87 LogDebug(
"SiPixelROCsStatusAndMapping")
88 <<
"----------------------------------------------------------------------------" << std::endl;
89 LogDebug(
"SiPixelROCsStatusAndMapping")
92 LogDebug(
"SiPixelROCsStatusAndMapping")
95 LogDebug(
"SiPixelROCsStatusAndMapping")
97 LogDebug(
"SiPixelROCsStatusAndMapping")
98 <<
"----------------------------------------------------------------------------" << std::endl;
107 cudaStream_t cudaStream)
const {
124 this->modToUnpDefault.data(),
133 std::set<unsigned int>
const&
modules, cudaStream_t cudaStream)
const {
140 unsigned int startFed = *(fedIds.begin());
141 unsigned int endFed = *(fedIds.end() - 1);
146 for (
unsigned int fed = startFed; fed <= endFed; fed++) {
151 if (pixelRoc !=
nullptr) {
152 modToUnpHost[
index] = (not modules.empty()) and (modules.find(pixelRoc->
rawId()) == modules.end());
154 modToUnpHost[
index] =
true;
161 cudaCheck(cudaMemcpyAsync(modToUnpDevice.get(),
163 pixelgpudetails::MAX_SIZE *
sizeof(
unsigned char),
164 cudaMemcpyHostToDevice,
166 return modToUnpDevice;
unsigned char badRocs[pixelgpudetails::MAX_SIZE]
unsigned int rawId[pixelgpudetails::MAX_SIZE]
const SiPixelFedCablingMap * cablingMap_
const unsigned char * getModToUnpAllAsync(cudaStream_t cudaStream) const
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
const SiPixelROCsStatusAndMapping * getGPUProductAsync(cudaStream_t cudaStream) const
unsigned int moduleId[pixelgpudetails::MAX_SIZE]
unsigned int roc[pixelgpudetails::MAX_SIZE]
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
cms::cuda::device::unique_ptr< unsigned char[]> getModToUnpRegionalAsync(std::set< unsigned int > const &modules, cudaStream_t cudaStream) const
SiPixelROCsStatusAndMapping * cablingMapHost
unsigned int rocInDet[pixelgpudetails::MAX_SIZE]
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
SiPixelROCsStatusAndMapping * cablingMapDevice
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
cms::cuda::ESProduct< GPUData > gpuData_
cms::cuda::ESProduct< ModulesToUnpack > modToUnp_
constexpr unsigned int MAX_ROC
constexpr uint16_t invalidModuleId
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
unsigned int link[pixelgpudetails::MAX_SIZE]
SiPixelROCsStatusAndMappingWrapper(SiPixelFedCablingMap const &cablingMap, TrackerGeometry const &trackerGeom, SiPixelQuality const *badPixelInfo)
char data[epos_bytes_allocation]
std::vector< unsigned char, cms::cuda::HostAllocator< unsigned char > > modToUnpDefault
constexpr unsigned int MAX_SIZE
constexpr unsigned int MAX_SIZE_BYTE_BOOL
std::vector< unsigned int > fedIds() const
unsigned int fed[pixelgpudetails::MAX_SIZE]
#define cudaCheck(ARG,...)
~SiPixelROCsStatusAndMappingWrapper()
constexpr unsigned int MAX_LINK
unsigned char * modToUnpDefault