37 #define DATRW_OASCIISTREAM_CC_VERSION \ 38 "DATRW_OASCIISTREAM_CC V1.2" 45 #include<datrwxx/asciiheaderkeys.h> 47 #define POUT( K, V ) Mos << "# " << K << ": " << V << std::endl; 48 #define FOUT( V ) Mos << "## " << V << std::endl; 52 const std::ios_base::openmode
58 const std::string& modifier,
60 Tbase(os,
Fall, true, true, true, true, debug)
63 "new instance established");
66 subformat(
"precision",
"7") >> this->
Mprecision;
77 "ASCII writing functions" << std::endl <<
78 "-----------------------" << std::endl <<
82 "Valid format modifiers are:\n";
84 mh(
"precision",
"n") <<
85 "Set number of significant digits to \"n\" for\n";
86 mh() <<
"float and double format output.\n";
97 const ::sff::FREE&
free=this->
free();
98 ::sff::FREE::Tlines::const_iterator I=
free.lines.begin();
99 while (I!=
free.lines.end())
108 "file FREE written if present");
120 "SRCE written if present");
132 for (
int i=series.first(); i<=series.last(); ++i)
135 Mos << series(i) <<
"\n";
149 for (
int i=series.first(); i<=series.last(); ++i)
152 Mos << series(i) <<
"\n";
165 for (
int i=series.first(); i<=series.last(); ++i)
167 Mos << series(i) <<
"\n";
204 "INFO written if present");
207 const ::sff::FREE&
free=this->
free();
208 ::sff::FREE::Tlines::const_iterator I=
free.lines.begin();
209 while (I!=
free.lines.end())
216 "trace FREE written if present");
const char *const keyinstype
key for WID2 line header field
const char *const keySRCEtype
key for SRCE line header field
unsigned int Mprecision
floating point format precision
bool hasinfo() const
info is available
const char *const keydouble
key for DATA type header field
const char *const keySRCEY
key for SRCE line header field
#define DATRW_OASCIISTREAM_CC_VERSION
macro function for debugging output (prototypes)
bool hassrce() const
srce is available
const char *const keyRECVY
key for INFO line header field
sff::WID2 wid2() const
return WID2 data
const char *const keydt
key for WID2 line header field
const char *const keyRECVCS
key for INFO line header field
const char *const keyhang
key for WID2 line header field
std::ostream & Mos
output stream to be used by this class
virtual void writetrace(const Tdseries::Tcoc &series)
write double data
static const std::ios_base::openmode openmode
static void help(std::ostream &os=std::cout)
const char *const keyint
key for DATA type header field
exception class declaration for libdatrwxx (prototypes)
sff::INFO info() const
return SRCE data
const char *const keycalib
key for WID2 line header field
const char *const keyauxid
key for WID2 line header field
const char *const keychannel
key for WID2 line header field
Root namespace of library.
sff::SRCE srce() const
return SRCE data
const char *const keydate
key for WID2 line header field
virtual void writefileheader()
actually write the file header
const char *const keynstacks
key for INFO line header field
oasciistream(std::ostream &os, const std::string &modifier="", const bool &debug=false)
const char *const keySRCEdate
key for SRCE line header field
sff::FREE free() const
return FREE data
const char *const keyRECVX
key for INFO line header field
const char *const keycalper
key for WID2 line header field
#define DATRW_debug(C, N, M)
produce debug output
bool Mdebug
global debug flag
const char *const keynsamples
key for WID2 line header field
void writetraceheader(const unsigned int &n, const char *type)
const char *const keySRCEX
key for SRCE line header field
const char *const keyRECVZ
key for INFO line header field
const char *const keySRCECS
key for SRCE line header field
const char *const keyfloat
key for DATA type header field
const char *const keyvang
key for WID2 line header field
#define DATRW_value(V)
report value
bool hasfree() const
free is available
const char *const keystation
key for WID2 line header field
const char *const keydata
key for DATA type header field
const char *const keySRCEZ
key for SRCE line header field
interface to write ASCII data (prototypes)