155 std::map<int, int> countsOnCPU;
156 std::map<int, int> countsOnGPU;
158 std::array<std::array<int, nErrors>,
nFEDs> countsMatrixOnCPU;
159 std::array<std::array<int, nErrors>,
nFEDs> countsMatrixOnGPU;
164 countsMatrixOnCPU[
i][
j] = 0;
165 countsMatrixOnGPU[
i][
j] = 0;
170 for (
unsigned int j = k_FED25;
j <= k_FED31;
j++) {
178 edm::LogWarning(
"SiPixelCompareTrackSoA") <<
"reference (cpu) SiPixelRawDataErrors not found; \n" 179 <<
"the comparison will not run.";
184 for (
auto it = inputFromCPU->begin(); it != inputFromCPU->end(); ++it) {
185 for (
auto& siPixelRawDataError : *it) {
186 int fed = siPixelRawDataError.getFedId();
187 int type = siPixelRawDataError.getType();
188 DetId id = it->detId();
191 countsOnCPU[
type] += 1;
195 << __PRETTY_FUNCTION__ <<
" on cpu: FED: " << fed <<
" detid: " <<
id.rawId() <<
" type:" <<
type;
203 edm::LogWarning(
"SiPixelCompareTrackSoA") <<
"target (gpu) SiPixelRawDataErrors not found; \n" 204 <<
"the comparison will not run.";
209 for (
auto it = inputFromGPU->begin(); it != inputFromGPU->end(); ++it) {
210 for (
auto& siPixelRawDataError : *it) {
211 int fed = siPixelRawDataError.getFedId();
212 int type = siPixelRawDataError.getType();
213 DetId id = it->detId();
216 countsOnGPU[
type] += 1;
220 << __PRETTY_FUNCTION__ <<
" on gpu: FED: " << fed <<
" detid: " <<
id.rawId() <<
" type:" <<
type;
226 << __PRETTY_FUNCTION__ <<
" on gpu found: " << errorsOnGPU <<
" on cpu found: " << errorsOnCPU << std::endl;
231 for (
unsigned int j = k_FED25;
j <= k_FED31;
j++) {
239 if (countsMatrixOnGPU[
i][
j] != 0 || countsMatrixOnCPU[
i][
j] != 0) {
242 <<
" | GPU counts: " << countsMatrixOnGPU[
i][
j] <<
" CPU counts:" << countsMatrixOnCPU[
i][
j] << std::endl;
std::unordered_map< SiPixelFEDErrorCodes, MonitorElement * > h_nFEDErrors_
const edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > tokenErrorsGPU_
MonitorElement * h_FEDerrorVsFEDIdUnbalance_
static constexpr int nFEDs
Log< level::Info, false > LogInfo
MonitorElement * h_totFEDErrors_
static constexpr int nErrors
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< edm::DetSetVector< SiPixelRawDataError > > tokenErrorsCPU_