21 findingRecord<SiStripFedCablingRcd>();
23 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]" 24 <<
" Constructing object...";
30 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]" 31 <<
" Destructing object...";
37 edm::LogVerbatim(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]" 38 <<
" Building \"fake\" FED cabling map" 39 <<
" from real DetIds and FedIds (read from ascii file)";
45 typedef std::vector<uint32_t> Dets;
49 typedef std::vector<uint16_t> Feds;
56 Dets::const_iterator idet = dets.begin();
57 Dets::const_iterator jdet = dets.end();
58 for (; idet != jdet; ++idet) {
60 for (uint16_t ipair = 0; ipair < npairs; ++ipair) {
62 if (npairs == 2 && ipair == 0) {
64 }
else if (npairs == 2 && ipair == 1) {
66 }
else if (npairs == 3 && ipair == 0) {
68 }
else if (npairs == 3 && ipair == 1) {
70 }
else if (npairs == 3 && ipair == 2) {
73 edm::LogWarning(
"FedCabling") <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]" 74 <<
" Inconsistent values for nPairs (" << npairs <<
") and ipair (" << ipair
95 bool insufficient =
false;
96 Feds::const_iterator ifed =
feds.begin();
98 for (std::vector<SiStripFecCrate>::const_iterator icrate = fec_cabling->
crates().begin();
99 icrate != fec_cabling->
crates().end();
101 for (std::vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++) {
102 for (std::vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end();
104 for (std::vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end();
106 for (std::vector<SiStripModule>::const_iterator imod = iccu->modules().begin(); imod != iccu->modules().end();
108 if (populateAllFeds) {
109 for (uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++) {
110 if (ifed ==
feds.end()) {
119 std::pair<uint16_t, uint16_t>
addr = imod->activeApvPair(imod->lldChannel(ipair));
132 if (96 - fed_ch < imod->nApvPairs()) {
136 for (uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++) {
137 std::pair<uint16_t, uint16_t>
addr = imod->activeApvPair((*imod).lldChannel(ipair));
154 <<
" Insufficient FED channels to cable entire system!";
158 std::stringstream
ss;
159 ss <<
"[SiStripFedCablingFakeESSource::" << __func__ <<
"]" 160 <<
" First count devices of FEC cabling " << std::endl;
165 std::vector<FedChannelConnection> conns;
Log< level::Info, true > LogVerbatim
Device and connection information at the level of a front-end module.
static uint16_t ccuAddr(const uint16_t &nth_module)
T getParameter(std::string const &) const
static uint16_t fecCrate(const uint16_t &nth_module)
std::string fullPath() const
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
void addDevices(const FedChannelConnection &conn)
~SiStripFedCablingFakeESSource() override
NumberOfDevices countDevices() const
static const IOVSyncValue & endOfTime()
static uint16_t fecSlot(const uint16_t &nth_module)
static uint16_t fecRing(const uint16_t &nth_module)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
static const char mlCabling_[]
static const IOVSyncValue & beginOfTime()
Class containning control, module, detector and connection information, at the level of a FED channel...
void print(std::stringstream &) const
const uint32_t & key() const
FedChannel fedCh(const uint16_t &apv_pair_num) const
Abstract base class for producer of SiStripFedCabling record.
void connections(std::vector< FedChannelConnection > &) const
SiStripDetInfo read(std::string filePath)
const std::vector< SiStripFecCrate > & crates() const
SiStripFedCablingFakeESSource(const edm::ParameterSet &)
static uint16_t ccuChan(const uint16_t &nth_module)
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
SiStripFedCabling * make(const SiStripFedCablingRcd &) override
Log< level::Warning, false > LogWarning
const std::vector< uint32_t > & getAllDetIds() const noexcept
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override