274 const LArOnOffIdMap * onOffIdMap_c;
276 if(
sc!=StatusCode::SUCCESS){
280 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
282 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
284 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
287 VONOFF::const_iterator it = onOffId_P->m_v.begin();
288 VONOFF::const_iterator it_e = onOffId_P->m_v.end();
291 ATH_MSG_DEBUG(
" Persistent LArOnOffId_P version = "<<onOffId_P->m_version );
292 for (; it!=it_e;++it)
294 const LArOnOffId_P::LArOnOffId_P_t& t = *it;
297 <<
" sample="<<t.sample
298 <<
" region="<<t.region
302 <<
" slot="<<t.feb_slot
303 <<
" chan="<<t.feb_chan
304 <<
" calib_slot="<<t.calib_slot
305 <<
" calib_line="<<t.calib_line );
311 const LArFebRodMap * febRodMap_c;
313 if(
sc!=StatusCode::SUCCESS){
318 LArFebRodMap* febRodMap=
const_cast<LArFebRodMap*
>(febRodMap_c);
320 LArFebRod_P* febRod_P = febRodMap->getP();
322 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
325 VFEBROD::const_iterator it2 = febRod_P->m_v.begin();
326 VFEBROD::const_iterator it2_e = febRod_P->m_v.end();
329 ATH_MSG_DEBUG(
" Persistent LArFebRod_P version = "<< febRod_P->m_version );
331 for (; it2!=it2_e;++it2)
333 const LArFebRod_P::LArFebRod_P_t& t = *it2;
336 <<
" rosfrag="<<t.rosfrag
337 <<
" robfrag="<<t.robfrag
338 <<
" rodfrag="<<t.rodfrag
339 <<
" rodcrate="<<t.rodcrate
340 <<
" rodslot="<<t.rodslot
341 <<
" ft_det="<<t.ft_det
343 <<
" ft_num="<<t.ft_num
344 <<
" ft_slot="<<t.ft_slot );
389 const LArOnOffIdMap * onOffIdMap_c;
391 if(
sc!=StatusCode::SUCCESS){
395 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
397 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
399 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
402 if( onOffId_P->m_version!=0){
403 ATH_MSG_ERROR(
" The FCAL Fix should only be done toversion=0" );
404 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
405 return StatusCode::FAILURE;
408 VONOFF::iterator it = onOffId_P->m_v.begin();
409 VONOFF::iterator it_e = onOffId_P->m_v.end();
412 onOffId_P->m_version = 1 ;
413 for (; it!=it_e;++it)
415 LArOnOffId_P::LArOnOffId_P_t& t = *it;
419 unsigned int feb = t.feb_slot ;
421 ATH_MSG_INFO(
" Fixing this FCAL channel, before and after" );
425 <<
" sample="<<t.sample
426 <<
" region="<<t.region
430 <<
" slot="<<t.feb_slot
431 <<
" chan="<<t.feb_chan
432 <<
" calib_slot="<<t.calib_slot
433 <<
" calib_line="<<t.calib_line );
436 t.feb_slot=t.feb_slot+1;
440 <<
" sample="<<t.sample
441 <<
" region="<<t.region
445 <<
" slot="<<t.feb_slot
446 <<
" chan="<<t.feb_chan
447 <<
" calib_slot="<<t.calib_slot
448 <<
" calib_line="<<t.calib_line );
453 if( t.det==9 && abs(t.pn)==1 && t.sample==1 && t.region==0 && t.eta==0 ) {
455 ATH_MSG_INFO(
" Fixing this Barrel Strip channel, before and after" );
459 <<
" sample="<<t.sample
460 <<
" region="<<t.region
464 <<
" slot="<<t.feb_slot
465 <<
" chan="<<t.feb_chan
466 <<
" calib_slot="<<t.calib_slot
467 <<
" calib_line="<<t.calib_line );
475 <<
" sample="<<t.sample
476 <<
" region="<<t.region
480 <<
" slot="<<t.feb_slot
481 <<
" chan="<<t.feb_chan
482 <<
" calib_slot="<<t.calib_slot
483 <<
" calib_line="<<t.calib_line );
492 const LArFebRodMap * febRodMap_c;
494 if(
sc!=StatusCode::SUCCESS){
499 LArFebRodMap* febRodMap=
const_cast<LArFebRodMap*
>(febRodMap_c);
501 LArFebRod_P* febRod_P = febRodMap->getP();
503 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
505 VFEBROD::iterator it2 = febRod_P->m_v.begin();
506 VFEBROD::iterator it2_e = febRod_P->m_v.end();
508 if(febRod_P->m_version!=0){
510 ATH_MSG_ERROR(
" wrong Persistent LArFebRod_P version = "<< febRod_P->m_version );
512 return StatusCode::FAILURE;
517 febRod_P->m_version = 1;
519 for (; it2!=it2_e;++it2)
521 LArFebRod_P::LArFebRod_P_t& t = *it2;
523 if( (t.det ==71 || t.det ==72 ) && t.ft_slot>=8 )
526 ATH_MSG_INFO(
" Fixing FEB slot number, before and after " );
530 <<
" rosfrag="<<t.rosfrag
531 <<
" robfrag="<<t.robfrag
532 <<
" rodfrag="<<t.rodfrag
533 <<
" rodcrate="<<t.rodcrate
534 <<
" rodslot="<<t.rodslot
535 <<
" ft_det="<<t.ft_det
537 <<
" ft_num="<<t.ft_num
538 <<
" ft_slot="<<t.ft_slot );
540 t.ft_slot=t.ft_slot+1;
543 <<
" rosfrag="<<t.rosfrag
544 <<
" robfrag="<<t.robfrag
545 <<
" rodfrag="<<t.rodfrag
546 <<
" rodcrate="<<t.rodcrate
547 <<
" rodslot="<<t.rodslot
548 <<
" ft_det="<<t.ft_det
550 <<
" ft_num="<<t.ft_num
551 <<
" ft_slot="<<t.ft_slot );
558 return StatusCode::SUCCESS;
597 const LArOnOffIdMap * onOffIdMap_c;
599 std::vector<int> nfixes;
602 if(
sc!=StatusCode::SUCCESS){
606 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
608 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
610 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
613 if( onOffId_P->m_version!=1){
615 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
616 return StatusCode::FAILURE;
619 VONOFF::iterator it = onOffId_P->m_v.begin();
620 VONOFF::iterator it_e = onOffId_P->m_v.end();
623 onOffId_P->m_version = 2 ;
624 for (; it!=it_e;++it)
626 LArOnOffId_P::LArOnOffId_P_t& t = *it;
630 if(t.pn==-2 || t.pn==-3)
636 if( t.calib_line==2) {
640 if( t.calib_line==3) {
646 if( t.calib_line==68){
650 if( t.calib_line==69) {
657 if( t.calib_line==72) {
662 if( t.calib_line==73) {
670 if(t.pn==2 || t.pn==3 )
681 if( t.calib_slot==4 && t.calib_line==0) {
685 if( t.calib_slot==4 && t.calib_line==1) {
693 if( t.calib_line==64) {
697 if( t.calib_line==65) {
701 if( t.calib_line==66) {
705 if( t.calib_line==67) {
713 if(t.ft_num==16 && t.feb_slot==2){
720 if(t.ft_num==23 && t.feb_slot==4){
721 if(t.feb_chan>=64 && t.feb_chan<=71){
723 ifix = 14+ (t.feb_chan-64) ;
724 t.feb_chan= t.feb_chan+24 ;
735 if(t.pn==2 || t.pn==3)
737 if(t.ft_num==16 && t.feb_slot==2){
743 if(t.ft_num==23 && t.feb_slot==4){
744 if(t.feb_chan>=88 && t.feb_chan<=95){
746 ifix = 23+ (t.feb_chan-88) ;
747 t.feb_chan= t.feb_chan-24 ;
761 <<
" sample="<<t.sample
762 <<
" region="<<t.region
766 <<
" slot="<<t.feb_slot
767 <<
" chan="<<t.feb_chan
768 <<
" calib_slot="<<t.calib_slot
769 <<
" calib_line="<<t.calib_line );
776 for(
unsigned int i=0;i<30;++i){
780 return StatusCode::SUCCESS;
788 const LArOnOffIdMap * onOffIdMap_c;
790 std::vector<int> nfixes;
793 if(
sc!=StatusCode::SUCCESS){
797 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
799 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
801 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
804 if( onOffId_P->m_version!=2){
806 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
807 return StatusCode::FAILURE;
810 VONOFF::iterator it = onOffId_P->m_v.begin();
811 VONOFF::iterator it_e = onOffId_P->m_v.end();
814 onOffId_P->m_version = 3 ;
815 for (; it!=it_e;++it)
818 LArOnOffId_P::LArOnOffId_P_t& t = *it;
819 if( t.det == 0 || t.det==9 )
821 if(t.pn==-3 || t.pn==3)
831 if(t.ft_num==3 || t.ft_num==10 || t.ft_num==16 || t.ft_num==22){
832 if( t.feb_slot==1 || t.feb_slot==2 ) {
834 bool special = t.pn==3 && t.ft_num==16 && t.feb_slot==2;
884 if(t.feb_chan==122 && !special)
888 if(t.feb_chan==124 && !special)
914 <<
" sample="<<t.sample
915 <<
" region="<<t.region
919 <<
" slot="<<t.feb_slot
920 <<
" chan="<<t.feb_chan
921 <<
" calib_slot="<<t.calib_slot
922 <<
" calib_line="<<t.calib_line );
928 for(
unsigned int i=0;i<nfixes.size();++i){
932 return StatusCode::SUCCESS;
941 const LArOnOffIdMap * onOffIdMap_c;
943 std::vector<int> nfixes;
946 if(
sc!=StatusCode::SUCCESS){
950 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
952 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
954 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
956 if( onOffId_P->m_version!=3){
958 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
959 return StatusCode::FAILURE;
962 VONOFF::iterator it = onOffId_P->m_v.begin();
963 VONOFF::iterator it_e = onOffId_P->m_v.end();
966 onOffId_P->m_version = onOffId_P->m_version+1 ;
967 for (; it!=it_e;++it)
970 LArOnOffId_P::LArOnOffId_P_t& t = *it;
973 if( t.det == 7 && t.pn==-2 && t.ft_num==6 &&
974 t.feb_slot==14 && t.feb_chan==95 )
978 t.calib_line=t.feb_chan;
981 if( t.det == 7 && t.pn==-2 && t.ft_num==6 &&
982 t.feb_slot==15 && t.feb_chan==95 )
986 t.calib_line=t.feb_chan;
989 if( t.det == 2 && t.pn==-2 && t.ft_num==6 &&
990 t.feb_slot==14 && t.feb_chan==47 )
997 if( t.det == 2 && t.pn==-2 && t.ft_num==6 &&
998 t.feb_slot==15 && t.feb_chan==47 )
1006 if( t.det == 7 && t.pn==2 && t.ft_num==6 &&
1007 t.feb_slot==14 && t.feb_chan==47 )
1011 t.calib_line=t.feb_chan;
1014 if( t.det == 7 && t.pn==2 && t.ft_num==6 &&
1015 t.feb_slot==15 && t.feb_chan==47 )
1019 t.calib_line=t.feb_chan;
1022 if( t.det == 2 && t.pn==2 && t.ft_num==6 &&
1023 t.feb_slot==14 && t.feb_chan==95 )
1030 if( t.det == 2 && t.pn==2 && t.ft_num==6 &&
1031 t.feb_slot==15 && t.feb_chan==95 )
1046 <<
" sample="<<t.sample
1047 <<
" region="<<t.region
1051 <<
" slot="<<t.feb_slot
1052 <<
" chan="<<t.feb_chan
1053 <<
" calib_slot="<<t.calib_slot
1054 <<
" calib_line="<<t.calib_line );
1060 for(
unsigned int i=0;i<nfixes.size();++i){
1064 return StatusCode::SUCCESS;
1073 const LArOnOffIdMap * onOffIdMap_c;
1077 if(
sc!=StatusCode::SUCCESS){
1081 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1083 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1085 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1087 if( onOffId_P->m_version!=3){
1089 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1090 return StatusCode::FAILURE;
1093 VONOFF::iterator it = onOffId_P->m_v.begin();
1094 VONOFF::iterator it_e = onOffId_P->m_v.end();
1097 onOffId_P->m_version = 5 ;
1098 for (; it!=it_e;++it)
1100 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1103 if( t.det == 7 || t.det == 2)
1108 int q = t.feb_chan/32 ;
1110 int r = t.feb_chan%2 ;
1111 if (
r==0) t.calib_line = t.feb_chan+1;
1112 else t.calib_line = t.feb_chan-1;
1116 t.calib_line = t.feb_chan;
1124 return StatusCode::SUCCESS;
1134 const LArOnOffIdMap * onOffIdMap_c;
1136 std::vector<int> nfixes;
1137 nfixes.resize(44,0);
1141 int hec_calib_fix[ ] = {
1144 10 , 100 , 119 , 120,
1145 10 , 101 , 118 , 120,
1176 8 , 100 , 109 , 108,
1177 8 , 101 , 109 , 107,
1178 8 , 101 , 110 , 108,
1181 8 , 108 , 125 , 124,
1182 8 , 109 , 125 , 123,
1183 8 , 109 , 126 , 124,
1184 8 , 110 , 115 , 117,
1185 8 , 111 , 115 , 117 };
1187 if(
sc!=StatusCode::SUCCESS){
1191 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1193 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1195 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1197 if( onOffId_P->m_version!=5){
1199 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1200 return StatusCode::FAILURE;
1203 VONOFF::iterator it = onOffId_P->m_v.begin();
1204 VONOFF::iterator it_e = onOffId_P->m_v.end();
1207 onOffId_P->m_version = 6 ;
1209 for (; it!=it_e;++it)
1211 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1216 if( t.ft_num==3 || t.ft_num==10 ||t.ft_num==16 ||t.ft_num==22)
1219 for(
int i = 0;i<nentries;++i)
1222 int slot = hec_calib_fix[j+0];
1223 int chan = hec_calib_fix[j+1];
1224 int line_old = hec_calib_fix[j+2];
1225 int line_new = hec_calib_fix[j+3];
1226 if (t.feb_slot == slot)
1228 if (t.feb_chan == chan )
1230 if(t.calib_line==line_old)
1233 t.calib_line = line_new;
1247 <<
" sample="<<t.sample
1248 <<
" region="<<t.region
1252 <<
" slot="<<t.feb_slot
1253 <<
" chan="<<t.feb_chan
1254 <<
" calib_slot="<<t.calib_slot
1255 <<
" calib_line="<<t.calib_line );
1261 for(
int i=0;i<nentries;++i){
1265 return StatusCode::SUCCESS;
1278 std::ifstream fcal_map(
"FCal-online-map-disc.txt");
1282 fcal_map.getline(buffer,128,
'\n');
1283 fcal_map.getline(buffer,128,
'\n');
1285 int module,
phi,
eta,slot,chan;
1288 std::string trig_phi;
1290 LArOnOffId_P::LArOnOffId_P_t tt = {0,0,0,0,0,0,0,0,0,0,0};
1293 std::set<LArOnOffId_P::LArOnOffId_P_t> t_set ;
1296 while ( fcal_map>>side>>module>>
phi>>
eta>>slot>>chan>> group >>trig_eta>>trig_phi)
1304 <<
" trig_eta "<<trig_eta
1305 <<
" trig_phi "<<trig_phi );
1314 return StatusCode::FAILURE ;
1318 fcal_id->
channel_id(tt.pn,tt.sample,tt.eta,tt.phi);
1331 int q = tt.feb_chan/32 ;
1333 int r = tt.feb_chan%2 ;
1334 if (
r==0) tt.calib_line = tt.feb_chan+1;
1335 else tt.calib_line = tt.feb_chan-1;
1339 tt.calib_line = tt.feb_chan;
1356 <<
" number of disconnected channels= " << nread_disc
1357 <<
" number of unique=" << t_set.size() );
1361 const LArOnOffIdMap * onOffIdMap_c;
1364 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1366 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1368 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1370 if( onOffId_P->m_version!=6){
1372 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1373 return StatusCode::FAILURE;
1376 VONOFF::iterator it = onOffId_P->m_v.begin();
1377 VONOFF::iterator it_e = onOffId_P->m_v.end();
1380 onOffId_P->m_version = 7 ;
1388 for (; it!=it_e;++it)
1390 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1393 if( t.det == 2 || t.det == 7 )
1395 if (t.det==2) ++n_conn;
1396 if (t.det==7) ++n_disc;
1400 <<
" sample="<<t.sample
1401 <<
" region="<<t.region
1405 <<
" slot="<<t.feb_slot
1406 <<
" chan="<<t.feb_chan
1407 <<
" calib_slot="<<t.calib_slot
1408 <<
" calib_line="<<t.calib_line );
1414 ATH_MSG_INFO(
" Number of connected channels removed"<<n_conn );
1415 ATH_MSG_INFO(
" Number of disconnected channels removed"<<n_disc );
1417 std::set<LArOnOffId_P::LArOnOffId_P_t>::const_iterator it2 =t_set.begin();
1418 std::set<LArOnOffId_P::LArOnOffId_P_t>::const_iterator it2_e =t_set.end();
1420 for ( ; it2!=it2_e;++it2){
1421 new_v.push_back(*it2);
1424 ATH_MSG_INFO(
" number of old channels "<<onOffId_P->m_v.size() );
1426 onOffId_P->m_v = new_v;
1427 ATH_MSG_INFO(
" number of new channels "<<onOffId_P->m_v.size() );
1429 return StatusCode::SUCCESS;
1434 const LArOnOffId_P::LArOnOffId_P_t & t2)
1436 if (t1.det<t2.det)
return true ;
1438 if( t1.det>t2.det)
return false;
1440 if (t1.pn<t2.pn)
return true ;
1442 if (t1.pn>t2.pn)
return false;
1444 if (t1.sample<t2.sample)
return true ;
1446 if( t1.sample>t2.sample)
return false;
1448 if (t1.region<t2.region)
return true ;
1450 if( t1.region>t2.region)
return false;
1452 if (t1.eta<t2.eta)
return true ;
1454 if( t1.eta>t2.eta)
return false;
1456 if (t1.phi<t2.phi)
return true ;
1458 if( t1.phi>t2.phi)
return false;
1460 if (t1.ft_num<t2.ft_num)
return true ;
1462 if( t1.ft_num>t2.ft_num)
return false;
1464 if (t1.feb_slot<t2.feb_slot)
return true ;
1466 if( t1.feb_slot>t2.feb_slot)
return false;
1468 if (t1.feb_chan<t2.feb_chan)
return true ;
1470 if( t1.feb_chan>t2.feb_chan)
return false;
1472 if (t1.calib_slot<t2.calib_slot)
return true ;
1474 if( t1.calib_slot>t2.calib_slot)
return false;
1476 if (t1.calib_line<t2.calib_line)
return true ;
1478 if( t1.calib_line>t2.calib_line)
return false;
1538 const LArOnOffIdMap * onOffIdMap_c =
nullptr;
1541 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1543 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1546 unsigned int ntype=4 ;
1547 std::vector<int> nfixes;
1548 nfixes.resize(ntype);
1550 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1552 ATH_MSG_INFO(
" LArOnOffIdMap version "<<onOffId_P->m_version );
1554 if( onOffId_P->m_version!=7){
1556 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1557 return StatusCode::FAILURE;
1560 VONOFF::iterator it = onOffId_P->m_v.begin();
1561 VONOFF::iterator it_e = onOffId_P->m_v.end();
1564 onOffId_P->m_version = 8 ;
1566 for (; it!=it_e;++it)
1568 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1570 if( t.det == 0 || t.det==9 )
1576 if ( (t.ft_num==5 && t.feb_slot== 6) ||
1577 (t.ft_num==29 && t.feb_slot==5) ||
1578 (t.ft_num==29 && t.feb_slot==7)
1581 if( t.feb_chan<64) {
1582 t.feb_chan= t.feb_chan+64;
1584 t.feb_chan= t.feb_chan-64;
1590 if ( t.ft_num==0 && t.feb_slot== 8 ) {
1591 if ( t.feb_chan>=32 && t.feb_chan<=39 ){
1592 t.feb_chan = t.feb_chan+8 ;
1596 if( t.feb_chan>=40 && t.feb_chan<=47 ){
1597 t.feb_chan = t.feb_chan-8 ;
1605 if( (t.ft_num==6 && t.feb_slot==2 )|| (t.ft_num==17 && t.feb_slot==3 ))
1608 if ( t.feb_chan>=112 && t.feb_chan<=119 ){
1609 t.feb_chan = t.feb_chan+8 ;
1612 else if( t.feb_chan>=120 && t.feb_chan<=127 ){
1613 t.feb_chan = t.feb_chan-8 ;
1618 if( (t.ft_num==22 && t.feb_slot==7 ) )
1620 if ( t.feb_chan>=32 && t.feb_chan<=39 ){
1621 t.feb_chan = t.feb_chan+8 ;
1624 else if( t.feb_chan>=40 && t.feb_chan<=47 ){
1625 t.feb_chan = t.feb_chan-8 ;
1635 for(
unsigned int i=0;i<ntype;++i){
1639 return StatusCode::SUCCESS;
1650 const LArOnOffIdMap * onOffIdMap_c =
nullptr;
1653 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1655 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1658 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1660 ATH_MSG_INFO(
" LArOnOffIdMap version "<<onOffId_P->m_version );
1662 if( onOffId_P->m_version!=8){
1664 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1665 return StatusCode::FAILURE;
1669 onOffId_P->m_version = 9 ;
1702 std::map<int,int> nfixes ;
1704 VONOFF::iterator it = onOffId_P->m_v.begin();
1705 VONOFF::iterator it_e = onOffId_P->m_v.end();
1707 for (; it!=it_e;++it)
1709 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1711 if( t.det == 1 || t.det==8 )
1715 if( t.ft_num== 3 || t.ft_num== 10 || t.ft_num== 16 || t.ft_num== 22 )
1717 unsigned short islot = 100;
1718 if (t.feb_slot==5) islot=6;
1719 else if(t.feb_slot==6) islot=5;
1720 else if(t.feb_slot==7) islot=8;
1721 else if(t.feb_slot==8) islot=7;
1722 else if(t.feb_slot==9) islot=10;
1723 else if(t.feb_slot==10) islot=9;
1726 t.feb_slot = islot ;
1736 std::map<int,int>::const_iterator map_it=nfixes.begin();
1737 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1738 for (;map_it!=map_it_e;++map_it){
1739 log<<
" slot and nfixes "<<(*map_it).first<<
" " <<(*map_it).second <<
endmsg;
1742 return StatusCode::SUCCESS;
1753 const LArOnOffIdMap * onOffIdMap_c =
nullptr;
1756 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1758 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1760 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1762 log<<MSG::INFO<<
" LArOnOffIdMap version "<<onOffId_P->m_version<<
endmsg;
1764 if( onOffId_P->m_version!=9){
1766 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1767 return StatusCode::FAILURE;
1771 VONOFF::iterator it = onOffId_P->m_v.begin();
1772 VONOFF::iterator it_e = onOffId_P->m_v.end();
1775 onOffId_P->m_version = 10 ;
1776 std::map<int,int> nfixes ;
1778 for (; it!=it_e;++it)
1780 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1782 if( t.det == 0 || t.det==9 )
1788 unsigned short islot = 100;
1789 if (t.feb_slot==5) islot=8;
1790 else if(t.feb_slot==8) islot=5;
1793 t.feb_slot = islot ;
1803 std::map<int,int>::const_iterator map_it=nfixes.begin();
1804 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1805 for (;map_it!=map_it_e;++map_it){
1806 ATH_MSG_VERBOSE(
" slot and nfixes "<<(*map_it).first<<
" "<< (*map_it).second );
1813 const LArFebRodMap * febRodMap_c =
nullptr;
1815 if(
sc!=StatusCode::SUCCESS){
1820 LArFebRodMap* febRodMap=
const_cast<LArFebRodMap*
>(febRodMap_c);
1822 LArFebRod_P* febRod_P = febRodMap->getP();
1824 typedef std::vector<LArFebRod_P::LArFebRod_P_t> VFEBROD;
1826 VFEBROD::iterator it2 = febRod_P->m_v.begin();
1827 VFEBROD::iterator it2_e = febRod_P->m_v.end();
1829 if(febRod_P->m_version!=2){
1831 ATH_MSG_ERROR(
" wrong Persistent LArFebRod_P version = "<< febRod_P->m_version );
1833 return StatusCode::FAILURE;
1838 febRod_P->m_version = 3;
1841 for (; it2!=it2_e;++it2)
1843 LArFebRod_P::LArFebRod_P_t& t = *it2;
1845 bool fixed = false ;
1846 if( t.det ==68 && t.ft_det==1 && t.ft_pn==0 && t.ft_num==21 && t.ft_slot==5 )
1851 if( t.det ==68 && t.ft_det==1 && t.ft_pn==0 && t.ft_num==21 && t.ft_slot==8 )
1856 ATH_MSG_INFO(
" Fixing FEB slot number, before and after " );
1862 <<
" rosfrag="<<t.rosfrag
1863 <<
" robfrag="<<t.robfrag
1864 <<
" rodfrag="<<t.rodfrag
1865 <<
" rodcrate="<<t.rodcrate
1866 <<
" rodslot="<<t.rodslot
1867 <<
" ft_det="<<t.ft_det
1868 <<
" ft_pn="<<t.ft_pn
1869 <<
" ft_num="<<t.ft_num
1870 <<
" ft_slot="<<t.ft_slot );
1876 return StatusCode::SUCCESS;
1886 const LArOnOffIdMap * onOffIdMap_c =
nullptr;
1889 LArOnOffIdMap* onOffIdMap=
const_cast<LArOnOffIdMap*
>(onOffIdMap_c);
1891 LArOnOffId_P* onOffId_P = onOffIdMap->getP();
1893 typedef std::vector<LArOnOffId_P::LArOnOffId_P_t> VONOFF;
1895 ATH_MSG_INFO(
" LArOnOffIdMap version "<<onOffId_P->m_version );
1896 if( onOffId_P->m_version!=10){
1897 ATH_MSG_ERROR(
" This should only fix map with version 10" );
1898 ATH_MSG_ERROR(
" This LArOnOffId_P's version is "<<onOffId_P->m_version );
1899 return StatusCode::FAILURE;
1903 VONOFF::iterator it = onOffId_P->m_v.begin();
1904 VONOFF::iterator it_e = onOffId_P->m_v.end();
1907 onOffId_P->m_version = 11 ;
1908 std::map<int,int> nfixes ;
1910 for (; it!=it_e;++it)
1912 LArOnOffId_P::LArOnOffId_P_t& t = *it;
1914 if( t.det == 0 || t.det==9 )
1920 unsigned short islot = 100;
1921 if (t.feb_slot==7) islot=8;
1922 else if(t.feb_slot==8) islot=7;
1925 t.feb_slot = islot ;
1935 std::map<int,int>::const_iterator map_it=nfixes.begin();
1936 std::map<int,int>::const_iterator map_it_e=nfixes.end();
1937 for (;map_it!=map_it_e;++map_it){
1938 ATH_MSG_VERBOSE(
" slot and nfixes "<<(*map_it).first<<
" "<< (*map_it).second );
1941 return StatusCode::SUCCESS;