Changeset 2436 for trunk/external-alma


Ignore:
Timestamp:
03/15/12 19:12:51 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No?

Module(s): Module Names change impacts.

Description: Describe your changes here...

Defined template function for debug output.


Location:
trunk/external-alma/atnf/PKSIO
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/ASTEDataset.cc

    r1868 r2436  
    529529    c18[16] = '\0' ;
    530530    RX[i] = string( c18 ) ;
    531     // DEBUG
    532 //     if ( i == 0 ) {
    533 //       cout << "RX      " ;
    534 //     }
    535 //     else if ( ( i % 5 ) == 0 ) {
    536 //       cout << endl << "        " ;
    537 //     }
    538 //     cout << RX[i] << " " ;
    539     //
    540   }
    541   //cout << endl ;
     531  }
     532  // DEBUG
     533//   nro_debug_output( "RX", ASTE_ARYMAX, RX ) ;
     534  //
    542535  for ( int i = 0 ; i < ASTE_ARYMAX ; i++ ) {
    543536    if ( readHeader( HPBW[i], sameEndian ) == -1 ) {
     
    545538      return -1 ;
    546539    }
    547     // DEBUG
    548 //     if ( i == 0 ) {
    549 //       cout << "HPBW    " ;
    550 //     }
    551 //     else if ( ( i % 5 ) == 0 ) {
    552 //       cout << endl << "        " ;
    553 //     }
    554 //     cout << HPBW[i] << " " ;
    555     //
    556   }
    557   //cout << endl ;
     540  }
     541  // DEBUG
     542//   nro_debug_output( "HPBW", ASTE_ARYMAX, HPBW ) ;
     543  //
    558544  for ( int i = 0 ; i < ASTE_ARYMAX ; i++ ) {
    559545    if ( readHeader( EFFA[i], sameEndian ) == -1 ) {
     
    561547      return -1 ;
    562548    }
    563     // DEBUG
    564 //     if ( i == 0 ) {
    565 //       cout << "EFFA    " ;
    566 //     }
    567 //     else if ( ( i % 5 ) == 0 ) {
    568 //       cout << endl << "        " ;
    569 //     }
    570 //     cout << EFFA[i] << " " ;
    571     //
    572   }
    573   //cout << endl ;
     549  }
     550  // DEBUG
     551//   nro_debug_output( "EFFA", ASTE_ARYMAX, EFFA ) ;
     552  //
    574553  for ( int i = 0 ; i < ASTE_ARYMAX ; i++ ) {
    575554    if ( readHeader( EFFB[i], sameEndian ) == -1 ) {
     
    577556      return -1 ;
    578557    }
    579     // DEBUG
    580 //     if ( i == 0 ) {
    581 //       cout << "EFFB    " ;
    582 //     }
    583 //     else if ( ( i % 5 ) == 0 ) {
    584 //       cout << endl << "        " ;
    585 //     }
    586 //     cout << EFFB[i] << " " ;
    587     //
    588   }
    589   //cout << endl ;
     558  }
     559  // DEBUG
     560//   nro_debug_output( "EFFB", ASTE_ARYMAX, EFFB ) ;
     561  //
    590562  for ( int i = 0 ; i < ASTE_ARYMAX ; i++ ) {
    591563    if ( readHeader( EFFL[i], sameEndian ) == -1 ) {
     
    593565      return -1 ;
    594566    }
    595     // DEBUG
    596 //     if ( i == 0 ) {
    597 //       cout << "EFFL    " ;
    598 //     }
    599 //     else if ( ( i % 5 ) == 0 ) {
    600 //       cout << endl << "        " ;
    601 //     }
    602 //     cout << EFFL[i] << " " ;
    603     //
    604   }
    605   //cout << endl ;
     567  }
     568  // DEBUG
     569//   nro_debug_output( "EFFL", ASTE_ARYMAX, EFFL ) ;
     570  //
    606571  for ( int i = 0 ; i < ASTE_ARYMAX ; i++ ) {
    607572    if ( readHeader( EFSS[i], sameEndian ) == -1 ) {
     
    609574      return -1 ;
    610575    }
    611     // DEBUG
    612 //     if ( i == 0 ) {
    613 //       cout << "EFSS    " ;
    614 //     }
    615 //     else if ( ( i % 5 ) == 0 ) {
    616 //       cout << endl << "        " ;
    617 //     }
    618 //     cout << EFSS[i] << " " ;
    619     //
    620   }
    621   //cout << endl ;
     576  }
     577  // DEBUG
     578//   nro_debug_output( "EFSS", ASTE_ARYMAX, EFSS ) ;
     579  //
    622580  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    623581    if ( readHeader( GAIN[i], sameEndian ) == -1 ) {
     
    625583      return -1 ;
    626584    }
    627     // DEBUG
    628 //     if ( i == 0 ) {
    629 //       cout << "GAIN    " ;
    630 //     }
    631 //     else if ( ( i % 5 ) == 0 ) {
    632 //       cout << endl << "        " ;
    633 //     }
    634 //     cout << GAIN[i] << " " ;
    635     //
    636   }
    637   //cout << endl ;
     585  }
     586  // DEBUG
     587//   nro_debug_output( "GAIN", ASTE_ARYMAX, GAIN ) ;
     588  //
    638589  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    639590    strcpy( c4, str4.c_str() ) ;
     
    643594    }
    644595    HORN[i] = string( c4 ) ;
    645     // DEBUG
    646 //     if ( i == 0 ) {
    647 //       cout << "HORN    " ;
    648 //     }
    649 //     else if ( ( i % 5 ) == 0 ) {
    650 //       cout << endl << "        " ;
    651 //     }
    652 //     cout << HORN[i] << " " ;
    653     //
    654   }
    655   //cout << endl ;
     596  }
     597  // DEBUG
     598//   nro_debug_output( "HORN", ASTE_ARYMAX, HORN ) ;
     599  //
    656600  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    657601    strcpy( c4, str4.c_str() ) ;
     
    661605    }
    662606    POLTP[i] = string( c4 ) ;
    663     // DEBUG
    664 //     if ( i == 0 ) {
    665 //       cout << "POLTP   " ;
    666 //     }
    667 //     else if ( ( i % 5 ) == 0 ) {
    668 //       cout << endl << "        " ;
    669 //     }
    670 //     cout << POLTP[i] << " " ;
    671     //
    672   }
    673   //cout << endl ;
     607  }
     608  // DEBUG
     609//   nro_debug_output( "POLTP", ASTE_ARYMAX, POLTP ) ;
     610  //
    674611  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    675612    if ( readHeader( POLDR[i], sameEndian ) == -1 ) {
     
    677614      return -1 ;
    678615    }
    679      // DEBUG
    680 //     if ( i == 0 ) {
    681 //       cout << "POLDR   " ;
    682 //     }
    683 //     else if ( ( i % 5 ) == 0 ) {
    684 //       cout << endl << "        " ;
    685 //     }
    686 //     cout << POLDR[i] << " " ;
    687     //
    688   }
    689   //cout << endl ;
     616  }
     617  // DEBUG
     618//   nro_debug_output( "POLDR", ASTE_ARYMAX, POLDR ) ;
     619  //
    690620  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    691621    if ( readHeader( POLAN[i], sameEndian ) == -1 ) {
     
    693623      return -1 ;
    694624    }
    695     // DEBUG
    696 //     if ( i == 0 ) {
    697 //       cout << "POLAN   " ;
    698 //     }
    699 //     else if ( ( i % 5 ) == 0 ) {
    700 //       cout << endl << "        " ;
    701 //     }
    702 //     cout << POLAN[i] << " " ;
    703     //
    704   }
    705   //cout << endl ;
     625  }
     626  // DEBUG
     627//   nro_debug_output( "POLAN", ASTE_ARYMAX, POLAN ) ;
     628  //
    706629  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    707630    if ( readHeader( DFRQ[i], sameEndian ) == -1 ) {
     
    709632      return -1 ;
    710633    }
    711     // DEBUG
    712 //     if ( i == 0 ) {
    713 //       cout << "DFRQ    " ;
    714 //     }
    715 //     else if ( ( i % 5 ) == 0 ) {
    716 //       cout << endl << "        " ;
    717 //     }
    718 //     cout << DFRQ[i] << " " ;
    719     //
    720   }
    721   //cout << endl ;
     634  }
     635  // DEBUG
     636//   nro_debug_output( "DFRQ", ASTE_ARYMAX, DFRQ ) ;
     637  //
    722638  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    723639    strcpy( c4, str4.c_str() ) ;
     
    727643    }
    728644    SIDBD[i] = string( c4 ) ;
    729     // DEBUG
    730 //     if ( i == 0 ) {
    731 //       cout << "SIDBD   " ;
    732 //     }
    733 //     else if ( ( i % 5 ) == 0 ) {
    734 //       cout << endl << "        " ;
    735 //     }
    736 //     cout << SIDBD[i] << " " ;
    737     //
    738   }
    739   //cout << endl ;
     645  }
     646  // DEBUG
     647//   nro_debug_output( "SIDBD", ASTE_ARYMAX, SIDBD ) ;
     648  //
    740649  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    741650    if ( readHeader( REFN[i], sameEndian ) == -1 ) {
     
    743652      return -1 ;
    744653    }
    745     // DEBUG
    746 //     if ( i == 0 ) {
    747 //       cout << "REFN    " ;
    748 //     }
    749 //     else if ( ( i % 5 ) == 0 ) {
    750 //       cout << endl << "        " ;
    751 //     }
    752 //     cout << REFN[i] << " " ;
    753     //
    754   }
    755   //cout << endl ;
     654  }
     655  // DEBUG
     656//   nro_debug_output( "REFN", ASTE_ARYMAX, REFN ) ;
     657  //
    756658  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    757659    if ( readHeader( IPINT[i], sameEndian ) == -1 ) {
     
    759661      return -1 ;
    760662    }
    761     // DEBUG
    762 //     if ( i == 0 ) {
    763 //       cout << "IPINT   " ;
    764 //     }
    765 //     else if ( ( i % 5 ) == 0 ) {
    766 //       cout << endl << "        " ;
    767 //     }
    768 //     cout << IPINT[i] << " " ;
    769     //
    770   }
    771   //cout << endl ;
     663  }
     664  // DEBUG
     665//   nro_debug_output( "IPINT", ASTE_ARYMAX, IPINT ) ;
     666  //
    772667  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    773668    if ( readHeader( MULTN[i], sameEndian ) == -1 ) {
     
    775670      return -1 ;
    776671    }
    777     // DEBUG
    778 //     if ( i == 0 ) {
    779 //       cout << "MULTN   " ;
    780 //     }
    781 //     else if ( ( i % 5 ) == 0 ) {
    782 //       cout << endl << "        " ;
    783 //     }
    784 //     cout << MULTN[i] << " " ;
    785     //
    786   }
    787   //cout << endl ;
     672  }
     673  // DEBUG
     674//   nro_debug_output( "MULTN", ASTE_ARYMAX, MULTN ) ;
     675  //
    788676  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    789677    if ( readHeader( MLTSCF[i], sameEndian ) == -1 ) {
     
    791679      return -1 ;
    792680    }
    793     // DEBUG
    794 //     if ( i == 0 ) {
    795 //       cout << "MLTSCF  " ;
    796 //     }
    797 //     else if ( ( i % 5 ) == 0 ) {
    798 //       cout << endl << "        " ;
    799 //     }
    800 //     cout << MLTSCF[i] << " " ;
    801     //
    802   }
    803   //cout << endl ;
     681  }
     682  // DEBUG
     683//   nro_debug_output( "MLTSCF", ASTE_ARYMAX, MLTSCF ) ;
     684  //
    804685  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    805686    strcpy( c8, str8.c_str() ) ;
     
    809690    }
    810691    LAGWIND[i] = string( c8 ) ;
    811     // DEBUG
    812 //     if ( i == 0 ) {
    813 //       cout << "LAGWIND " ;
    814 //     }
    815 //     else if ( ( i % 5 ) == 0 ) {
    816 //       cout << endl << "        " ;
    817 //     }
    818 //     cout << LAGWIND[i] << " " ;
    819     //
    820   }
    821   //cout << endl ;
     692  }
     693  // DEBUG
     694//   nro_debug_output( "LAGWIND", ASTE_ARYMAX, LAGWIND ) ;
     695  //
    822696  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    823697    if ( readHeader( BEBW[i], sameEndian ) == -1 ) {
     
    825699      return -1 ;
    826700    }
    827     // DEBUG
    828 //     if ( i == 0 ) {
    829 //       cout << "BEBW    " ;
    830 //     }
    831 //     else if ( ( i % 5 ) == 0 ) {
    832 //       cout << endl << "        " ;
    833 //     }
    834 //     cout << BEBW[i] << " " ;
    835     //
    836   }
    837   //cout << endl ;
     701  }
     702  // DEBUG
     703//   nro_debug_output( "BEBW", ASTE_ARYMAX, BEBW ) ;
     704  //
    838705  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    839706    if ( readHeader( BERES[i], sameEndian ) == -1 ) {
     
    841708      return -1 ;
    842709    }
    843     // DEBUG
    844 //     if ( i == 0 ) {
    845 //       cout << "BERES   " ;
    846 //     }
    847 //     else if ( ( i % 5 ) == 0 ) {
    848 //       cout << endl << "        " ;
    849 //     }
    850 //     cout << BERES[i] << " " ;
    851     //
    852   }
    853   //cout << endl ;
     710  }
     711  // DEBUG
     712//   nro_debug_output( "BERES", ASTE_ARYMAX, BERES ) ;
     713  //
    854714  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    855715    if ( readHeader( CHWID[i], sameEndian ) == -1 ) {
     
    857717      return -1 ;
    858718    }
    859     // DEBUG
    860 //     if ( i == 0 ) {
    861 //       cout << "CHWID   " ;
    862 //     }
    863 //     else if ( ( i % 5 ) == 0 ) {
    864 //       cout << endl << "        " ;
    865 //     }
    866 //     cout << CHWID[i] << " " ;
    867     //
    868   }
    869   //cout << endl ;
     719  }
     720  // DEBUG
     721//   nro_debug_output( "CHWID", ASTE_ARYMAX, CHWID ) ;
     722  //
    870723  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    871724    if ( readHeader( ARRY[i], sameEndian ) == -1 ) {
     
    873726      return -1 ;
    874727    }
    875     // DEBUG
    876 //     if ( i == 0 ) {
    877 //       cout << "ARRY    " ;
    878 //     }
    879 //     else if ( ( i % 5 ) == 0 ) {
    880 //       cout << endl << "        " ;
    881 //     }
    882 //     cout << ARRY[i] << " " ;
    883     //
    884   }
    885   //cout << endl ;
     728  }
     729  // DEBUG
     730//   nro_debug_output( "ARRY", ASTE_ARYMAX, ARRY ) ;
     731  //
    886732  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    887733    if ( readHeader( NFCAL[i], sameEndian ) == -1 ) {
     
    889735      return -1 ;
    890736    }
    891     // DEBUG
    892 //     if ( i == 0 ) {
    893 //       cout << "NFCAL   " ;
    894 //     }
    895 //     else if ( ( i % 5 ) == 0 ) {
    896 //       cout << endl << "        " ;
    897 //     }
    898 //     cout << NFCAL[i] << " " ;
    899     //
    900   }
    901   //cout << endl ;
     737  }
     738  // DEBUG
     739//   nro_debug_output( "NFCAL", ASTE_ARYMAX, NFCAL ) ;
     740  //
    902741  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    903742    if ( readHeader( F0CAL[i], sameEndian ) == -1 ) {
     
    905744      return -1 ;
    906745    }
    907     // DEBUG
    908 //     if ( i == 0 ) {
    909 //       cout << "F0CAL   " ;
    910 //     }
    911 //     else if ( ( i % 5 ) == 0 ) {
    912 //       cout << endl << "        " ;
    913 //     }
    914 //     cout << F0CAL[i] << " " ;
    915     //
    916   }
    917   //cout << endl ;
     746  }
     747  // DEBUG
     748//   nro_debug_output( "F0CAL", ASTE_ARYMAX, F0CAL ) ;
     749  //
    918750  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    919751    for ( int j = 0 ; j < 10 ; j++ ) {
     
    922754        return -1 ;
    923755      }
    924       // DEBUG
    925 //       if ( j == 0 ) {
    926 //         if ( i < 10 )
    927 //           cout << "FQCAL0" << i << " " ;
    928 //         else
    929 //           cout << "FQCAL" << i << " " ;
    930 //       }
    931 //       else if ( ( j % 5 ) == 0 ) {
    932 //         cout << endl << "        " ;
    933 //       }
    934 //       cout << FQCAL[i][j] << " " ;
    935       //
    936     }
    937     //cout << endl ;
    938   }
     756    }
     757  }
     758  // DEBUG
     759//   nro_debug_output( "FQCAL", ASTE_ARYMAX, 10,  FQCAL ) ;
     760  //
    939761  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    940762    for ( int j = 0 ; j < 10 ; j++ ) {
     
    943765        return -1 ;
    944766      }
    945      // DEBUG
    946 //       if ( j == 0 ) {
    947 //         if ( i < 10 )
    948 //           cout << "CHCAL0" << i << " " ;
    949 //         else
    950 //           cout << "CHCAL" << i << " " ;
    951 //       }
    952 //       else if ( ( j % 5 ) == 0 ) {
    953 //         cout << endl << "        " ;
    954 //       }
    955 //       cout << CHCAL[i][j] << " " ;
    956      //
    957     }
    958     //cout << endl ;
    959   }
     767    }
     768  }
     769  // DEBUG
     770//   nro_debug_output( "CHCAL", ASTE_ARYMAX, 10, CHCAL ) ;
     771  //
    960772  for ( int i= 0 ; i < ASTE_ARYMAX ; i++) {
    961773    for ( int j = 0 ; j < 10 ; j++ ) {
     
    964776        return -1 ;
    965777      }
    966       // DEBUG
    967 //       if ( j == 0 ) {
    968 //         if ( i < 10 )
    969 //           cout << "CWCAL0" << i << " " ;
    970 //         else
    971 //           cout << "CWCAL" << i << " " ;
    972 //       }
    973 //       else if ( ( j % 5 ) == 0 ) {
    974 //         cout << endl << "        " ;
    975 //       }
    976 //       cout << CWCAL[i][j] << " " ;
    977       //
    978     }
    979     //cout << endl ;
    980   }
     778    }
     779  }
     780  // DEBUG
     781//   nro_debug_output( "CWCAL", ASTE_ARYMAX, 10, CWCAL ) ;
     782  //
    981783  if ( readHeader( SCNLEN, sameEndian ) == -1 ) {
    982784    os << LogIO::WARN << "Error while reading data SCNLEN." << LogIO::POST ;
     
    1024826      return -1 ;
    1025827    }
    1026     // DEBUG
    1027 //     if ( i == 0 ) {
    1028 //       cout << "DSBFC   " ;
    1029 //     }
    1030 //     else if ( ( i % 5 ) == 0 ) {
    1031 //       cout << endl << "        " ;
    1032 //     }
    1033 //     cout << DSBFC[i] << " " ;
    1034     //
    1035   }
    1036   //cout << endl ;
     828  }
     829  // DEBUG
     830//   nro_debug_output( "DSBFC", ASTE_ARYMAX, DSBFC ) ;
     831  //
     832
    1037833
    1038834  scanNum_ = NSCAN + 1 ; // includes ZERO scan
  • trunk/external-alma/atnf/PKSIO/ASTEFXDataset.cc

    r1868 r2436  
    529529    c18[16] = '\0' ;
    530530    RX[i] = string( c18 ) ;
    531     // DEBUG
    532 //     if ( i == 0 ) {
    533 //       cout << "RX      " ;
    534 //     }
    535 //     else if ( ( i % 5 ) == 0 ) {
    536 //       cout << endl << "        " ;
    537 //     }
    538 //     cout << RX[i] << " " ;
    539     //
    540   }
    541   //cout << endl ;
     531  }
     532  // DEBUG
     533//   nro_debug_output( "RX", ASTE_ARYMAX_FX, RX ) ;
     534  //
    542535  for ( int i = 0 ; i < ASTE_ARYMAX_FX ; i++ ) {
    543536    if ( readHeader( HPBW[i], sameEndian ) == -1 ) {
     
    545538      return -1 ;
    546539    }
    547 //     // DEBUG
    548 //     if ( i == 0 ) {
    549 //       cout << "HPBW    " ;
    550 //     }
    551 //     else if ( ( i % 5 ) == 0 ) {
    552 //       cout << endl <    //cerr << "Error opening file " << filename_ << "." << endl ;< "        " ;
    553 //     }
    554 //     cout << HPBW[i] << " " ;
    555     //
    556   }
    557   //cout << endl ;
     540  }
     541  // DEBUG
     542//   nro_debug_output( "HPBW", ASTE_ARYMAX_FX, HPBW ) ;
     543  //
    558544  for ( int i = 0 ; i < ASTE_ARYMAX_FX ; i++ ) {
    559545    if ( readHeader( EFFA[i], sameEndian ) == -1 ) {
     
    561547      return -1 ;
    562548    }
    563     // DEBUG
    564 //     if ( i == 0 ) {
    565 //       cout << "EFFA    " ;
    566 //     }
    567 //     else if ( ( i % 5 ) == 0 ) {
    568 //       cout << endl << "        " ;
    569 //     }
    570 //     cout << EFFA[i] << " " ;
    571     //
    572   }
    573   //cout << endl ;
     549  }
     550  // DEBUG
     551//   nro_debug_output( "EFFA", ASTE_ARYMAX_FX, EFFA ) ;
     552  //
    574553  for ( int i = 0 ; i < ASTE_ARYMAX_FX ; i++ ) {
    575554    if ( readHeader( EFFB[i], sameEndian ) == -1 ) {
     
    577556      return -1 ;
    578557    }
    579     // DEBUG
    580 //     if ( i == 0 ) {
    581 //       cout << "EFFB    " ;
    582 //     }
    583 //     else if ( ( i % 5 ) == 0 ) {
    584 //       cout << endl << "        " ;
    585 //     }
    586 //     cout << EFFB[i] << " " ;
    587     //
    588   }
    589   //cout << endl ;
     558  }
     559  // DEBUG
     560//   nro_debug_output( "EFFB", ASTE_ARYMAX_FX, EFFB ) ;
     561  //
    590562  for ( int i = 0 ; i < ASTE_ARYMAX_FX ; i++ ) {
    591563    if ( readHeader( EFFL[i], sameEndian ) == -1 ) {
     
    593565      return -1 ;
    594566    }
    595     // DEBUG
    596 //     if ( i == 0 ) {
    597 //       cout << "EFFL    " ;
    598 //     }
    599 //     else if ( ( i % 5 ) == 0 ) {
    600 //       cout << endl << "        " ;
    601 //     }
    602 //     cout << EFFL[i] << " " ;
    603     //
    604   }
    605   //cout << endl ;
     567  }
     568  // DEBUG
     569//   nro_debug_output( "EFFL", ASTE_ARYMAX_FX, EFFL ) ;
     570  //
    606571  for ( int i = 0 ; i < ASTE_ARYMAX_FX ; i++ ) {
    607572    if ( readHeader( EFSS[i], sameEndian ) == -1 ) {
     
    609574      return -1 ;
    610575    }
    611     // DEBUG
    612 //     if ( i == 0 ) {
    613 //       cout << "EFSS    " ;
    614 //     }
    615 //     else if ( ( i % 5 ) == 0 ) {
    616 //       cout << endl << "        " ;
    617 //     }
    618 //     cout << EFSS[i] << " " ;
    619     //
    620   }
    621   //cout << endl ;
     576  }
     577  // DEBUG
     578//   nro_debug_output( "EFSS", ASTE_ARYMAX_FX, EFSS ) ;
     579  //
    622580  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    623581    if ( readHeader( GAIN[i], sameEndian ) == -1 ) {
     
    625583      return -1 ;
    626584    }
    627     // DEBUG
    628 //     if ( i == 0 ) {
    629 //       cout << "GAIN    " ;
    630 //     }
    631 //     else if ( ( i % 5 ) == 0 ) {
    632 //       cout << endl << "        " ;
    633 //     }
    634 //     cout << GAIN[i] << " " ;
    635     //
    636   }
    637   //cout << endl ;
     585  }
     586  // DEBUG
     587//   nro_debug_output( "GAIN", ASTE_ARYMAX_FX, GAIN ) ;
     588  //
    638589  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    639590    strcpy( c4, str4.c_str() ) ;
     
    643594    }
    644595    HORN[i] = string( c4 ) ;
    645     // DEBUG
    646 //     if ( i == 0 ) {
    647 //       cout << "HORN    " ;
    648 //     }
    649 //     else if ( ( i % 5 ) == 0 ) {
    650 //       cout << endl << "        " ;
    651 //     }
    652 //     cout << HORN[i] << " " ;
    653     //
    654   }
    655   //cout << endl ;
     596  }
     597  // DEBUG
     598//   nro_debug_output( "HORN", ASTE_ARYMAX_FX, HORN ) ;
     599  //
    656600  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    657601    strcpy( c4, str4.c_str() ) ;
     
    661605    }
    662606    POLTP[i] = string( c4 ) ;
    663     // DEBUG
    664 //     if ( i == 0 ) {
    665 //       cout << "POLTP   " ;
    666 //     }
    667 //     else if ( ( i % 5 ) == 0 ) {
    668 //       cout << endl << "        " ;
    669 //     }
    670 //     cout << POLTP[i] << " " ;
    671     //
    672   }
    673   //cout << endl ;
     607  }
     608  // DEBUG
     609//   nro_debug_output( "POLTP", ASTE_ARYMAX_FX, POLTP ) ;
     610  //
    674611  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    675612    if ( readHeader( POLDR[i], sameEndian ) == -1 ) {
     
    677614      return -1 ;
    678615    }
    679      // DEBUG
    680 //     if ( i == 0 ) {
    681 //       cout << "POLDR   " ;
    682 //     }
    683 //     else if ( ( i % 5 ) == 0 ) {
    684 //       cout << endl << "        " ;
    685 //     }
    686 //     cout << POLDR[i] << " " ;
    687     //
    688   }
    689   //cout << endl ;
     616  }
     617  // DEBUG
     618//   nro_debug_output( "POLDR", ASTE_ARYMAX_FX, POLDR ) ;
     619  //
    690620  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    691621    if ( readHeader( POLAN[i], sameEndian ) == -1 ) {
     
    693623      return -1 ;
    694624    }
    695     // DEBUG
    696 //     if ( i == 0 ) {
    697 //       cout << "POLAN   " ;
    698 //     }
    699 //     else if ( ( i % 5 ) == 0 ) {
    700 //       cout << endl << "        " ;
    701 //     }
    702 //     cout << POLAN[i] << " " ;
    703     //
    704   }
    705   //cout << endl ;
     625  }
     626  // DEBUG
     627//   nro_debug_output( "POLAN", ASTE_ARYMAX_FX, POLAN ) ;
     628  //
    706629  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    707630    if ( readHeader( DFRQ[i], sameEndian ) == -1 ) {
     
    709632      return -1 ;
    710633    }
    711     // DEBUG
    712 //     if ( i == 0 ) {
    713 //       cout << "DFRQ    " ;
    714 //     }
    715 //     else if ( ( i % 5 ) == 0 ) {
    716 //       cout << endl << "        " ;
    717 //     }
    718 //     cout << DFRQ[i] << " " ;
    719     //
    720   }
    721   //cout << endl ;
     634  }
     635  // DEBUG
     636//   nro_debug_output( "DFRQ", ASTE_ARYMAX_FX, DFRQ ) ;
     637  //
    722638  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    723639    strcpy( c4, str4.c_str() ) ;
     
    727643    }
    728644    SIDBD[i] = string( c4 ) ;
    729     // DEBUG
    730 //     if ( i == 0 ) {
    731 //       cout << "SIDBD   " ;
    732 //     }
    733 //     else if ( ( i % 5 ) == 0 ) {
    734 //       cout << endl << "        " ;
    735 //     }
    736 //     cout << SIDBD[i] << " " ;
    737     //
    738   }
    739   //cout << endl ;
     645  }
     646  // DEBUG
     647//   nro_debug_output( "SIDBD", ASTE_ARYMAX_FX, SIDBD ) ;
     648  //
    740649  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    741650    if ( readHeader( REFN[i], sameEndian ) == -1 ) {
     
    743652      return -1 ;
    744653    }
    745     // DEBUG
    746 //     if ( i == 0 ) {
    747 //       cout << "REFN    " ;
    748 //     }
    749 //     else if ( ( i % 5 ) == 0 ) {
    750 //       cout << endl << "        " ;
    751 //     }
    752 //     cout << REFN[i] << " " ;
    753     //
    754   }
    755   //cout << endl ;
     654  }
     655  // DEBUG
     656//   nro_debug_output( "REFN", ASTE_ARYMAX_FX, REFN ) ;
     657  //
    756658  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    757659    if ( readHeader( IPINT[i], sameEndian ) == -1 ) {
     
    759661      return -1 ;
    760662    }
    761     // DEBUG
    762 //     if ( i == 0 ) {
    763 //       cout << "IPINT   " ;
    764 //     }
    765 //     else if ( ( i % 5 ) == 0 ) {
    766 //       cout << endl << "        " ;
    767 //     }
    768 //     cout << IPINT[i] << " " ;
    769     //
    770   }
    771   //cout << endl ;
     663  }
     664  // DEBUG
     665//   nro_debug_output( "IPINT", ASTE_ARYMAX_FX, IPINT ) ;
     666  //
    772667  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    773668    if ( readHeader( MULTN[i], sameEndian ) == -1 ) {
     
    775670      return -1 ;
    776671    }
    777     // DEBUG
    778 //     if ( i == 0 ) {
    779 //       cout << "MULTN   " ;
    780 //     }
    781 //     else if ( ( i % 5 ) == 0 ) {
    782 //       cout << endl << "        " ;
    783 //     }
    784 //     cout << MULTN[i] << " " ;
    785     //
    786   }
    787   //cout << endl ;
     672  }
     673  // DEBUG
     674//   nro_debug_output( "MULTN", ASTE_ARYMAX_FX, MULTN ) ;
     675  //
    788676  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    789677    if ( readHeader( MLTSCF[i], sameEndian ) == -1 ) {
     
    791679      return -1 ;
    792680    }
    793     // DEBUG
    794 //     if ( i == 0 ) {
    795 //       cout << "MLTSCF  " ;
    796 //     }
    797 //     else if ( ( i % 5 ) == 0 ) {
    798 //       cout << endl << "        " ;
    799 //     }
    800 //     cout << MLTSCF[i] << " " ;
    801     //
    802   }
    803   //cout << endl ;
     681  }
     682  // DEBUG
     683//   nro_debug_output( "MLTSCF", ASTE_ARYMAX_FX, MLTSCF ) ;
     684  //
    804685  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    805686    strcpy( c8, str8.c_str() ) ;
     
    809690    }
    810691    LAGWIND[i] = string( c8 ) ;
    811     // DEBUG
    812 //     if ( i == 0 ) {
    813 //       cout << "LAGWIND " ;
    814 //     }
    815 //     else if ( ( i % 5 ) == 0 ) {
    816 //       cout << endl << "        " ;
    817 //     }
    818 //     cout << LAGWIND[i] << " " ;
    819     //
    820   }
    821   //cout << endl ;
     692  }
     693  // DEBUG
     694//   nro_debug_output( "LAGWIND", ASTE_ARYMAX_FX, LAGWIND ) ;
     695  //
    822696  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    823697    if ( readHeader( BEBW[i], sameEndian ) == -1 ) {
     
    825699      return -1 ;
    826700    }
    827     // DEBUG
    828 //     if ( i == 0 ) {
    829 //       cout << "BEBW    " ;
    830 //     }
    831 //     else if ( ( i % 5 ) == 0 ) {
    832 //       cout << endl << "        " ;
    833 //     }
    834 //     cout << BEBW[i] << " " ;
    835     //
    836   }
    837   //cout << endl ;
     701  }
     702  // DEBUG
     703//   nro_debug_output( "BEBW", ASTE_ARYMAX_FX, BEBW ) ;
     704  //
    838705  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    839706    if ( readHeader( BERES[i], sameEndian ) == -1 ) {
     
    841708      return -1 ;
    842709    }
    843     // DEBUG
    844 //     if ( i == 0 ) {
    845 //       cout << "BERES   " ;
    846 //     }
    847 //     else if ( ( i % 5 ) == 0 ) {
    848 //       cout << endl << "        " ;
    849 //     }
    850 //     cout << BERES[i] << " " ;
    851     //
    852   }
    853   //cout << endl ;
     710  }
     711  // DEBUG
     712//   nro_debug_output( "BERES", ASTE_ARYMAX_FX, BERES ) ;
     713  //
    854714  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    855715    if ( readHeader( CHWID[i], sameEndian ) == -1 ) {
     
    857717      return -1 ;
    858718    }
    859     // DEBUG
    860 //     if ( i == 0 ) {
    861 //       cout << "CHWID   " ;
    862 //     }
    863 //     else if ( ( i % 5 ) == 0 ) {
    864 //       cout << endl << "        " ;
    865 //     }
    866 //     cout << CHWID[i] << " " ;
    867     //
    868   }
    869   //cout << endl ;
     719  }
     720  // DEBUG
     721//   nro_debug_output( "CHWID", ASTE_ARYMAX_FX, CHWID ) ;
     722  //
    870723  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    871724    if ( readHeader( ARRY[i], sameEndian ) == -1 ) {
     
    873726      return -1 ;
    874727    }
    875     // DEBUG
    876 //     if ( i == 0 ) {
    877 //       cout << "ARRY    " ;
    878 //     }
    879 //     else if ( ( i % 5 ) == 0 ) {
    880 //       cout << endl << "        " ;
    881 //     }
    882 //     cout << ARRY[i] << " " ;
    883     //
    884   }
    885   //cout << endl ;
     728  }
     729  // DEBUG
     730//   nro_debug_output( "ARRY", ASTE_ARYMAX_FX, ARRY ) ;
     731  //
    886732  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    887733    if ( readHeader( NFCAL[i], sameEndian ) == -1 ) {
     
    889735      return -1 ;
    890736    }
    891     // DEBUG
    892 //     if ( i == 0 ) {
    893 //       cout << "NFCAL   " ;
    894 //     }
    895 //     else if ( ( i % 5 ) == 0 ) {
    896 //       cout << endl << "        " ;
    897 //     }
    898 //     cout << NFCAL[i] << " " ;
    899     //
    900   }
    901   //cout << endl ;
     737  }
     738  // DEBUG
     739//   nro_debug_output( "NFCAL", ASTE_ARYMAX_FX, NFCAL ) ;
     740  //
    902741  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    903742    if ( readHeader( F0CAL[i], sameEndian ) == -1 ) {
     
    905744      return -1 ;
    906745    }
    907     // DEBUG
    908 //     if ( i == 0 ) {
    909 //       cout << "F0CAL   " ;
    910 //     }
    911 //     else if ( ( i % 5 ) == 0 ) {
    912 //       cout << endl << "        " ;
    913 //     }
    914 //     cout << F0CAL[i] << " " ;
    915     //
    916   }
    917   //cout << endl ;
     746  }
     747  // DEBUG
     748//   nro_debug_output( "F0CAL", ASTE_ARYMAX_FX, F0CAL ) ;
     749  //
    918750  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    919751    for ( int j = 0 ; j < 10 ; j++ ) {
     
    922754        return -1 ;
    923755      }
    924       // DEBUG
    925 //       if ( j == 0 ) {
    926 //         if ( i < 10 )
    927 //           cout << "FQCAL0" << i << " " ;
    928 //         else
    929 //           cout << "FQCAL" << i << " " ;
    930 //       }
    931 //       else if ( ( j % 5 ) == 0 ) {
    932 //         cout << endl << "        " ;
    933 //       }
    934 //       cout << FQCAL[i][j] << " " ;
    935       //
    936     }
    937     //cout << endl ;
    938   }
     756    }
     757  }
     758  // DEBUG
     759//   nro_debug_output( "FQCAL", ASTE_ARYMAX_FX, 10, FQCAL ) ;
     760  //
    939761  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    940762    for ( int j = 0 ; j < 10 ; j++ ) {
     
    943765        return -1 ;
    944766      }
    945      // DEBUG
    946 //       if ( j == 0 ) {
    947 //         if ( i < 10 )
    948 //           cout << "CHCAL0" << i << " " ;
    949 //         else
    950 //           cout << "CHCAL" << i << " " ;
    951 //       }
    952 //       else if ( ( j % 5 ) == 0 ) {
    953 //         cout << endl << "        " ;
    954 //       }
    955 //      cout << CHCAL[i][j] << " " ;
    956      //
    957     }
    958     //cout << endl ;
    959   }
     767    }
     768  }
     769  // DEBUG
     770//   nro_debug_output( "CHCAL", ASTE_ARYMAX_FX, 10, CHCAL ) ;
     771  //
    960772  for ( int i= 0 ; i < ASTE_ARYMAX_FX ; i++) {
    961773    for ( int j = 0 ; j < 10 ; j++ ) {
     
    964776        return -1 ;
    965777      }
    966       // DEBUG
    967 //       if ( j == 0 ) {
    968 //         if ( i < 10 )
    969 //           cout << "CWCAL0" << i << " " ;
    970 //         else
    971 //           cout << "CWCAL" << i << " " ;
    972 //       }
    973 //       else if ( ( j % 5 ) == 0 ) {
    974 //         cout << endl << "        " ;
    975 //       }
    976 //       cout << CWCAL[i][j] << " " ;
    977       //
    978     }
    979     //cout << endl ;
    980   }
     778    }
     779  }
     780  // DEBUG
     781//   nro_debug_output( "CWCAL", ASTE_ARYMAX_FX, 10, CWCAL ) ;
     782  //
    981783  if ( readHeader( SCNLEN, sameEndian ) == -1 ) {
    982784    os << LogIO::WARN << "Error while reading data SCNLEN." << endl ;
     
    1024826      return -1 ;
    1025827    }
    1026      // DEBUG
    1027 //     if ( i == 0 ) {
    1028 //       cout << "DSBFC   " ;
    1029 //     }
    1030 //     else if ( ( i % 5 ) == 0 ) {
    1031 //       cout << endl << "        " ;
    1032 //     }
    1033 //     cout << DSBFC[i] << " " ;
    1034     //
    1035   }
    1036   //cout << endl ;
     828  }
     829  // DEBUG
     830//   nro_debug_output( "DSBFC", ASTE_ARYMAX_FX, DSBFC ) ;
     831  //
    1037832
    1038833  scanNum_ = NSCAN + 1 ; // includes ZERO scan
  • trunk/external-alma/atnf/PKSIO/NRODataset.h

    r2434 r2436  
    4444#include <atnf/PKSIO/NRODataRecord.h>
    4545#include <casa/namespace.h>
     46#include <casa/iomanip.h>
    4647
    4748#define SCAN_HEADER_SIZE 424
     
    522523} ;
    523524
     525// debug message output
     526template<class T> inline void nro_debug_output( char *name, int len, vector<T> &val )
     527{
     528  for ( int i = 0 ; i < len ; i++ ) {
     529    if ( i == 0 ) {
     530      cout << setw(8) << left << name ;
     531    }
     532    else if ( ( i % 5 ) == 0 ) {
     533      cout << endl << "        " ;
     534    }
     535    cout << "\'" << val[i] << "\' " ;
     536  }
     537  cout << endl ;
     538}
     539
     540template<class T> inline void nro_debug_output( char *name, int len1, int len2, vector< vector<T> > &val )
     541{
     542  for ( int i = 0 ; i < len1 ; i++ ) {
     543    for ( int j = 0 ; j < len2 ; j++ ) {
     544      if ( j == 0 ) {
     545        if ( i < 10 )
     546          cout << name << "0" << i << " " ;
     547        else
     548          cout << name << i << " " ;
     549      }
     550      else if ( ( j % 5 ) == 0 ) {
     551        cout << endl << "        " ;
     552      }
     553      cout << "\'" << val[i][j] << "\' " ;
     554    }
     555    cout << endl ;
     556  }
     557}
     558
    524559
    525560#endif /* NRO_HEADER_H */
  • trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc

    r2434 r2436  
    620620  }
    621621  // DEBUG
    622 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    623 //     if ( i == 0 ) {
    624 //       cout << "RX      " ;
    625 //     }
    626 //     else if ( ( i % 5 ) == 0 ) {
    627 //       cout << endl << "        " ;
    628 //     }
    629 //     cout << "\'" << RX[i] << "\' " ;
    630 //   }
    631 //   cout << endl ;
     622//   nro_debug_output( "RX", ARYNM, RX ) ;
    632623  //
    633624  if ( readColumn( HPBW, "HPBW", sameEndian ) != 0 ) {
     
    636627  }
    637628  // DEBUG
    638 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    639 //     if ( i == 0 ) {
    640 //       //cout << "HPBW    " ;
    641 //     }
    642 //     else if ( ( i % 5 ) == 0 ) {
    643 //       //cout << endl << "        " ;
    644 //     }
    645 //     //cout << HPBW[i] << " " ;
    646 //   }
    647 //   //cout << endl ;
     629//   nro_debug_output( "HPBW", ARYNM, HPBW ) ;
    648630  //
    649631  if ( readColumn( EFFA, "EFFA", sameEndian ) != 0 ) {
     
    652634  }
    653635  // DEBUG
    654 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    655 //     if ( i == 0 ) {
    656 //       //cout << "EFFA    " ;
    657 //     }
    658 //     else if ( ( i % 5 ) == 0 ) {
    659 //       //cout << endl << "        " ;
    660 //     }
    661 //     //cout << EFFA[i] << " " ;
    662 //   }
    663 //   //cout << endl ;
     636//   nro_debug_output( "EFFA", ARYNM, EFFA ) ;
    664637  //
    665638  if ( readColumn( EFFB, "EFFB", sameEndian ) != 0 ) {
     
    668641  }
    669642  // DEBUG
    670 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    671 //     if ( i == 0 ) {
    672 //       //cout << "EFFB    " ;
    673 //     }
    674 //     else if ( ( i % 5 ) == 0 ) {
    675 //       //cout << endl << "        " ;
    676 //     }
    677 //     //cout << EFFB[i] << " " ;
    678 //   }
    679 //   //cout << endl ;
     643//   nro_debug_output( "EFFB", ARYNM, EFFB ) ;
    680644  //
    681645  if ( readColumn( EFFL, "EFFL", sameEndian ) != 0 ) {
     
    684648  }
    685649  // DEBUG
    686 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    687 //     if ( i == 0 ) {
    688 //       //cout << "EFFL    " ;
    689 //     }
    690 //     else if ( ( i % 5 ) == 0 ) {
    691 //       //cout << endl << "        " ;
    692 //     }
    693 //     //cout << EFFL[i] << " " ;
    694 //   }
    695 //   //cout << endl ;
     650//   nro_debug_output( "EFFL", ARYNM, EFFL ) ;
    696651  //
    697652  if ( readColumn( EFSS, "EFSS", sameEndian ) != 0 ) {
     
    700655  }
    701656  // DEBUG
    702 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    703 //     if ( i == 0 ) {
    704 //       //cout << "EFSS    " ;
    705 //     }
    706 //     else if ( ( i % 5 ) == 0 ) {
    707 //       //cout << endl << "        " ;
    708 //     }
    709 //     //cout << EFSS[i] << " " ;
    710 //   }
    711 //   //cout << endl ;
     657//   nro_debug_output( "EFSS", ARYNM, EFSS ) ;
    712658  //
    713659  if ( readColumn( GAIN, "GAIN", sameEndian ) != 0 ) {
     
    716662  }
    717663  // DEBUG
    718 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    719 //     if ( i == 0 ) {
    720 //       //cout << "GAIN    " ;
    721 //     }
    722 //     else if ( ( i % 5 ) == 0 ) {
    723 //       //cout << endl << "        " ;
    724 //     }
    725 //     //cout << GAIN[i] << " " ;
    726 //   }
    727 //   //cout << endl ;
     664//   nro_debug_output( "GAIN", ARYNM, GAIN ) ;
    728665  //
    729666  if ( readColumn( HORN, "HORN" ) != 0 ) {
     
    732669  }
    733670  // DEBUG
    734 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    735 //     if ( i == 0 ) {
    736 //       cout << "HORN    " ;
    737 //     }
    738 //     else if ( ( i % 5 ) == 0 ) {
    739 //       cout << endl << "        " ;
    740 //     }
    741 //     cout << "\'" << HORN[i] << "\' " ;
    742 //   }
    743 //   cout << endl ;
     671//   nro_debug_output( "HORN", ARYNM, HORN ) ;
    744672  //
    745673  if ( readColumn( POLTP, "POLTP" ) != 0 ) {
     
    748676  }
    749677  // DEBUG
    750 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    751 //     if ( i == 0 ) {
    752 //       //cout << "POLTP   " ;
    753 //     }
    754 //     else if ( ( i % 5 ) == 0 ) {
    755 //       //cout << endl << "        " ;
    756 //     }
    757 //     //cout << "\'" << POLTP[i] << "\' " ;
    758 //   }
    759 //   //cout << endl ;
     678//   nro_debug_output( "POLTP", ARYNM, POLTP ) ;
    760679  //
    761680  vector<int> ipoldr( ARYNM, 0 ) ;
     
    767686    POLDR[i] = (double)ipoldr[i] ;
    768687  // DEBUG
    769 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    770 //     if ( i == 0 ) {
    771 //       //cout << "POLDR   " ;
    772 //     }
    773 //     else if ( ( i % 5 ) == 0 ) {
    774 //       //cout << endl << "        " ;
    775 //     }
    776 //     //cout << POLDR[i] << " " ;
    777 //   }
    778 //   //cout << endl ;
     688//   nro_debug_output( "POLDR", ARYNM, POLDR ) ;
    779689  //
    780690  if ( readColumn( POLAN, "POLAN", sameEndian ) != 0 ) {
     
    783693  }
    784694  // DEBUG
    785 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    786 //     if ( i == 0 ) {
    787 //       //cout << "POLAN   " ;
    788 //     }
    789 //     else if ( ( i % 5 ) == 0 ) {
    790 //       //cout << endl << "        " ;
    791 //     }
    792 //     //cout << POLAN[i] << " " ;
    793 //   }
    794 //   //cout << endl ;
     695//   nro_debug_output( "POLAN", ARYNM, POLAN ) ;
    795696  //
    796697  if ( readColumn( DFRQ, "DFRQ", sameEndian ) != 0 ) {
     
    799700  }
    800701  // DEBUG
    801 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    802 //     if ( i == 0 ) {
    803 //       //cout << "DFRQ    " ;
    804 //     }
    805 //     else if ( ( i % 5 ) == 0 ) {
    806 //       //cout << endl << "        " ;
    807 //     }
    808 //     //cout << DFRQ[i] << " " ;
    809 //   }
    810 //   //cout << endl ;
     702//   nro_debug_output( "DFRQ", ARYNM, DFRQ ) ;
    811703  //
    812704  if ( readColumn( SIDBD, "SIDBD" ) != 0 ) {
     
    815707  }
    816708  // DEBUG
    817 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    818 //     if ( i == 0 ) {
    819 //       //cout << "SIDBD   " ;
    820 //     }
    821 //     else if ( ( i % 5 ) == 0 ) {
    822 //       //cout << endl << "        " ;
    823 //     }
    824 //     //cout << "\'" << SIDBD[i] << "\' " ;
    825 //   }
    826 //   //cout << endl ;
     709//   nro_debug_output( "SIDBD", ARYNM, SIDBD ) ;
    827710  //
    828711  if ( readColumn( REFN, "REFN", sameEndian ) != 0 ) {
     
    831714  }
    832715  // DEBUG
    833 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    834 //     if ( i == 0 ) {
    835 //       //cout << "REFN    " ;
    836 //     }
    837 //     else if ( ( i % 5 ) == 0 ) {
    838 //       //cout << endl << "        " ;
    839 //     }
    840 //     //cout << REFN[i] << " " ;
    841 //   }
    842 //   //cout << endl ;
     716//   nro_debug_output( "REFN", ARYNM, REFN ) ;
    843717  //
    844718  if ( readColumn( IPINT, "IPINT", sameEndian ) != 0 ) {
     
    847721  }
    848722  // DEBUG
    849 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    850 //     if ( i == 0 ) {
    851 //       //cout << "IPINT   " ;
    852 //     }
    853 //     else if ( ( i % 5 ) == 0 ) {
    854 //       //cout << endl << "        " ;
    855 //     }
    856 //     //cout << IPINT[i] << " " ;
    857 //   }
    858 //   //cout << endl ;
     723//   nro_debug_output( "IPINT", ARYNM, IPINT ) ;
    859724  //
    860725  if ( readColumn( MULTN, "MULTN", sameEndian ) != 0 ) {
     
    863728  }
    864729  // DEBUG
    865 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    866 //     if ( i == 0 ) {
    867 //       //cout << "MULTN   " ;
    868 //     }
    869 //     else if ( ( i % 5 ) == 0 ) {
    870 //       //cout << endl << "        " ;
    871 //     }
    872 //     //cout << MULTN[i] << " " ;
    873 //   }
    874 //   //cout << endl ;
     730//   nro_debug_output( "MULTN", ARYNM, MULTN ) ;
    875731  //
    876732  if ( readColumn( MLTSCF, "MLTSCF", sameEndian ) != 0 ) {
     
    879735  }
    880736  // DEBUG
    881 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    882 //     if ( i == 0 ) {
    883 //       //cout << "MLTSCF  " ;
    884 //     }
    885 //     else if ( ( i % 5 ) == 0 ) {
    886 //       //cout << endl << "        " ;
    887 //     }
    888 //     //cout << MLTSCF[i] << " " ;
    889 //   }
    890 //   //cout << endl ;
     737//   nro_debug_output( "MLTSCF", ARYNM, MLTSCF ) ;
    891738  //
    892739  if ( readColumn( LAGWIND, "LAGWIN" ) != 0 ) {
     
    895742  }
    896743  // DEBUG
    897 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    898 //     if ( i == 0 ) {
    899 //       //cout << "LAGWIND " ;
    900 //     }
    901 //     else if ( ( i % 5 ) == 0 ) {
    902 //       //cout << endl << "        " ;
    903 //     }
    904 //     //cout << "\'" << LAGWIND[i] << "\' " ;
    905 //   }
    906 //   //cout << endl ;
     744//   nro_debug_output( "LAGWIND", ARYNM, LAGWIND ) ;
    907745  //
    908746  if ( readColumn( BEBW, "BEBW", sameEndian ) != 0 ) {
     
    911749  }
    912750  // DEBUG
    913 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    914 //     if ( i == 0 ) {
    915 //       //cout << "BEBW    " ;
    916 //     }
    917 //     else if ( ( i % 5 ) == 0 ) {
    918 //       //cout << endl << "        " ;
    919 //     }
    920 //     //cout << BEBW[i] << " " ;
    921 //   } 
    922 //   //cout << endl ;
     751//   nro_debug_output( "BEBW", ARYNM, BEBW ) ;
    923752  //
    924753  if ( readColumn( BERES, "BERES", sameEndian ) != 0 ) {
     
    927756  }
    928757  // DEBUG
    929 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    930 //     if ( i == 0 ) {
    931 //       //cout << "BERES   " ;
    932 //     }
    933 //     else if ( ( i % 5 ) == 0 ) {
    934 //       //cout << endl << "        " ;
    935 //     }
    936 //     //cout << BERES[i] << " " ;
    937 //   }
    938 //   //cout << endl ;
     758//   nro_debug_output( "BERES", ARYNM, BERES ) ;
    939759  //
    940760  if ( readColumn( CHWID, "CHWID", sameEndian ) != 0 ) {
     
    942762    return -1 ;
    943763  }
    944     // DEBUG
    945 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    946 //     if ( i == 0 ) {
    947 //       //cout << "CHWID   " ;
    948 //     }
    949 //     else if ( ( i % 5 ) == 0 ) {
    950 //       //cout << endl << "        " ;
    951 //     }
    952 //     //cout << CHWID[i] << " " ;
    953 //   }
    954 //   //cout << endl ;
     764  // DEBUG
     765//   nro_debug_output( "CHWID", ARYNM, CHWID ) ;
    955766  //
    956767  if ( readARRY() != 0 ) {
     
    959770  }
    960771  // DEBUG
    961 //   for ( int i = 0 ; i < NRO_FITS_ARYMAX ; i++ ) {
    962 //     if ( i == 0 ) {
    963 //       //cout << "ARRY    " ;
    964 //     }
    965 //     else if ( ( i % 20 ) == 0 ) {
    966 //       //cout << endl << "        " ;
    967 //     }
    968 //     //cout << ARRY[i] << " " ;
    969 //   }
    970 //   //cout << endl ;
     772//   nro_debug_output( "ARRY", NRO_FITS_ARYMAX, ARRY ) ;
    971773  //
    972774  if ( readColumn( NFCAL, "NFCAL", sameEndian ) != 0 ) {
     
    974776    return -1 ;
    975777  }
    976     // DEBUG
    977 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    978 //     if ( i == 0 ) {
    979 //       //cout << "NFCAL   " ;
    980 //     }
    981 //     else if ( ( i % 5 ) == 0 ) {
    982 //       //cout << endl << "        " ;
    983 //     }
    984 //     //cout << NFCAL[i] << " " ;
    985 //   }
    986 //   //cout << endl ;
     778  // DEBUG
     779//   nro_debug_output( "NFCAL", ARYNM, NFCAL ) ;
    987780  //
    988781  if ( readColumn( F0CAL, "F0CAL", sameEndian ) != 0 ) {
     
    990783    return -1 ;
    991784  }
    992     // DEBUG
    993 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    994 //     if ( i == 0 ) {
    995 //       //cout << "F0CAL   " ;
    996 //     }
    997 //     else if ( ( i % 5 ) == 0 ) {
    998 //       //cout << endl << "        " ;
    999 //     }
    1000 //     //cout << F0CAL[i] << " " ;
    1001 //   }
    1002 //   //cout << endl ;
     785  // DEBUG
     786//   nro_debug_output( "F0CAL", ARYNM, F0CAL ) ;
    1003787  //
    1004788  for ( int i= 0 ; i < 10 ; i++) {
     
    1013797  }
    1014798  // DEBUG
    1015 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    1016 //     for ( int j = 0 ; j < 10 ; j++ ) {
    1017 //       if ( j == 0 ) {
    1018 //         if ( i < 10 )
    1019 //           //cout << "FQCAL0" << i << " " ;
    1020 //         else
    1021 //           //cout << "FQCAL" << i << " " ;
    1022 //       }
    1023 //       else if ( ( j % 5 ) == 0 ) {
    1024 //         //cout << endl << "        " ;
    1025 //       }
    1026 //       //cout << FQCAL[i][j] << " " ;
    1027 //     }
    1028 //     //cout << endl ;
    1029 //   }
     799//   nro_debug_output( "FQCAL", ARYNM, 10, FQCAL ) ;
    1030800  //
    1031801  for ( int i= 0 ; i < 10 ; i++) {
     
    1040810  }
    1041811  // DEBUG
    1042 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    1043 //     for ( int j = 0 ; j < 10 ; j++ ) {
    1044 //       if ( j == 0 ) {
    1045 //         if ( i < 10 )
    1046 //           //cout << "CHCAL0" << i << " " ;
    1047 //         else
    1048 //           //cout << "CHCAL" << i << " " ;
    1049 //       }
    1050 //       else if ( ( j % 5 ) == 0 ) {
    1051 //         //cout << endl << "        " ;
    1052 //       }
    1053 //      //cout << CHCAL[i][j] << " " ;
    1054 //    }
    1055 //    //cout << endl ;
    1056 //   }
     812//   nro_debug_output( "CHCAL", ARYNM, 10, CHCAL ) ;
    1057813  //
    1058814  for ( int i= 0 ; i < 10 ; i++) {
     
    1067823  }
    1068824  // DEBUG
    1069 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    1070 //     for ( int j = 0 ; j < 10 ; j++ ) {
    1071 //       if ( j == 0 ) {
    1072 //         if ( i < 10 )
    1073 //           //cout << "CWCAL0" << i << " " ;
    1074 //         else
    1075 //           //cout << "CWCAL" << i << " " ;
    1076 //       }
    1077 //       else if ( ( j % 5 ) == 0 ) {
    1078 //         //cout << endl << "        " ;
    1079 //       }
    1080 //       //cout << CWCAL[i][j] << " " ;
    1081 //     }
    1082 //     //cout << endl ;
    1083 //   }
     825//   nro_debug_output( "CWCAL", ARYNM, 10, CWCAL ) ;
    1084826  //
    1085827  if ( readHeader( SCNLEN, "NAXIS1", sameEndian ) != 0 ) {
     
    1117859  }
    1118860  // DEBUG
    1119 //   for ( int i = 0 ; i < ARYNM ; i++ ) {
    1120 //     if ( i == 0 ) {
    1121 //       //cout << "DSBFC   " ;
    1122 //     }
    1123 //     else if ( ( i % 5 ) == 0 ) {
    1124 //       //cout << endl << "        " ;
    1125 //     }
    1126 //     //cout << DSBFC[i] << " " ;
    1127 //   }
    1128 //   //cout << endl ;
     861//   nro_debug_output( "DSBFC", ARYNM, DSBFC ) ;
    1129862  //
    1130863
  • trunk/external-alma/atnf/PKSIO/NROOTFDataset.cc

    r1868 r2436  
    535535    c18[16] = '\0' ;
    536536    RX[i] = string( c18 ) ;
    537     // DEBUG
    538 //     if ( i == 0 ) {
    539 //       cout << "RX      " ;
    540 //     }
    541 //     else if ( ( i % 5 ) == 0 ) {
    542 //       cout << endl << "        " ;
    543 //     }
    544 //     cout << RX[i] << " " ;
    545     //
    546   }
    547   //cout << endl ;
     537  }
     538  // DEBUG
     539//   nro_debug_output( "RX", NRO_ARYMAX, RX ) ;
     540  //
    548541  for ( int i = 0 ; i < NRO_ARYMAX ; i++ ) {
    549542    if ( readHeader( HPBW[i], sameEndian ) == -1 ) {
     
    551544      return -1 ;
    552545    }
    553     // DEBUG
    554 //     if ( i == 0 ) {
    555 //       cout << "HPBW    " ;
    556 //     }
    557 //     else if ( ( i % 5 ) == 0 ) {
    558 //       cout << endl << "        " ;
    559 //     }
    560 //     cout << HPBW[i] << " " ;
    561     //
    562   }
    563   //cout << endl ;
     546  }
     547  // DEBUG
     548//   nro_debug_output( "HPBW", NRO_ARYMAX, HPBW ) ;
     549  //
    564550  for ( int i = 0 ; i < NRO_ARYMAX ; i++ ) {
    565551    if ( readHeader( EFFA[i], sameEndian ) == -1 ) {
     
    567553      return -1 ;
    568554    }
    569     // DEBUG
    570 //     if ( i == 0 ) {
    571 //       cout << "EFFA    " ;
    572 //     }
    573 //     else if ( ( i % 5 ) == 0 ) {
    574 //       cout << endl << "        " ;
    575 //     }
    576 //     cout << EFFA[i] << " " ;
    577     //
    578   }
    579   //cout << endl ;
     555  }
     556  // DEBUG
     557//   nro_debug_output( "EFFA", NRO_ARYMAX, EFFA ) ;
     558  //
    580559  for ( int i = 0 ; i < NRO_ARYMAX ; i++ ) {
    581560    if ( readHeader( EFFB[i], sameEndian ) == -1 ) {
     
    583562      return -1 ;
    584563    }
    585     // DEBUG
    586 //     if ( i == 0 ) {
    587 //       cout << "EFFB    " ;
    588 //     }
    589 //     else if ( ( i % 5 ) == 0 ) {
    590 //       cout << endl << "        " ;
    591 //     }
    592 //     cout << EFFB[i] << " " ;
    593     //
    594   }
    595   //cout << endl ;
     564  }
     565  // DEBUG
     566//   nro_debug_output( "EFFB", NRO_ARYMAX, EFFB ) ;
     567  //
    596568  for ( int i = 0 ; i < NRO_ARYMAX ; i++ ) {
    597569    if ( readHeader( EFFL[i], sameEndian ) == -1 ) {
     
    599571      return -1 ;
    600572    }
    601     // DEBUG
    602 //     if ( i == 0 ) {
    603 //       cout << "EFFL    " ;
    604 //     }
    605 //     else if ( ( i % 5 ) == 0 ) {
    606 //       cout << endl << "        " ;
    607 //     }
    608 //     cout << EFFL[i] << " " ;
    609     //
    610   }
    611   //cout << endl ;
     573  }
     574  // DEBUG
     575//   nro_debug_output( "EFFL", NRO_ARYMAX, EFFL ) ;
     576  //
    612577  for ( int i = 0 ; i < NRO_ARYMAX ; i++ ) {
    613578    if ( readHeader( EFSS[i], sameEndian ) == -1 ) {
     
    615580      return -1 ;
    616581    }
    617     // DEBUG
    618 //     if ( i == 0 ) {
    619 //       cout << "EFSS    " ;
    620 //     }
    621 //     else if ( ( i % 5 ) == 0 ) {
    622 //       cout << endl << "        " ;
    623 //     }
    624 //     cout << EFSS[i] << " " ;
    625     //
    626   }
    627   //cout << endl ;
     582  }
     583  // DEBUG
     584//   nro_debug_output( "EFSS", NRO_ARYMAX, EFSS ) ;
     585  //
    628586  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    629587    if ( readHeader( GAIN[i], sameEndian ) == -1 ) {
     
    631589      return -1 ;
    632590    }
    633     // DEBUG
    634 //     if ( i == 0 ) {
    635 //       cout << "GAIN    " ;
    636 //     }
    637 //     else if ( ( i % 5 ) == 0 ) {
    638 //       cout << endl << "        " ;
    639 //     }
    640 //     cout << GAIN[i] << " " ;
    641     //
    642   }
    643   //cout << endl ;
     591  }
     592  // DEBUG
     593//   nro_debug_output( "GAIN", NRO_ARYMAX, GAIN ) ;
     594  //
    644595  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    645596    strcpy( c4, str4.c_str() ) ;
     
    649600    }
    650601    HORN[i] = string( c4 ) ;
    651     // DEBUG
    652 //     if ( i == 0 ) {
    653 //       cout << "HORN    " ;
    654 //     }
    655 //     else if ( ( i % 5 ) == 0 ) {
    656 //       cout << endl << "        " ;
    657 //     }
    658 //     cout << HORN[i] << " " ;
    659     //
    660   }
    661   //cout << endl ;
     602  }
     603  // DEBUG
     604//   nro_debug_output( "HORN", NRO_ARYMAX, HORN ) ;
     605  //
    662606  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    663607    strcpy( c4, str4.c_str() ) ;
     
    667611    }
    668612    POLTP[i] = string( c4 ) ;
    669     // DEBUG
    670 //     if ( i == 0 ) {
    671 //       cout << "POLTP   " ;
    672 //     }
    673 //     else if ( ( i % 5 ) == 0 ) {
    674 //       cout << endl << "        " ;
    675 //     }
    676 //     cout << POLTP[i] << " " ;
    677     //
    678   }
    679   //cout << endl ;
     613  }
     614  // DEBUG
     615//   nro_debug_output( "POLTP", NRO_ARYMAX, POLTP ) ;
     616  //
    680617  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    681618    if ( readHeader( POLDR[i], sameEndian ) == -1 ) {
     
    683620      return -1 ;
    684621    }
    685     // DEBUG
    686 //     if ( i == 0 ) {
    687 //       cout << "POLDR   " ;
    688 //     }
    689 //     else if ( ( i % 5 ) == 0 ) {
    690 //       cout << endl << "        " ;
    691 //     }
    692 //     cout << POLDR[i] << " " ;
    693     //
    694   }
    695   //cout << endl ;
     622  }
     623  // DEBUG
     624//   nro_debug_output( "POLDR", NRO_ARYMAX, POLDR ) ;
     625  //
    696626  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    697627    if ( readHeader( POLAN[i], sameEndian ) == -1 ) {
     
    699629      return -1 ;
    700630    }
    701     // DEBUG
    702 //     if ( i == 0 ) {
    703 //       cout << "POLAN   " ;
    704 //     }
    705 //     else if ( ( i % 5 ) == 0 ) {
    706 //       cout << endl << "        " ;
    707 //     }
    708 //     cout << POLAN[i] << " " ;
    709     //
    710   }
    711   //cout << endl ;
     631  }
     632  // DEBUG
     633//   nro_debug_output( "POLAN", NRO_ARYMAX, POLAN ) ;
     634  //
    712635  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    713636    if ( readHeader( DFRQ[i], sameEndian ) == -1 ) {
     
    715638      return -1 ;
    716639    }
    717     // DEBUG
    718 //     if ( i == 0 ) {
    719 //       cout << "DFRQ    " ;
    720 //     }
    721 //     else if ( ( i % 5 ) == 0 ) {
    722 //       cout << endl << "        " ;
    723 //     }
    724 //     cout << DFRQ[i] << " " ;
    725     //
    726   }
    727   //cout << endl ;
     640  }
     641  // DEBUG
     642//   nro_debug_output( "DFRQ", NRO_ARYMAX, DFRQ ) ;
     643  //
    728644  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    729645    strcpy( c4, str4.c_str() ) ;
     
    733649    }
    734650    SIDBD[i] = string( c4 ) ;
    735     // DEBUG
    736 //     if ( i == 0 ) {
    737 //       cout << "SIDBD   " ;
    738 //     }
    739 //     else if ( ( i % 5 ) == 0 ) {
    740 //       cout << endl << "        " ;
    741 //     }
    742 //     cout << SIDBD[i] << " " ;
    743     //
    744   }
    745   //cout << endl ;
     651  }
     652  // DEBUG
     653//   nro_debug_output( "SIDBD", NRO_ARYMAX, SIDBD ) ;
     654  //
    746655  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    747656    if ( readHeader( REFN[i], sameEndian ) == -1 ) {
     
    749658      return -1 ;
    750659    }
    751     // DEBUG
    752 //     if ( i == 0 ) {
    753 //       cout << "REFN    " ;
    754 //     }
    755 //     else if ( ( i % 5 ) == 0 ) {
    756 //       cout << endl << "        " ;
    757 //     }
    758 //     cout << REFN[i] << " " ;
    759     //
    760   }
    761   //cout << endl ;
     660  }
     661  // DEBUG
     662//   nro_debug_output( "REFN", NRO_ARYMAX, REFN ) ;
     663  //
    762664  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    763665    if ( readHeader( IPINT[i], sameEndian ) == -1 ) {
     
    765667      return -1 ;
    766668    }
    767     // DEBUG
    768 //     if ( i == 0 ) {
    769 //       cout << "IPINT   " ;
    770 //     }
    771 //     else if ( ( i % 5 ) == 0 ) {
    772 //       cout << endl << "        " ;
    773 //     }
    774 //     cout << IPINT[i] << " " ;
    775     //
    776   }
    777   //cout << endl ;
     669  }
     670  // DEBUG
     671//   nro_debug_output( "IPINT", NRO_ARYMAX, IPINT ) ;
     672  //
    778673  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    779674    if ( readHeader( MULTN[i], sameEndian ) == -1 ) {
     
    781676      return -1 ;
    782677    }
    783     // DEBUG
    784 //     if ( i == 0 ) {
    785 //       cout << "MULTN   " ;
    786 //     }
    787 //     else if ( ( i % 5 ) == 0 ) {
    788 //       cout << endl << "        " ;
    789 //     }
    790 //     cout << MULTN[i] << " " ;
    791     //
    792   }
    793   //cout << endl ;
     678  }
     679  // DEBUG
     680//   nro_debug_output( "MULTN", NRO_ARYMAX, MULTN ) ;
     681  //
    794682  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    795683    if ( readHeader( MLTSCF[i], sameEndian ) == -1 ) {
     
    797685      return -1 ;
    798686    }
    799     // DEBUG
    800 //     if ( i == 0 ) {
    801 //       cout << "MLTSCF  " ;
    802 //     }
    803 //     else if ( ( i % 5 ) == 0 ) {
    804 //       cout << endl << "        " ;
    805 //     }
    806 //     cout << MLTSCF[i] << " " ;
    807     //
    808   }
    809   //cout << endl ;
     687  }
     688  // DEBUG
     689//   nro_debug_output( "MLTSCF", NRO_ARYMAX, MLTSCF ) ;
     690  //
    810691  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    811692    strcpy( c8, str8.c_str() ) ;
     
    815696    }
    816697    LAGWIND[i] = string( c8 ) ;
    817     // DEBUG
    818 //     if ( i == 0 ) {
    819 //       cout << "LAGWIND " ;
    820 //     }
    821 //     else if ( ( i % 5 ) == 0 ) {
    822 //       cout << endl << "        " ;
    823 //     }
    824 //     cout << LAGWIND[i] << " " ;
    825     //
    826   }
    827   //cout << endl ;
     698  }
     699  // DEBUG
     700//   nro_debug_output( "LAGWIND", NRO_ARYMAX, LAGWIND ) ;
     701  //
    828702  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    829703    if ( readHeader( BEBW[i], sameEndian ) == -1 ) {
     
    831705      return -1 ;
    832706    }
    833     // DEBUG
    834 //     if ( i == 0 ) {
    835 //       cout << "BEBW    " ;
    836 //     }
    837 //     else if ( ( i % 5 ) == 0 ) {
    838 //       cout << endl << "        " ;
    839 //     }
    840 //     cout << BEBW[i] << " " ;
    841     //
    842   }
    843   //cout << endl ;
     707  }
     708  // DEBUG
     709//   nro_debug_output( "BEBW", NRO_ARYMAX, BEBW ) ;
     710  //
    844711  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    845712    if ( readHeader( BERES[i], sameEndian ) == -1 ) {
     
    847714      return -1 ;
    848715    }
    849     // DEBUG
    850 //     if ( i == 0 ) {
    851 //       cout << "BERES   " ;
    852 //     }
    853 //     else if ( ( i % 5 ) == 0 ) {
    854 //       cout << endl << "        " ;
    855 //     }
    856 //     cout << BERES[i] << " " ;
    857     //
    858   }
    859   //cout << endl ;
     716  }
     717  // DEBUG
     718//   nro_debug_output( "BERES", NRO_ARYMAX, BERES ) ;
     719  //
    860720  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    861721    if ( readHeader( CHWID[i], sameEndian ) == -1 ) {
     
    863723      return -1 ;
    864724    }
    865     // DEBUG
    866 //     if ( i == 0 ) {
    867 //       cout << "CHWID   " ;
    868 //     }
    869 //     else if ( ( i % 5 ) == 0 ) {
    870 //       cout << endl << "        " ;
    871 //     }
    872 //     cout << CHWID[i] << " " ;
    873     //
    874   }
    875   //cout << endl ;
     725  }
     726  // DEBUG
     727//   nro_debug_output( "CHWID", NRO_ARYMAX, CHWID ) ;
     728  //
    876729  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    877730    if ( readHeader( ARRY[i], sameEndian ) == -1 ) {
     
    879732      return -1 ;
    880733    }
    881     // DEBUG
    882 //     if ( i == 0 ) {
    883 //       cout << "ARRY    " ;
    884 //     }
    885 //     else if ( ( i % 5 ) == 0 ) {
    886 //       cout << endl << "        " ;
    887 //     }
    888 //     cout << ARRY[i] << " " ;
    889     //
    890   }
    891   //cout << endl ;
     734  }
     735  // DEBUG
     736//   nro_debug_output( "ARRY", NRO_ARYMAX, ARRY ) ;
     737  //
    892738  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    893739    if ( readHeader( NFCAL[i], sameEndian ) == -1 ) {
     
    895741      return -1 ;
    896742    }
    897     // DEBUG
    898 //     if ( i == 0 ) {
    899 //       cout << "NFCAL   " ;
    900 //     }
    901 //     else if ( ( i % 5 ) == 0 ) {
    902 //       cout << endl << "        " ;
    903 //     }
    904 //     cout << NFCAL[i] << " " ;
    905     //
    906   }
    907   //cout << endl ;
     743  }
     744  // DEBUG
     745//   nro_debug_output( "NFCAL", NRO_ARYMAX, NFCAL ) ;
     746  //
    908747  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    909748    if ( readHeader( F0CAL[i], sameEndian ) == -1 ) {
     
    911750      return -1 ;
    912751    }
    913     // DEBUG
    914 //     if ( i == 0 ) {
    915 //       cout << "F0CAL   " ;
    916 //     }
    917 //     else if ( ( i % 5 ) == 0 ) {
    918 //       cout << endl << "        " ;
    919 //     }
    920 //     cout << F0CAL[i] << " " ;
    921     //
    922   }
    923   //cout << endl ;
     752  }
     753  // DEBUG
     754//   nro_debug_output( "F0CAL", NRO_ARYMAX, F0CAL ) ;
     755  //
    924756  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    925757    for ( int j = 0 ; j < 10 ; j++ ) {
     
    928760        return -1 ;
    929761      }
    930       // DEBUG
    931 //       if ( j == 0 ) {
    932 //         if ( i < 10 )
    933 //           cout << "FQCAL0" << i << " " ;
    934 //         else
    935 //           cout << "FQCAL" << i << " " ;
    936 //       }
    937 //       else if ( ( j % 5 ) == 0 ) {
    938 //         cout << endl << "        " ;
    939 //       }
    940 //       cout << FQCAL[i][j] << " " ;
    941       //
    942     }
    943     //cout << endl ;
    944   }
     762    }
     763  }
     764  // DEBUG
     765//   nro_debug_output( "FQCAL", NRO_ARYMAX, 10, FQCAL ) ;
     766  // 
    945767  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    946768    for ( int j = 0 ; j < 10 ; j++ ) {
     
    949771        return -1 ;
    950772      }
    951      // DEBUG
    952 //       if ( j == 0 ) {
    953 //         if ( i < 10 )
    954 //           cout << "CHCAL0" << i << " " ;
    955 //         else
    956 //           cout << "CHCAL" << i << " " ;
    957 //       }
    958 //       else if ( ( j % 5 ) == 0 ) {
    959 //         cout << endl << "        " ;
    960 //       }
    961 //       cout << CHCAL[i][j] << " " ;
    962      //
    963     }
    964     //cout << endl ;
    965   }
     773    }
     774  }
     775  // DEBUG
     776//   nro_debug_output( "CHCAL", NRO_ARYMAX, 10, CHCAL ) ;
     777  // 
    966778  for ( int i = 0 ; i < NRO_ARYMAX ; i++) {
    967779    for ( int j = 0 ; j < 10 ; j++ ) {
     
    970782        return -1 ;
    971783      }
    972       // DEBUG
    973 //       if ( j == 0 ) {
    974 //         if ( i < 10 )
    975 //           cout << "CWCAL0" << i << " " ;
    976 //         else
    977 //           cout << "CWCAL" << i << " " ;
    978 //       }
    979 //       else if ( ( j % 5 ) == 0 ) {
    980 //         cout << endl << "        " ;
    981 //       }
    982 //       cout << CWCAL[i][j] << " " ;
    983       //
    984     }
    985     //cout << endl ;
    986   }
     784    }
     785  }
     786  // DEBUG
     787//   nro_debug_output( "CWCAL", NRO_ARYMAX, 10, CWCAL ) ;
     788  // 
    987789  if ( readHeader( SCNLEN, sameEndian ) == -1 ) {
    988790    os << LogIO::WARN << "Error while reading data SCNLEN." << LogIO::POST ;
Note: See TracChangeset for help on using the changeset viewer.