|
|
Go to the documentation of this file.
69 std::unique_ptr<SiPixelFedCablingTree>
cabling_;
72 std::unique_ptr<PixelUnpackingRegions>
regions_;
75 std::unique_ptr<pixelgpudetails::SiPixelRawToClusterGPUKernel::WordFedAppender>
wordFedAppender_;
92 isRun2_(iConfig.getParameter<
bool>(
"isRun2")),
93 includeErrors_(iConfig.getParameter<
bool>(
"IncludeErrors")),
94 useQuality_(iConfig.getParameter<
bool>(
"UseQualityInfo")),
95 clusterThresholds_{iConfig.
getParameter<int32_t>(
"clusterThreshold_layer1"),
96 iConfig.
getParameter<int32_t>(
"clusterThreshold_otherLayers")} {
98 digiErrorPutToken_ = produces<cms::cuda::Product<SiPixelDigiErrorsCUDA>>();
103 regions_ = std::make_unique<PixelUnpackingRegions>(iConfig, consumesCollector());
108 wordFedAppender_ = std::make_unique<pixelgpudetails::SiPixelRawToClusterGPUKernel::WordFedAppender>();
114 desc.add<
bool>(
"isRun2",
true);
115 desc.add<
bool>(
"IncludeErrors",
true);
116 desc.add<
bool>(
"UseQualityInfo",
false);
122 psd0.
addOptional<std::vector<edm::InputTag>>(
"inputs");
127 ->setComment(
"## Empty Regions PSet means complete unpacking");
129 desc.add<
std::string>(
"CablingMapLabel",
"")->setComment(
"CablingMap label");
142 <<
") differs the one from SiPixelROCsStatusAndMappingWrapper. Please fix your configuration.";
145 const auto* gpuMap = hgpuMap->getGPUProductAsync(ctx.stream());
149 const auto* gpuGains = hgains->getGPUProductAsync(ctx.stream());
152 const unsigned char* gpuModulesToUnpack;
156 LogDebug(
"SiPixelRawToCluster") <<
"region2unpack #feds: " <<
regions_->nFEDs();
157 LogDebug(
"SiPixelRawToCluster") <<
"region2unpack #modules (BPIX,EPIX,total): " <<
regions_->nBarrelModules() <<
" "
159 modulesToUnpackRegional = hgpuMap->getModToUnpRegionalAsync(*(
regions_->modulesToUnpack()), ctx.stream());
160 gpuModulesToUnpack = modulesToUnpackRegional.get();
162 gpuModulesToUnpack = hgpuMap->getModToUnpAllAsync(ctx.stream());
170 fedIds_ = cablingMap->fedIds();
171 cabling_ = cablingMap->cablingTree();
180 unsigned int wordCounterGPU = 0;
181 unsigned int fedCounter = 0;
182 bool errorsInEvent =
false;
206 const cms_uint64_t* trailer = reinterpret_cast<const cms_uint64_t*>(
rawData.data()) + (nWords - 1);
214 bool moreHeaders =
true;
215 while (moreHeaders) {
218 moreHeaders = headerStatus;
222 bool moreTrailers =
true;
224 while (moreTrailers) {
227 moreTrailers = trailerStatus;
233 assert(0 == (ew - bw) % 2);
235 wordCounterGPU += (ew - bw);
std::unique_ptr< SiPixelFedCablingTree > cabling_
bool check(const edm::EventSetup &iSetup)
unsigned int cms_uint32_t
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
edm::EDPutTokenT< cms::cuda::Product< SiPixelDigiErrorsCUDA > > digiErrorPutToken_
unique_ptr< ClusterSequence > cs
edm::ESWatcher< SiPixelFedCablingMapRcd > recordWatcher_
edm::ESGetToken< SiPixelGainCalibrationForHLTGPU, SiPixelGainCalibrationForHLTGPURcd > gainsToken_
cms::cuda::ContextState ctxState_
edm::EDPutTokenT< cms::cuda::Product< SiPixelClustersCUDA > > clusterPutToken_
bool checkTrailer(bool &errorsInEvent, int fedId, unsigned int nWords, const Word64 *trailer, Errors &errors) override
std::unique_ptr< pixelgpudetails::SiPixelRawToClusterGPUKernel::WordFedAppender > wordFedAppender_
std::pair< SiPixelDigisCUDA, SiPixelClustersCUDA > getResults()
bool checkHeader(bool &errorsInEvent, int fedId, const Word64 *header, Errors &errors) override
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
const SiPixelFedCablingMap * cablingMap_
constexpr SiPixelClusterThresholds kSiPixelClusterThresholdsDefaultPhase1
#define DEFINE_FWK_MODULE(type)
edm::EDPutTokenT< cms::cuda::Product< SiPixelDigisCUDA > > digiPutToken_
const bool includeErrors_
bool checkCRC(bool &errorsInEvent, int fedId, const Word64 *trailer, Errors &errors) override
std::vector< std::string > getParameterNames() const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
unsigned long long cms_uint64_t
ESTransientHandle< T > getTransientHandle(const ESGetToken< T, R > &iToken) const
const int32_t otherLayers
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::vector< unsigned int > fedIds_
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static MessageDrop * instance()
void makeClustersAsync(bool isRun2, const SiPixelClusterThresholds clusterThresholds, const SiPixelROCsStatusAndMapping *cablingMap, const unsigned char *modToUnp, const SiPixelGainForHLTonGPU *gains, const WordFedAppender &wordFed, SiPixelFormatterErrors &&errors, const uint32_t wordCounter, const uint32_t fedCounter, bool useQualityInfo, bool includeErrors, bool debug, cudaStream_t stream)
T getParameter(std::string const &) const
void acquire(const edm::Event &iEvent, const edm::EventSetup &iSetup, edm::WaitingTaskWithArenaHolder waitingTaskHolder) override
const SiPixelClusterThresholds clusterThresholds_
edm::ESGetToken< SiPixelROCsStatusAndMappingWrapper, CkfComponentsRecord > gpuMapToken_
SiPixelDigiErrorsCUDA && getErrors()
SiPixelRawToClusterCUDA(const edm::ParameterSet &iConfig)
pixelgpudetails::SiPixelRawToClusterGPUKernel gpuAlgo_
std::unique_ptr< PixelUnpackingRegions > regions_
~SiPixelRawToClusterCUDA() override=default
edm::EDGetTokenT< FEDRawDataCollection > rawGetToken_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
PixelDataFormatter::Errors errors_
Namespace of DDCMS conversion namespace.