SFF++ library: reading and writing SFF from C++
◆
write()
template<class C >
void
sff::OutputWaveform
< C >::write
(
std::ostream &
os
)
const
inline
Definition at line
435
of file
sffxx.h
.
Referenced by
sff::operator<<()
.
436
{
437
Mheader
.
setnsamples
(
Mseries
.size());
438
Mheader
.
writeheader
(os);;
439
GSE2::waveform::TDAT2writeCM6 fwriter(
Mheader
.
wid2
().
nsamples
);
440
int
idata;
441
typename
C::Tvalue data;
442
for
(aff::Browser<Tcoc> i(
Mseries
); i.valid(); ++i)
443
{
444
data= *i;
445
if
(
Mheader
.
scale
())
446
{ idata=int(round(data/
Mheader
.
dast
().
ampfac
)); }
447
else
448
{ idata=int(round(data)); }
449
os << fwriter(idata);
450
}
451
Mheader
.
writetrailer
(os);
452
}
// OutputWaveform::write
sff::OutputWaveform::Mseries
Tcoc Mseries
Definition:
sffxx.h:341
sff::OutputWaveform::Mheader
TraceHeader Mheader
Definition:
sffxx.h:342
sff::TraceHeader::scale
const bool & scale() const
Definition:
sffxx.h:309
sff::WID2::nsamples
int nsamples
number of samples
Definition:
sffxx.h:219
sff::TraceHeader::writeheader
void writeheader(std::ostream &) const
Definition:
sffxx.cc:849
sff::TraceHeader::setnsamples
void setnsamples(const long int &n)
Definition:
sffxx.h:315
sff::TraceHeader::wid2
const WID2 & wid2() const
Definition:
sffxx.h:305
sff::TraceHeader::writetrailer
void writetrailer(std::ostream &) const
Definition:
sffxx.cc:859
sff::DAST::ampfac
double ampfac
Definition:
sffxx.h:187
sff::TraceHeader::dast
const DAST & dast() const
Definition:
sffxx.h:306
Here is the caller graph for this function:
sff
OutputWaveform
Generated on Mon Aug 21 2023 17:36:13 for SFF++ library: reading and writing SFF from C++ by
1.8.14