35 using namespace OLDEVP;
42 int SVTV1P0_ANODK_SR::initialize(
int maxSector)
47 memset((
char *)packed_address, 0,
sizeof(packed_address));
53 for(
int hypersector = 1; hypersector <= maxSector; hypersector++)
55 for(
int rcb = 1; rcb <= 6; rcb++)
57 for(
int mz = 1; mz <= 3; mz++)
60 classname(Bank_SVTANODK) *raw_bank = detector->getBankSVTANODK(hypersector, rcb, mz);
73 for(
int i=0; i < SVT_MZHYBRIDS; i++)
75 int barrel = raw_bank->index[i].barrel;
76 int ladder = raw_bank->index[i].ladder;
77 int wafer = raw_bank->index[i].waferID & 0x0F;
78 int hybrid = (raw_bank->index[i].waferID & 0xF0) >> 4;
85 ent.hypersector = hypersector;
87 place(barrel, ladder, wafer, hybrid, &ent);
99 void SVTV1P0_ANODK_SR::place(
short barrel,
short ladder,
short wafer,
short hybrid,
ANODK_entry *p)
101 short waferIndex = getWaferIndex(barrel,ladder,wafer);
102 packed_address[waferIndex-1][hybrid-1] = pack(p->hypersector, p->rb, p->mz, p->offset);
105 void SVTV1P0_ANODK_SR::get(
short barrel,
short ladder,
short wafer,
short hybrid,
ANODK_entry *p)
107 short waferIndex = getWaferIndex(barrel,ladder,wafer);
108 unpack(p,packed_address[waferIndex-1][hybrid-1]);
111 void SVTV1P0_ANODK_SR::get(
short waferIndex,
short hybrid,
ANODK_entry *p)
113 unpack(p,packed_address[waferIndex-1][hybrid-1]);
116 short SVTV1P0_ANODK_SR::pack(
short hypersector,
short rcb,
short mz,
short offset)
119 short p = hypersector;
129 void SVTV1P0_ANODK_SR::unpack(
ANODK_entry *entry,
short anodedress)
131 entry->offset = anodedress & 0x000F;
132 entry->mz = (anodedress & 0x0030) >> 4;
133 entry->rb = (anodedress & 0x07C0) >> 6;
134 entry->hypersector = anodedress >> 11;
138 short SVTV1P0_ANODK_SR::getWaferIndex(
short barrel,
short ladder,
short wafer)
141 int numberOfLadders[3] = {8,12,16};
142 int numberOfWafers[3] = {4,6,7};
148 index = (ladder-1)*numberOfWafers[barrel-1] + wafer;
152 index = numberOfLadders[barrel-2]*numberOfWafers[barrel-2] +
153 (ladder-1)*numberOfWafers[barrel-1] + wafer;
157 index = numberOfLadders[barrel-3]*numberOfWafers[barrel-3] +
158 numberOfLadders[barrel-2]*numberOfWafers[barrel-2] +
159 (ladder-1)*numberOfWafers[barrel-1] + wafer;
163 cout <<
"ERROR: There is NO barrel number " << barrel <<
" !!!" << endl;
173 if (ercpy->verbose) cout <<
"getSVT_ZS_SR wafer = " << wafer << endl;
176 if(!zsp->initialize())
179 cout <<
"ERROR: getSVT_ZS_SR FAILED wafer = " << wafer << endl;
187 ZeroSuppressedReader *SVTV1P0_Reader::getZeroSuppressedReader(
int barrel,
int ladder,
int wafer)
189 if (ercpy->verbose) cout <<
"getSVT_ZS_SR wafer = " << wafer << endl;
192 if(!zsp->initialize())
195 cout <<
"ERROR: getSVT_ZS_SR FAILED wafer = " << wafer << endl;
203 ADCRawReader *SVTV1P0_Reader::getADCRawReader(
int wafer)
207 if(!adc->initialize())
216 ADCRawReader *SVTV1P0_Reader::getADCRawReader(
int barrel,
int ladder,
int wafer)
220 if(!adc->initialize())
233 if(!ped->initialize())
242 PedestalReader *SVTV1P0_Reader::getPedestalReader(
int barrel,
int ladder,
int wafer)
246 if(!ped->initialize())
259 if(!rms->initialize())
268 PedestalRMSReader *SVTV1P0_Reader::getPedestalRMSReader(
int barrel,
int ladder,
int wafer)
272 if(!rms->initialize())
281 GainReader *SVTV1P0_Reader::getGainReader(
int wafer)
283 if (ercpy->verbose) cout <<
"getSVT_G_SR" << endl;
287 GainReader *SVTV1P0_Reader::getGainReader(
int barrel,
int ladder,
int wafer)
289 if (ercpy->verbose) cout <<
"getSVT_G_SR" << endl;
293 CPPReader *SVTV1P0_Reader::getCPPReader(
int wafer)
297 if(!cpp->initialize())
305 CPPReader *SVTV1P0_Reader::getCPPReader(
int barrel,
int ladder,
int wafer)
309 if(!cpp->initialize())
319 if (ercpy->verbose) cout <<
"getSVT_BC_SR" << endl;
323 BadChannelReader *SVTV1P0_Reader::getBadChannelReader(
int barrel,
int ladder,
int wafer)
325 if (ercpy->verbose) cout <<
"getSVT_BC_SR" << endl;
329 ConfigReader *SVTV1P0_Reader::getConfigReader(
int wafer)
331 if (ercpy->verbose) cout <<
"getSVT_CR_SR" << endl;
335 ConfigReader *SVTV1P0_Reader::getConfigReader(
int barrel,
int ladder,
int wafer)
337 if (ercpy->verbose) cout <<
"getSVT_CR_SR" << endl;
355 if(!p->initialize(maxSector))
372 if (!pBankSVTP->test_CRC()) ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,
"SVTP");
373 if (pBankSVTP->swap() < 0) ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,
"SVTP");
374 pBankSVTP->header.CRC = 0;
378 SVTV1P0_Reader::~SVTV1P0_Reader()
385 if(anodk != NULL)
delete anodk;
388 int SVTV1P0_Reader::MemUsed()
398 classname(Bank_SVTSECP) *SVTV1P0_Reader::getBankSVTSECP(
int hypersector)
402 if((hypersector < 1 ) || (hypersector > 4))
405 sprintf(str0,
"getBankSVTSECP(hs %d)",hypersector);
406 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
411 if((!pBankSVTP->HyperSector[hypersector].offset) ||
412 (!pBankSVTP->HyperSector[hypersector].length))
415 sprintf(str0,
"getBankSVTSECP(hs %d)",hypersector+1);
416 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
420 classname(Bank_SVTSECP) *ptr = (classname(Bank_SVTSECP) *)
421 (((INT32 *)pBankSVTP) +
422 pBankSVTP->HyperSector[hypersector].offset);
424 if(strncmp(ptr->header.BankType,
"SVTSECP",7)) {
426 sprintf(str0,
"getBankSVTSECP(hs %d)",hypersector+1);
427 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__, str0);
return NULL;
430 if(!ptr->test_CRC()) {
432 sprintf(str0,
"getBankSVTSECP(hs %d)",hypersector+1);
433 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
435 if(ptr->swap() < 0) {
437 sprintf(str0,
"getBankSVTSECP(hs %d)",hypersector+1);
438 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
445 classname(Bank_SVTRBP) *SVTV1P0_Reader::getBankSVTRBP(
int interleaved_rb,
446 classname(Bank_SVTSECP) *secp)
448 int hypersector = secp->header.BankId;
450 if ((interleaved_rb < 1) || (interleaved_rb > 12))
453 sprintf(str0,
"getBankSVTRBP(sec %d rb %d )",hypersector,interleaved_rb);
454 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
464 if ((!secp->RcvBoard[interleaved_rb].offset) ||
465 (!secp->RcvBoard[interleaved_rb].length) )
471 classname(Bank_SVTRBP) *ptr = (classname(Bank_SVTRBP) *)
473 secp->RcvBoard[interleaved_rb].offset);
475 if(strncmp(ptr->header.BankType,
"SVTRBP",6)) {
477 sprintf(str0,
"getBankSVTRBP(sec %d rb %d )",hypersector,interleaved_rb);
478 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
480 if(!ptr->test_CRC()) {
482 sprintf(str0,
"getBankSVTRBP(sec %d rb %d )",hypersector,interleaved_rb);
483 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
485 if(ptr->swap() < 0) {
487 sprintf(str0,
"getBankSVTRBP(sec %d rb %d )",hypersector,interleaved_rb);
488 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
492 mSCAZero = (int)ptr->FiberHeader[16];
493 mTimeZero = (
int)ptr->FiberHeader[17];
498 classname(Bank_SVTMZP) *SVTV1P0_Reader::getBankSVTMZP(
int mz, classname(Bank_SVTRBP) *rbp)
501 int rb = rbp->header.BankId;
502 if ((mz < 1) || (mz > 3))
505 sprintf(str0,
"getBankSVTMZP(rb %d mz %d )",rb,mz);
506 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
513 if ((!rbp->Mz[mz].offset) || (!rbp->Mz[mz].length))
516 sprintf(str0,
"getBankSVTMZP(rb %d mz %d )",rb,mz+1);
517 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
521 classname(Bank_SVTMZP) *ptr = (classname(Bank_SVTMZP) *)
525 if(strncmp(ptr->header.BankType,
"SVTMZP",6)) {
527 sprintf(str0,
"getBankSVTMZP(rb %d mz %d )",rb,mz+1);
528 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
530 if(!ptr->test_CRC()) {
532 sprintf(str0,
"getBankSVTMZP(rb %d mz %d )",rb,mz+1);
533 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
535 if(ptr->swap() < 0) {
537 sprintf(str0,
"getBankSVTMZP(rb %d mz %d )",rb,mz+1);
538 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
548 classname(Bank_SVTMZP) *SVTV1P0_Reader::getBankSVTMZP(
int hypersector,
int rb,
int mz)
552 if ((hypersector < 1) || (hypersector > SVT_HYPERSECTORS))
555 sprintf(str0,
"getBankSVTMZP(sec %d, rb %d, mz %d )",hypersector,rb,mz);
556 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
560 if ((rb < 1) || (rb > 6))
563 sprintf(str0,
"getBankSVTMZP(sec %d, rb %d, mz %d )",hypersector,rb,mz);
564 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
568 if ((mz < 1) || (mz > 3))
571 sprintf(str0,
"getBankSVTMZP(sec %d, rb %d, mz %d )",hypersector,rb,mz);
572 ercpy->fprintError(ERR_BAD_ARG,__FILE__,__LINE__,str0);
580 classname(Bank_SVTSECP) *secp = getBankSVTSECP(2*(hypersector/2)+1);
581 if(!secp)
return NULL;
583 classname(Bank_SVTRBP) *rbp;
586 rbp = getBankSVTRBP(rb + 6, secp);
590 rbp = getBankSVTRBP(rb, secp);
592 if(!rbp)
return NULL;
594 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(mz,rbp);
599 classname(Bank_SVTADCD) *SVTV1P0_Reader::getBankSVTADCD(
int hypersector,
int rb,
int mz)
604 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
605 if(!mzp)
return NULL;
610 if((!mzp->SVTADCD.offset) || (!mzp->SVTADCD.length))
613 sprintf(str0,
"getBankSVTADCD(sec %d rb %d mz %d )",hypersector,rb,mz);
614 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
618 classname(Bank_SVTADCD) *ptr = (classname(Bank_SVTADCD) *)
620 mzp->SVTADCD.offset);
622 if(strncmp(ptr->header.BankType,
"SVTADCD",7)) {
624 sprintf(str0,
"getBankSVTADCD(sec %d rb %d mz %d )",hypersector,rb,mz);
625 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
627 if(!ptr->test_CRC()) {
629 sprintf(str0,
"getBankSVTADCD(sec %d rb %d mz %d )",hypersector,rb,mz);
630 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
632 if(ptr->swap() < 0) {
634 sprintf(str0,
"getBankSVTADCD(sec %d rb %d mz %d )",hypersector,rb,mz);
635 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
642 classname(Bank_SVTSEQD) *SVTV1P0_Reader::getBankSVTSEQD(
int hypersector,
int rb,
int mz)
649 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
650 if(!mzp)
return NULL;
656 if((!mzp->SVTSEQD.offset) || (!mzp->SVTSEQD.length))
659 sprintf(str0,
"getBankSVTSEQD(sec %d rb %d mz %d )",hypersector,rb,mz);
660 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
664 classname(Bank_SVTSEQD) *ptr = (classname(Bank_SVTSEQD) *)
666 mzp->SVTSEQD.offset);
669 if(strncmp(ptr->header.BankType,
"SVTSEQD",7)) {
671 sprintf(str0,
"getBankSVTSEQD(sec %d rb %d mz %d )",hypersector,rb,mz);
672 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
674 if(!ptr->test_CRC()) {
676 sprintf(str0,
"getBankSVTSEQD(sec %d rb %d mz %d )",hypersector,rb,mz);
677 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
679 if(ptr->swap() < 0) {
681 sprintf(str0,
"getBankSVTSEQD(sec %d rb %d mz %d )",hypersector,rb,mz);
682 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
687 classname(Bank_SVTADCX) *SVTV1P0_Reader::getBankSVTADCX(
int hypersector,
int rb,
int mz)
692 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
693 if(!mzp)
return NULL;
698 if((!mzp->SVTADCX.offset) || (!mzp->SVTADCX.length))
701 sprintf(str0,
"getBankSVTADCX(sec %d rb %d mz %d )",hypersector,rb,mz);
702 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
706 classname(Bank_SVTADCX) *ptr = (classname(Bank_SVTADCX) *)
708 mzp->SVTADCX.offset);
710 if(strncmp(ptr->header.BankType,
"SVTADCX",7)) {
712 sprintf(str0,
"getBankSVTADCX(sec %d rb %d mz %d )",hypersector,rb,mz);
713 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
715 if(!ptr->test_CRC()) {
717 sprintf(str0,
"getBankSVTADCX(sec %d rb %d mz %d )",hypersector,rb,mz);
718 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
720 if(ptr->swap() < 0) {
722 sprintf(str0,
"getBankSVTADCX(sec %d rb %d mz %d )",hypersector,rb,mz);
723 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
729 classname(Bank_SVTANODK) *SVTV1P0_Reader::getBankSVTANODK(
int hypersector,
int rb,
int mz)
735 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
736 if(!mzp)
return NULL;
741 if((!mzp->SVTANODK.offset) || (!mzp->SVTANODK.length))
744 sprintf(str0,
"getBankSVTANODK(sec %d rb %d mz %d )",hypersector,rb,mz);
745 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
749 classname(Bank_SVTANODK) *ptr = (classname(Bank_SVTANODK) *)
751 mzp->SVTANODK.offset);
753 if(strncmp(ptr->header.BankType,
"SVTANODK",7)) {
755 sprintf(str0,
"getBankSVTANODK(sec %d rb %d mz %d )",hypersector,rb,mz);
756 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
758 if(!ptr->test_CRC()) {
760 sprintf(str0,
"getBankSVTANODK(sec %d rb %d mz %d )",hypersector,rb,mz);
761 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
763 if(ptr->swap() < 0) {
765 sprintf(str0,
"getBankSVTANODK(sec %d rb %d mz %d )",hypersector,rb,mz);
766 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
773 classname(Bank_SVTCPPR) *SVTV1P0_Reader::getBankSVTCPPR(
int hypersector,
int rb,
int mz)
778 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
779 if(!mzp)
return NULL;
781 if((!mzp->SVTCPPR.offset) || (!mzp->SVTCPPR.length))
784 sprintf(str0,
"getBankSVTCPPR(sec %d rb %d mz %d )",hypersector,rb,mz);
785 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
789 classname(Bank_SVTCPPR) *ptr = (classname(Bank_SVTCPPR) *)
791 mzp->SVTCPPR.offset);
793 if(strncmp(ptr->header.BankType,
"SVTCPPR",7)) {
795 sprintf(str0,
"getBankSVTCPPR(sec %d rb %d mz %d )",hypersector,rb,mz);
796 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
798 if(!ptr->test_CRC()) {
800 sprintf(str0,
"getBankSVTCPPR(sec %d rb %d mz %d )",hypersector,rb,mz);
801 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
803 if(ptr->swap() < 0) {
805 sprintf(str0,
"getBankSVTCPPR(sec %d rb %d mz %d )",hypersector,rb,mz);
806 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
813 classname(Bank_SVTADCR) *SVTV1P0_Reader::getBankSVTADCR(
int hypersector,
int rb,
int mz)
820 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
821 if(!mzp)
return NULL;
823 if((!mzp->SVTADCR.offset) || (!mzp->SVTADCR.length))
826 sprintf(str0,
"getBankSVTADCR(sec %d rb %d mz %d )",hypersector,rb,mz);
827 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
831 classname(Bank_SVTADCR) *ptr = (classname(Bank_SVTADCR) *)
833 mzp->SVTADCR.offset);
835 if(strncmp(ptr->header.BankType,
"SVTADCR",7)) {
837 sprintf(str0,
"getBankSVTADCR(sec %d rb %d mz %d )",hypersector,rb,mz);
838 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
840 if(!ptr->test_CRC()) {
842 sprintf(str0,
"getBankSVTADCR(sec %d rb %d mz %d )",hypersector,rb,mz);
843 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
845 if(ptr->swap() < 0) {
847 sprintf(str0,
"getBankSVTADCR(sec %d rb %d mz %d )",hypersector,rb,mz);
848 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
855 classname(Bank_SVTMZCLD) *SVTV1P0_Reader::getBankSVTMZCLD(
int hypersector,
int rb,
int mz)
860 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
861 if(!mzp)
return NULL;
863 if((!mzp->SVTMZCLD.offset) || (!mzp->SVTMZCLD.length))
866 sprintf(str0,
"getBankSVTMZCLD(sec %d rb %d mz %d )",hypersector,rb,mz);
867 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
871 classname(Bank_SVTMZCLD) *ptr = (classname(Bank_SVTMZCLD) *)
873 mzp->SVTMZCLD.offset);
875 if(strncmp(ptr->header.BankType,
"SVTMZCLD",8)) {
877 sprintf(str0,
"getBankSVTMZCLD(sec %d rb %d mz %d )",hypersector,rb,mz);
878 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
880 if(!ptr->test_CRC()) {
882 sprintf(str0,
"getBankSVTMZCLD(sec %d rb %d mz %d )",hypersector,rb,mz);
883 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
885 if(ptr->swap() < 0) {
887 sprintf(str0,
"getBankSVTMZCLD(sec %d rb %d mz %d )",hypersector,rb,mz);
888 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
896 classname(Bank_SVTCFGR) *SVTV1P0_Reader::getBankSVTCFGR(
int hypersector,
int rb,
int mz)
901 classname(Bank_SVTPEDR) *SVTV1P0_Reader::getBankSVTPEDR(
int hypersector,
int rb,
int mz)
906 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
907 if(!mzp)
return NULL;
909 if((!mzp->SVTPEDR.offset) || (!mzp->SVTPEDR.length))
912 sprintf(str0,
"getBankSVTPEDR(sec %d rb %d mz %d )",hypersector,rb,mz);
913 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
917 classname(Bank_SVTPEDR) *ptr = (classname(Bank_SVTPEDR) *)
919 mzp->SVTPEDR.offset);
921 if(strncmp(ptr->header.BankType,
"SVTPEDR",7)) {
923 sprintf(str0,
"getBankSVTPEDR(sec %d rb %d mz %d )",hypersector,rb,mz);
924 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
926 if(!ptr->test_CRC()) {
928 sprintf(str0,
"getBankSVTPEDR(sec %d rb %d mz %d )",hypersector,rb,mz);
929 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
931 if(ptr->swap() < 0) {
933 sprintf(str0,
"getBankSVTPEDR(sec %d rb %d mz %d )",hypersector,rb,mz);
934 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
942 classname(Bank_SVTRMSR) *SVTV1P0_Reader::getBankSVTRMSR(
int hypersector,
int rb,
int mz)
947 classname(Bank_SVTMZP) *mzp = getBankSVTMZP(hypersector, rb, mz);
948 if(!mzp)
return NULL;
950 if((!mzp->SVTRMSR.offset) || (!mzp->SVTRMSR.length))
953 sprintf(str0,
"getBankSVTRMSR(sec %d rb %d mz %d )",hypersector,rb,mz);
954 ercpy->fprintError(INFO_MISSING_BANK,__FILE__,__LINE__,str0);
958 classname(Bank_SVTRMSR) *ptr = (classname(Bank_SVTRMSR) *)
960 mzp->SVTRMSR.offset);
962 if(strncmp(ptr->header.BankType,
"SVTRMSR",7)) {
964 sprintf(str0,
"getBankSVTRMSR(sec %d rb %d mz %d )",hypersector,rb,mz);
965 ercpy->fprintError(ERR_BAD_HEADER,__FILE__,__LINE__,str0);
return NULL;
967 if(!ptr->test_CRC()) {
969 sprintf(str0,
"getBankSVTRMSR(sec %d rb %d mz %d )",hypersector,rb,mz);
970 ercpy->fprintError(ERR_CRC,__FILE__,__LINE__,str0);
return NULL;
972 if(ptr->swap() < 0) {
974 sprintf(str0,
"getBankSVTRMSR(sec %d rb %d mz %d )",hypersector,rb,mz);
975 ercpy->fprintError(ERR_SWAP,__FILE__,__LINE__,str0);
return NULL;
982 classname(Bank_SVTGAINR) *SVTV1P0_Reader::getBankSVTGAINR(
int hypersector,
int rb,
int mz)
987 classname(Bank_SVTBADR) *SVTV1P0_Reader::getBankSVTBADR(
int hypersector,
int rb,
int mz)