Ignore:
Timestamp:
03/27/09 21:25:44 (15 years ago)
Author:
Malte Marquarding
Message:

Enhancement Ticket #155; chnaged the wy output filenames are generated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/STAsciiWriter.cpp

    r1375 r1552  
    8888
    8989   String rootName(fileName);
    90    if (rootName.length()==0) rootName = String("ascii");
    91 
     90   
    9291  Block<String> cols(4);
    9392  cols[0] = String("SCANNO");
     
    103102    String dirtype = stable.getDirectionRefString();
    104103    ostringstream onstr;
    105     onstr << "SCAN" << rec.asuInt("SCANNO")
    106     << "_CYCLE" << rec.asuInt("CYCLENO")
    107     << "_BEAM" << rec.asuInt("BEAMNO")
    108     << "_IF" << rec.asuInt("IFNO");
     104
     105    if (rootName.length()==0) {
     106      rootName = String("ascii");
     107    }
     108    if (tab.nrow() > 1) {
     109      if (stable.nscan() > 1)
     110        onstr << "_SCAN" << rec.asuInt("SCANNO");
     111      if (stable.ncycle(rec.asuInt("SCANNO")) > 1)
     112        onstr << "_CYCLE" << rec.asuInt("CYCLENO");
     113      if (stable.nbeam(rec.asuInt("SCANNO")) > 1)
     114        onstr << "_BEAM" << rec.asuInt("BEAMNO");
     115      if (stable.nif(rec.asuInt("SCANNO")) > 1)
     116        onstr << "_IF" << rec.asuInt("IFNO");
     117    }
     118
    109119    String fName = rootName + String(onstr) + String(".txt");
    110120    ofstream of(fName.chars(), ios::trunc);
Note: See TracChangeset for help on using the changeset viewer.