Changeset 18837 for trunk/FACT++/src
- Timestamp:
- 04/18/17 19:52:52 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/fitsdump.cc
r18836 r18837 449 449 if (tfile->IsZombie()) 450 450 { 451 cerr << "Could not open root file '" << rootfile << "'" << endl;451 cerr << "Could not open root file '" << filename << "'" << endl; 452 452 return -2; 453 453 } … … 492 492 for (auto it=cols.begin(); it!=cols.end(); it++) 493 493 { 494 const string branch = it->name+"["+to_string(it->last-it->first+1)+"]"; 494 string branch = it->name; 495 if (it->last!=it->first) 496 branch += "["+to_string(it->last-it->first+1)+"]"; 495 497 496 498 fout << "# Branch: " << branch << "\n"; … … 1098 1100 // ------------------------------------------------------------ 1099 1101 1100 const string filename = conf.Get<string>("outfile"); 1102 string filename = conf.Get<string>("outfile"); 1103 1104 if (!filename.empty() && filename[0]=='.') 1105 { 1106 if (fFilename.rfind(".fits")==fFilename.size()-5) 1107 filename.insert(0, fFilename.substr(0, fFilename.size()-5)); 1108 if (fFilename.rfind(".fits.fz")==fFilename.size()-8) 1109 filename.insert(0, fFilename.substr(0, fFilename.size()-8)); 1110 } 1101 1111 1102 1112 ostream fout(cout.rdbuf()); … … 1246 1256 , "Name of FITS file") 1247 1257 ("col,c", vars<string>(), "List of columns to dump\narg is a list of columns, separated by a space.\nAdditionnally, a list of sub-columns can be added\ne.g. Data[3] will dump sub-column 3 of column Data\nData[3:4] will dump sub-columns 3 and 4\nOmitting this argument dump the entire column\nnote: all indices start at zero") 1248 ("outfile,o", var<string>("-"), "Name of output file (-:/dev/stdout) ")1258 ("outfile,o", var<string>("-"), "Name of output file (-:/dev/stdout), if outfile starts with a dot, the extension .fits and .fits.fz are replaced automatically.") 1249 1259 ("precision,p", var<int>(20), "Precision of ofstream") 1250 1260 ("stat,s", po_switch(), "Perform statistics instead of dump")
Note:
See TracChangeset
for help on using the changeset viewer.