35 #define DATRW_SEIFEIO_CC_VERSION \ 36 "DATRW_SEIFEIO_CC V1.0" 40 #include <datrwxx/seifeio.h> 59 "read values from line:\n" <<
line);
60 std::istringstream iss(
line.substr(0,10));
72 iss.str(
line.substr(10,20));
81 iss.str(
line.substr(30,10));
92 iss.str(
line.substr(40,10));
99 iss.str(
line.substr(50,10));
105 Mtime=libtime::double2time(tsec)+libtime::double2time(tmin*60.);
114 libtime::TRelativeTime
116 libtime::TRelativeTime ttsec(
Mtime);
119 tmin=1440.*ttmin.days()+60.*ttmin.hour()+ttmin.minute();
120 tsec=libtime::time2double(ttsec);
121 std::ostringstream oss;
122 oss << std::setw(10) << std::left <<
Mnsamples;
123 oss << std::setw(20) << std::left <<
Mformat;
124 oss << std::setw(10) << std::left << std::showpoint <<
125 std::setprecision(3);
127 { oss << std::scientific; }
129 { oss << std::fixed; }
131 oss << std::setw(10) << std::left << std::setprecision(1)
132 << std::fixed << tmin;
133 oss << std::setw(10) << std::left << std::setprecision(6) << tsec;
145 "ERROR (seife::Header::read): input stream is not good");
149 "ERROR (seife::Header::read): input stream is not good");
151 while (line.substr(0,1) ==
"%")
153 Mfree.append(line.substr(1));
155 "ERROR (seife::Header::read): input stream is not good");
165 typedef ::sff::FREE::Tlines Tlines;
166 const Tlines& lines=
Mfree.lines;
173 Tlines::const_iterator I=lines.begin();
174 os << *I << std::endl;
176 unsigned int nlines=0;
177 while ((I != lines.end()) && (nlines<48))
179 os <<
"%" << *I << std::endl;
192 for (
int i=s.f();i<=s.l();++i)
194 os << std::scientific;
205 if (j != 1) { os << std::endl; }
unsigned int Mnsamples
number of samples
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
const unsigned int seife_standard_columns
unsigned int nsamples() const
return number of samples
const char *const seife_standard_format
macro function for debugging output (prototypes)
void set(const std::string &line)
set values from line
const unsigned int seife_standard_width
exception class declaration for libdatrwxx (prototypes)
bool Mdebug
request debug output
#define DATRW_SEIFEIO_CC_VERSION
const unsigned int seife_standard_precision
Root namespace of library.
utilities used by more than one type of data reader (prototypes)
void write_series(std::ostream &os, const Tseries::Tcoc &s)
write samples to file
int ntrailingdigits(double v, const bool &debug)
return number of trailing digits (after decimal point)
#define DATRW_debug(C, N, M)
produce debug output
std::string Mformat
Fortran data format.
double Mdt
sampling interval
libtime::TRelativeTime Mtime
time of first sample
#define DATRW_value(V)
report value
std::string line() const
create line for output from values