26 findingRecord<SiStripFedCablingRcd>();
29 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 30 <<
" Constructing object...";
37 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 38 <<
" CablingSource configurable set to \"" << source <<
"\"" 39 <<
". CablingSource member data set to: \"" 47 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 48 <<
" Destructing object...";
55 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 56 <<
" Constructing FED cabling...";
67 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 68 <<
" Pointer to SiStripConfigDb: 0x" 69 << std::setw(8) << std::setfill(
'0')
73 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 74 <<
" NULL pointer to SiStripConfigDb returned by DB \"service\"!" 75 <<
" Cannot build FED cabling object!";
102 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 103 <<
" NULL pointers to DeviceFactory and DatabaseCache returned by SiStripConfigDb!" 104 <<
" Cannot build FED cabling object!";
123 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 124 <<
" Unexpected value for CablingSource: \"" 126 <<
"\" Querying DB in order to build cabling from one of connections, devices or DetIds...";
133 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 134 <<
" Cannot build SiStripFecCabling object!" 135 <<
" sistrip::CablingSource has value: " 143 std::stringstream ss;
144 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 145 <<
" Built SiStripFecCabling object with following devices:" 156 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 157 <<
" Building cabling object...";
165 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 166 <<
" Cannot build SiStripFecCabling object!" 167 <<
" FedConnections, DeviceDescriptions and DcuDetIds vectors are all empty!";
174 std::stringstream ss;
175 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 176 <<
" Built SiStripFecCabling object with following devices:" 177 << std::endl << devices;
221 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 222 <<
" Building FEC cabling from FED connections descriptions...";
231 if ( conns.empty() ) {
233 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 234 <<
" Unable to build FEC cabling!" 235 <<
" No entries in FedConnections vector!";
242 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 243 <<
" Retrieving DCU-DetId vector from database...";
246 if ( !dcu_detid_vector.empty() ) {
248 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 249 <<
" Found " << dcu_detid_vector.size()
250 <<
" entries in DCU-DetId vector retrieved from database!";
253 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 254 <<
" No entries in DCU-DetId vector retrieved from database!";
259 SiStripConfigDb::FedConnectionsV::const_iterator ifed = conns.begin();
260 SiStripConfigDb::FedConnectionsV::const_iterator jfed = conns.end();
261 for ( ; ifed != jfed; ++ifed ) {
265 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 266 <<
" NULL pointer to FedConnection!";
272 uint16_t fec_slot =
static_cast<uint16_t
>( (*ifed)->getFecSlot() );
274 uint16_t ccu_addr =
static_cast<uint16_t
>( (*ifed)->getCcuAddress() );
275 uint16_t ccu_chan =
static_cast<uint16_t
>( (*ifed)->getI2cChannel() );
276 uint16_t apv0 =
static_cast<uint16_t
>( (*ifed)->getApvAddress() );
277 uint16_t apv1 = apv0 + 1;
278 uint32_t dcu_id =
static_cast<uint32_t
>( (*ifed)->getDcuHardId() );
281 uint16_t fed_id =
static_cast<uint16_t
>( (*ifed)->getFedId() );
282 uint16_t fed_ch =
static_cast<uint16_t
>( (*ifed)->getFedChannel() );
287 dcu_id, det_id, npairs,
293 fed_crate =
static_cast<uint16_t
>( (*ifed)->getFedCrateId() );
294 fed_slot =
static_cast<uint16_t
>( (*ifed)->getFedSlot() );
354 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 355 <<
" Building FEC cabling object from device descriptions...";
364 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 365 <<
" Retrieving APV descriptions from database...";
367 if ( !apv_desc.empty() ) {
369 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 370 <<
" Retrieved " << apv_desc.size()
371 <<
" APV descriptions from database!";
374 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 375 <<
" Unable to build FEC cabling!" 376 <<
" No APV descriptions found!";
383 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 384 <<
" Retrieving DCU descriptions from database...";
387 if ( !dcu_desc.empty() ) {
391 SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu;
392 for ( idcu = dcu_desc.begin(); idcu != dcu_desc.end(); idcu++ ) {
393 dcuDescription* dcu =
dynamic_cast<dcuDescription*
>( *idcu );
394 if ( !dcu ) {
continue; }
395 if ( dcu->getDcuType() ==
"FEH" ) { feh++; }
400 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 401 <<
" Retrieved " << feh
402 <<
" DCU-FEH descriptions from database!" 403 <<
" (and a further " << ccu <<
" DCUs for CCU modules, etc...)";
407 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 408 <<
" No DCU descriptions found!";
415 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 416 <<
" Retrieving DCU-DetId vector from database...";
419 if ( !dcu_detid_vector.empty() ) {
421 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 422 <<
" Found " << dcu_detid_vector.size()
423 <<
" entries in DCU-DetId vector retrieved from database!";
426 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 427 <<
" No entries in DCU-DetId vector retrieved from database!";
433 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 434 <<
" Retrieving FED ids from database...";
437 if ( !fed_ids.empty() ) {
439 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 440 <<
" Retrieved " << fed_ids.size()
441 <<
" FED ids from database!";
444 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 445 <<
" No FED ids found!";
451 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 452 <<
" Building FEC cabling object from APV and DCU descriptions...";
454 SiStripConfigDb::DeviceDescriptionsV::const_iterator iapv;
455 for ( iapv = apv_desc.begin(); iapv != apv_desc.end(); iapv++ ) {
459 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 460 <<
" NULL pointer to DeviceDescription (of type APV25)!";
475 SiStripConfigDb::DeviceDescriptionsV::const_iterator idcu;
476 for ( idcu = dcu_desc.begin(); idcu != dcu_desc.end(); idcu++ ) {
480 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 481 <<
" NULL pointer to DeviceDescription (of type DCU)!";
486 dcuDescription* dcu =
dynamic_cast<dcuDescription*
>( *idcu );
487 if ( !dcu ) {
continue; }
488 if ( dcu->getDcuType() !=
"FEH" ) {
continue; }
495 dcu->getDcuHardId() );
496 fec_cabling.
dcuId( conn );
501 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 502 <<
" Finished building FEC cabling object from APV and DCU descriptions!";
505 std::stringstream ss1;
506 ss1 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 507 <<
" Number of devices in FEC cabling object:" << std::endl;
513 std::vector<uint16_t>::const_iterator ifed = fed_ids.begin();
518 std::vector<uint32_t> used_keys;
521 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 522 <<
" Randomly assigning FED ids/channels to APV pairs in front-end modules...";
524 if ( fed_ids.empty() ) {
526 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 527 <<
" No FED ids retrieved from database! Unable to cable system!";
530 bool complete =
false;
531 std::vector<SiStripFecCrate>::const_iterator icrate = fec_cabling.
crates().begin();
532 std::vector<SiStripFecCrate>::const_iterator jcrate = fec_cabling.
crates().end();
533 while ( !complete && icrate != jcrate ) {
534 std::vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin();
535 std::vector<SiStripFec>::const_iterator jfec = icrate->fecs().end();
536 while ( !complete && ifec != jfec ) {
537 std::vector<SiStripRing>::const_iterator iring = ifec->rings().begin();
538 std::vector<SiStripRing>::const_iterator jring = ifec->rings().end();
539 while ( !complete && iring != jring ) {
540 std::vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin();
541 std::vector<SiStripCcu>::const_iterator jccu = iring->ccus().end();
542 while ( !complete && iccu != jccu ) {
543 std::vector<SiStripModule>::const_iterator imod = iccu->modules().begin();
544 std::vector<SiStripModule>::const_iterator jmod = iccu->modules().end();
545 while ( !complete && imod != jmod ) {
554 imod->ccuChan() ).
key() );
571 for ( uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++ ) {
574 if ( ifed == fed_ids.end() ) { fed_ch++; ifed = fed_ids.begin(); }
575 if ( fed_ch == 96 ) {
577 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 578 <<
" Insufficient FED channels to cable all devices in control system!";
584 pair<uint16_t,uint16_t> addr = imod->activeApvPair( imod->lldChannel(ipair) );
607 std::sort( used_keys.begin(), used_keys.end() );
610 std::stringstream ss2;
611 ss2 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 612 <<
" Number of devices in FEC cabling object:" << std::endl;
617 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 618 <<
" Finished randomly assigning FED ids/channels to APV pairs in front-end modules...";
623 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 624 <<
" Assigning APV pairs in dummy front-end modules to any remaining \"uncabled\" FED ids/channels...";
626 if ( fed_ids.empty() ) {
628 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 629 <<
" No FED ids retrieved from database! Unable to cable system!";
633 bool complete =
false;
634 while ( !complete ) {
638 if ( ifed == fed_ids.end() ) { fed_ch++; ifed = fed_ids.begin(); }
639 if ( fed_ch == 96 ) {
641 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 642 <<
" All FED channels are now cabled!";
668 uint16_t fed_crate = (*ifed)/16+1;
669 uint16_t fed_slot = (*ifed)%16+2;
682 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 683 <<
" Finished assigning APV pairs in dummy front-end modules to any remaining \"uncabled\" FED ids/channels...";
686 std::stringstream ss3;
687 ss3 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 688 <<
" Number of devices in FEC cabling object:" << std::endl;
739 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 740 <<
" Building FEC cabling object from DetIds...";
747 uint32_t chans_per_ccu = 10;
748 uint32_t ccus_per_ring = 10;
749 uint32_t rings_per_fec = 8;
750 uint32_t fecs_per_crate = 11;
756 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 757 <<
" Retrieving DCU-DetId vector from database...";
760 if ( !dcu_detid_vector.empty() ) {
762 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 763 <<
" Found " << dcu_detid_vector.size()
764 <<
" entries in DCU-DetId vector retrieved from database!";
767 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 768 <<
" No entries in DCU-DetId vector retrieved from database!" 769 <<
" Unable to build FEC cabling!";
775 uint32_t imodule = 0;
776 SiStripConfigDb::DcuDetIdsV::const_iterator iter;
777 for ( iter = dcu_detid_vector.begin(); iter != dcu_detid_vector.end(); iter++ ) {
779 if ( !(iter->second) ) {
781 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 782 <<
" NULL pointer to TkDcuInfo!";
786 uint16_t fec_crate = ( imodule / ( chans_per_ccu * ccus_per_ring * rings_per_fec * fecs_per_crate ) ) + 1;
787 uint16_t fec_slot = ( imodule / ( chans_per_ccu * ccus_per_ring * rings_per_fec ) ) % fecs_per_crate + 2;
788 uint16_t fec_ring = ( imodule / ( chans_per_ccu * ccus_per_ring ) ) % rings_per_fec + 1;
789 uint16_t ccu_addr = ( imodule / ( chans_per_ccu) ) % ccus_per_ring + 1;
790 uint16_t ccu_chan = ( imodule ) % chans_per_ccu + 16;
792 uint32_t dcu_id = iter->second->getDcuHardId();
793 uint32_t det_id = iter->second->getDetId();
794 uint16_t npairs = iter->second->getApvNumber()/2;
795 uint16_t length = (uint16_t) iter->second->getFibreLength();
806 if ( !det_id ) { det_id = 0xFFFF + imodule; }
807 if ( !npairs ) { npairs =
rand()/2 ? 2 : 3; }
811 for ( uint16_t ipair = 0; ipair < npairs; ipair++ ) {
812 uint16_t iapv = ( ipair == 1 && npairs == 2 ? 36 : 32 + 2 * ipair ) ;
819 dcu_id, det_id, npairs,
822 true,
true,
true,
true );
831 uint32_t fed_id = 50;
833 for ( vector<SiStripFecCrate>::const_iterator icrate = fec_cabling.
crates().begin(); icrate != fec_cabling.
crates().end(); icrate++ ) {
834 for ( vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++ ) {
835 for ( vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end(); iring++ ) {
836 for ( vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end(); iccu++ ) {
837 for ( vector<SiStripModule>::const_iterator imod = iccu->modules().begin(); imod != iccu->modules().end(); imod++ ) {
838 if ( 96-fed_ch < imod->nApvPairs() ) { fed_id++; fed_ch = 0; }
839 for ( uint16_t ipair = 0; ipair < imod->nApvPairs(); ipair++ ) {
840 pair<uint16_t,uint16_t> addr = imod->activeApvPair( (*imod).lldChannel(ipair) );
859 const std::vector< std::pair<uint32_t,TkDcuInfo*> >& _in ) {
860 std::vector< std::pair<uint32_t,TkDcuInfo*> >
in = _in;
865 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 866 <<
" No entries in DCU-DetId vector!";
872 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 873 <<
" Assigning DCU ids and DetIds to constructed modules...";
875 uint16_t channels = 0;
879 uint16_t missing = 0;
881 for ( vector<SiStripFecCrate>::const_iterator icrate = fec_cabling.
crates().begin(); icrate != fec_cabling.
crates().end(); icrate++ ) {
882 for ( vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++ ) {
883 for ( vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end(); iring++ ) {
884 for ( vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end(); iccu++ ) {
885 for ( vector<SiStripModule>::const_iterator imod = iccu->modules().begin(); imod != iccu->modules().end(); imod++ ) {
893 if ( !module.
dcuId() ) {
899 uint32_t module_key =
path.key();
900 module.
dcuId( module_key );
902 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 903 <<
" Found NULL DcuId! Setting 'dummy' value based control key 0x" 904 << hex << setw(8) << setfill(
'0') << module_key <<
dec;
910 if ( !module.
detId() ) {
914 SiStripConfigDb::DcuDetIdsV::iterator iter = in.end();
916 if ( iter != in.end() ) {
918 if ( !(iter->second) ) {
920 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 921 <<
" NULL pointer to TkDcuInfo!";
927 module.
detId( iter->second->getDetId() );
931 uint16_t pairs = iter->second->getApvNumber()/2;
933 if ( pairs == 2 ) { four++; }
934 else if ( pairs == 3 ) { six++; }
941 missing += ( iter->second->getApvNumber()/2 - module.
nApvPairs() );
943 ss1 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" << std::endl
944 <<
" Module with DCU id 0x" 945 << hex << setw(8) << setfill(
'0') << module.
dcuId() <<
dec 947 << hex << setw(8) << setfill(
'0') << module.
detId() <<
dec 948 <<
" has unexpected number of APV pairs (" 949 << module.
nApvPairs() <<
")." << std::endl
950 <<
" Some APV pairs may have not been detected by the FEC scan." << std::endl
951 <<
" Setting to value found in static map (" 952 << iter->second->getApvNumber()/2 <<
")...";
954 module.
nApvPairs( iter->second->getApvNumber()/2 );
956 }
else if ( module.
nApvPairs() < iter->second->getApvNumber()/2 ) {
958 missing += ( iter->second->getApvNumber()/2 - module.
nApvPairs() );
960 ss2 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" << std::endl
961 <<
" Module with DCU id 0x" 962 << hex << setw(8) << setfill(
'0') << module.
dcuId() <<
dec 964 << hex << setw(8) << setfill(
'0') << module.
detId() <<
dec 965 <<
" has number of APV pairs (" 967 <<
") that does not match value found in DCU-DetId vector (" 968 << iter->second->getApvNumber()/2 <<
")." << std::endl
969 <<
" Some APV pairs may have not been detected by" 970 <<
" the FEC scan or the DCU-DetId vector may be incorrect." << std::endl
971 <<
" Setting to value found in static map (" 972 << iter->second->getApvNumber()/2 <<
")...";
974 module.
nApvPairs( iter->second->getApvNumber()/2 );
981 module.
length( static_cast<uint16_t>( iter->second->getFibreLength() ) );
997 std::stringstream sss;
998 sss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" << std::endl
999 <<
" Connections in DCU-DetId map : " << channels << std::endl
1000 <<
" 4-APV modules : " << four << std::endl
1001 <<
" 6-APV modules : " << six << std::endl
1002 <<
" Unknown number of APV pairs : " << unknown << std::endl
1003 <<
" Total found APV pairs : " << ( channels - missing ) << std::endl
1004 <<
" Total missing APV pairs : " << missing << std::endl;
1008 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1009 <<
" Finished assigning DCU ids and DetIds to constructed modules...";
1014 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1015 <<
" Assigning \"random\" DetIds to modules with DCU ids not found in static table...";
1017 uint32_t detid = 0x10000;
1018 for ( vector<SiStripFecCrate>::const_iterator icrate = fec_cabling.
crates().begin(); icrate != fec_cabling.
crates().end(); icrate++ ) {
1019 for ( vector<SiStripFec>::const_iterator ifec = icrate->fecs().begin(); ifec != icrate->fecs().end(); ifec++ ) {
1020 for ( vector<SiStripRing>::const_iterator iring = ifec->rings().begin(); iring != ifec->rings().end(); iring++ ) {
1021 for ( vector<SiStripCcu>::const_iterator iccu = iring->ccus().begin(); iccu != iring->ccus().end(); iccu++ ) {
1022 for ( vector<SiStripModule>::const_iterator imod = iccu->modules().begin(); imod != iccu->modules().end(); imod++ ) {
1027 if ( !module.
detId() ) {
1029 SiStripConfigDb::DcuDetIdsV::iterator iter = in.end();
1031 if ( iter != in.end() ) {
1035 SiStripConfigDb::DcuDetIdsV::iterator idcu;
1036 if ( in.empty() ) { idcu = in.end(); }
1039 while ( idcu != in.end() ) {
1040 if ( idcu->second ) {
1041 if ( static_cast<uint32_t>(idcu->second->getApvNumber()) ==
1042 static_cast<uint32_t>(2*module.
nApvPairs()) ) {
break; }
1050 if ( idcu != in.end() ) {
1052 if ( !(idcu->second) ) {
1054 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1055 <<
" NULL pointer to TkDcuInfo!";
1059 module.
detId( idcu->second->getDetId() );
1063 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1064 <<
" Did not find module with DCU id 0x" 1065 << hex << setw(8) << setfill(
'0') << module.
dcuId() <<
dec 1066 <<
" in DCU-DetId vector!" << endl
1067 <<
" Assigned 'random' DetId 0x" 1068 << hex << setw(8) << setfill(
'0') << module.
detId() <<
dec;
1074 module.
detId( detid );
1079 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1080 <<
" Did not find module with DCU id 0x" 1081 << hex << setw(8) << setfill(
'0') << module.
dcuId() <<
dec 1082 <<
" in DCU-DetId vector!" 1083 <<
" Could not assign 'random' DetId as DCU-DetID map is empty!" 1084 <<
" Assigned DetId based on incremented counter, with value 0x" 1085 << hex << setw(8) << setfill(
'0') << module.
detId() <<
dec;
1087 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1088 <<
" Did not find module with DCU id 0x" 1089 << hex << setw(8) << setfill(
'0') << module.
dcuId() <<
dec 1090 <<
" in DCU-DetId vector!" 1091 <<
" Could not assign 'random' DetId as no modules had appropriate number of APV pairs (" 1093 <<
"). Assigned DetId based on incremented counter, with value 0x" 1094 << hex << setw(8) << setfill(
'0') << module.
detId() <<
dec;
1110 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1111 <<
" Finished assigning \"random\" DetIds to modules with DCU ids not found in static table...";
1114 <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1115 <<
" Assigning \"random\" DetIds to modules with DCU ids not found in static table...";
1119 if ( !in.empty() ) {
1121 ss <<
"[SiStripFedCablingBuilderFromDb::" << __func__ <<
"]" 1122 <<
" Not all DetIds have been assigned to a DcuId! " 1123 << in.size() <<
" DetIds are unassigned!";
1133 vector<FedChannelConnection> conns;
Device and connection information at the level of a front-end module.
T getUntrackedParameter(std::string const &, T const &) const
static uint16_t ccuAddr(const uint16_t &nth_module)
void print(std::stringstream &) const
static uint16_t fecCrate(const uint16_t &nth_module)
DcuDetIds::range DcuDetIdsRange
static void buildFecCablingFromDetIds(SiStripConfigDb *const, SiStripFecCabling &)
DeviceFactory *const deviceFactory(std::string method_name="") const
static const uint32_t invalid32_
static const uint16_t LLD_CHAN_MIN
static const uint16_t LLD_CHAN_MAX
void addDevices(const FedChannelConnection &conn)
static const uint16_t FEC_RING_OFFSET
static const IOVSyncValue & endOfTime()
~SiStripFedCablingBuilderFromDb() override
const std::vector< SiStripFecCrate > & crates() const
SiStripFedCablingBuilderFromDb(const edm::ParameterSet &)
static uint16_t fecSlot(const uint16_t &nth_module)
static uint16_t fecRing(const uint16_t &nth_module)
const uint16_t & i2cAddr() const
FedConnections::range FedConnectionsRange
static void assignDcuAndDetIds(SiStripFecCabling &, const std::vector< std::pair< uint32_t, TkDcuInfo * > > &)
const uint32_t & key() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
static void getFecCabling(const SiStripFedCabling &in, SiStripFecCabling &out)
static const char mlCabling_[]
const uint16_t & length() const
static DcuDetIdsV::const_iterator findDcuDetId(DcuDetIdsV::const_iterator begin, DcuDetIdsV::const_iterator end, uint32_t dcu_id)
static const IOVSyncValue & beginOfTime()
void connections(std::vector< FedChannelConnection > &) const
const uint16_t & fedSlot() const
static void buildFecCabling(SiStripConfigDb *const, SiStripFecCabling &, const sistrip::CablingSource &)
Class containning control, module, detector and connection information, at the level of a FED channel...
DeviceDescriptions::range DeviceDescriptionsRange
FedConnectionsRange getFedConnections(std::string partition="")
void dcuId(const FedChannelConnection &conn)
An interface class to the DeviceFactory.
virtual void writeFedCablingToCondDb(const SiStripFedCabling &)
FedIdsRange getFedIds(std::string partition="")
Abstract base class for producer of SiStripFedCabling record.
DeviceAddress deviceAddress(const deviceDescription &)
void buildFecCabling(const SiStripFedCabling &)
void buildFedCabling(ConnsConstIterRange connections)
Simple container class for counting devices.
DbClient *const databaseCache(std::string method_name="") const
static uint16_t ccuChan(const uint16_t &nth_module)
static void getFedCabling(const SiStripFecCabling &in, SiStripFedCabling &out)
const uint16_t & nApvPairs() const
const uint32_t & dcuId() const
std::vector< DcuDetId > DcuDetIdsV
static const uint16_t invalid_
sistrip::CablingSource source_
const uint32_t & detId() const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
const uint16_t & fedCrate() const
boost::iterator_range< FedIds::const_iterator > FedIdsRange
static std::string cablingSource(const sistrip::CablingSource &)
static const uint16_t FEC_CRATE_OFFSET
FedChannel fedCh(const uint16_t &apv_pair_num) const
static void buildFecCablingFromFedConnections(SiStripConfigDb *const, SiStripFecCabling &)
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
DcuDetIdsRange getDcuDetIds(std::string partition="")
static std::string const source
NumberOfDevices countDevices() const
static void buildFecCablingFromDevices(SiStripConfigDb *const, SiStripFecCabling &)
SiStripFedCabling * make(const SiStripFedCablingRcd &) override