37 #define DATRW_ISACSTREAM_CC_VERSION \ 38 "DATRW_ISACSTREAM_CC V1.3" 43 #include <datrwxx/sacread.h> 50 const std::ios_base::openmode
64 Tbase(is, true, true, true, debug)
71 return(datrw::util::convert<Tfseries, Tdseries>(this->
fseries()));
86 return(datrw::util::convert<Tfseries, Tiseries>(this->
fseries()));
94 "entered function: call this->readheader()");
97 "finished; return from function");
105 "start reading header");
110 std::ostringstream oss;
112 "calling datrw::sac::read_sac_header");
115 "returned from datrw::sac::read_sac_header");
118 if (hd.
stla>0) { oss << hd.
stla <<
"°N; "; }
119 else { oss << -hd.
stla <<
"°S; "; }
120 if (hd.
stlo>0) { oss << hd.
stlo <<
"°E; "; }
121 else { oss << -hd.
stlo <<
"°W"; }
122 free.append(oss.str());
124 free.append(
"values from SAC binary header " 125 "that do not fit into SFF trace header");
128 oss <<
"initial index: " << hd.
b;
129 oss <<
"; final index: " << hd.
e;
130 free.append(oss.str());
131 info.cs=sff::CS_spherical;
137 free.append(
"station depth: " + oss.str() +
" m");
147 free.append(
"network name: " + std::string(hd.
knetwk, 8));
156 "finished; return from function");
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
macro function for debugging output (prototypes)
void setinfo(const sff::INFO &info)
aff::Series< float > Tfseries
SACheader read_sac_header(std::istream &is)
read SAC header from stream
static const std::ios_base::openmode openmode
read SAC files (prototypes)
aff::Series< double > Tdseries
const char *const streamID
Format properties.
Tseries read_sac_data(std::istream &is, const int &nsamples)
read samples from file
const int nsamples
number of samples per minute block and channel
exception class declaration for libdatrwxx (prototypes)
void setwid2(const sff::WID2 &wid2)
Root namespace of library.
void help(std::ostream &os)
print information about file decoding
const bool isbinary
Format properties.
utilities used by more than one type of data reader (prototypes)
virtual Tdseries dseries()
void settracefree(const sff::FREE &free)
aff::Series< int > Tiseries
virtual Tfseries fseries()
#define DATRW_debug(C, N, M)
produce debug output
isacstream(std::istream &is, const bool &debug=false)
virtual void skipseries()
static void help(std::ostream &os=std::cout)
virtual Tiseries iseries()