28 :
ESProducer(iConfig), useQuality_(iConfig.getParameter<
bool>(
"UseQualityInfo")) {
29 auto cc = setWhatProduced(
this);
32 qualityToken_ =
cc.consumes();
34 geometryToken_ =
cc.consumes();
39 desc.add<
std::string>(
"CablingMapLabel",
"")->setComment(
"CablingMap label");
40 desc.add<
bool>(
"UseQualityInfo",
false);
49 quality = qualityInfo.product();
54 std::vector<unsigned int>
const&
fedIds = cablingMap->fedIds();
55 std::unique_ptr<SiPixelFedCablingTree>
const& cabling = cablingMap->cablingTree();
57 unsigned int startFed =
fedIds.front();
58 unsigned int endFed =
fedIds.back();
63 auto mapView = product.
view();
65 mapView.hasQuality() = useQuality_;
66 for (
unsigned int fed = startFed; fed <= endFed; fed++) {
71 mapView[
index].fed() = fed;
72 mapView[
index].link() = link;
74 if (pixelRoc !=
nullptr) {
77 mapView[
index].modToUnpDefault() =
false;
81 mapView[
index].badRocs() =
false;
85 mapView[
index].badRocs() =
true;
86 mapView[
index].modToUnpDefault() =
true;
106 auto gdet = trackerGeom->idToDetUnit(mapView[
i].
rawId());
108 LogDebug(
"SiPixelCablingSoAESProducer") <<
" Not found: " << mapView[
i].rawId() << std::endl;
111 mapView[
i].moduleId() = gdet->index();
113 LogDebug(
"SiPixelCablingSoAESProducer")
114 <<
"----------------------------------------------------------------------------" << std::endl;
115 LogDebug(
"SiPixelCablingSoAESProducer") <<
i << std::setw(20) << mapView[
i].fed() << std::setw(20)
116 << mapView[
i].link() << std::setw(20) << mapView[
i].roc() << std::endl;
117 LogDebug(
"SiPixelCablingSoAESProducer")
118 <<
i << std::setw(20) << mapView[
i].rawId() << std::setw(20) << mapView[
i].rocInDet() << std::setw(20)
119 << mapView[
i].moduleId() << std::endl;
120 LogDebug(
"SiPixelCablingSoAESProducer")
121 <<
i << std::setw(20) << mapView[
i].badRocs() << std::setw(20) << std::endl;
122 LogDebug(
"SiPixelCablingSoAESProducer")
123 <<
"----------------------------------------------------------------------------" << std::endl;
126 mapView.size() =
index - 1;
ESTransientHandle< ProductT > getTransientHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
uint32_t cc[maxCellsPerHit]
SiPixelCablingSoAESProducer(edm::ParameterSet const &iConfig)
std::optional< SiPixelMappingHost > produce(const SiPixelMappingSoARecord &iRecord)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geometryToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > qualityToken_
constexpr unsigned int MAX_ROC
#define DEFINE_FWK_EVENTSETUP_ALPAKA_MODULE(type)
constexpr unsigned int MAX_SIZE
constexpr unsigned int MAX_LINK
uint32_t rawId() const
return the DetUnit to which this ROC belongs to.
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
constexpr uint16_t invalidModuleId