Changeset 1492 in Sophya


Ignore:
Timestamp:
May 7, 2001, 7:41:52 PM (24 years ago)
Author:
ansari
Message:

correction bug ds FitsTOIWriter, trouve sur magique - Reza 7/5/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc

    r1467 r1492  
    6363       << name << endl;
    6464
    65   vector<string> coln;
    66   int ck=0;
     65  string * coln = new string[ncols];
    6766  for (map<string, int>::iterator ii = inIx.begin(); ii != inIx.end(); ii++) {
    6867    int j = (*ii).second;
    69     coln.push_back((*ii).first);
    7068    if (outFlags) j += j;
    71     colnames[j+1] = const_cast<char*>(coln[ck].c_str()); 
    72     cout << " Column[" << j+1 << "] Name=" << coln[ck] << endl;
    73     ck++;
    74     coltypes[j+1] = "1D";
    75     colunits[j+1] = "double";
     69    int ck = j+1;
     70    coln[ck] = (*ii).first;
     71    colnames[ck] = const_cast<char*>(coln[ck].c_str()); 
     72    cout << " Column[" << ck << "] Name=" << coln[ck] << endl;
     73    coltypes[ck] = "1D";
     74    colunits[ck] = "double";
    7675    if (outFlags) {
    77       coln.push_back("fg_" + coln[ck-1]);
    78       colnames[j+2] = const_cast<char*>(coln[ck].c_str()); 
    79       cout << " Column[" << j+1 << "] -Flag- Name=" << coln[ck] << endl;
    8076      ck++;
    81       coltypes[j+2] = "1I";
    82       colunits[j+2] = "Int_8Flag";
     77      coln[ck] = "fg_" + coln[ck-1];
     78      colnames[ck] = const_cast<char*>(coln[ck].c_str()); 
     79      cout << " Column[" << ck << "] -Flag- Name=" << coln[ck] << endl;
     80      coltypes[ck] = "1I";
     81      colunits[ck] = "Int_8Flag";
    8382    }
    8483  }
     
    9291  delete[] coltypes;
    9392  delete[] colnames;
     93  delete[] coln;
    9494
    9595  // Add headers ?
Note: See TracChangeset for help on using the changeset viewer.