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.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.