2 #include "CFatalException.h"
10 string version =
"$Id: printhdr.cpp 1816 2009-09-07 11:28:35Z mmoorkamp $";
14 cout <<
"This is printhdr: Print sac header information" << endl;
15 cout <<
" Reads in a file in SAC format and writes header data to stdout"
18 <<
" Not all header values are displayed, only the ones supported by CSeismicDatacomp"
20 cout <<
" This is Version: " <<
version << endl << endl;
22 string infilename = AskFilename(
"Input file: ");
31 cerr << e.what() << endl;
34 cout <<
"Name: " << Input.
GetName() << endl;
35 cout <<
"StLA: " << Input.
GetStLa() << endl;
36 cout <<
"StLo: " << Input.
GetStLo() << endl;
37 cout <<
"StEl: " << Input.
GetStEl() << endl;
38 cout <<
"StDp: " << Input.
GetStDp() << endl;
39 cout <<
"EvLa: " << Input.
GetEvLa() << endl;
40 cout <<
"EvLo: " << Input.
GetEvLo() << endl;
41 cout <<
"EvEl: " << Input.
GetEvEl() << endl;
42 cout <<
"EvDp: " << Input.
GetEvDp() << endl;
43 cout <<
"Mag: " << Input.
GetMag() << endl;
44 cout <<
"Dist: " << Input.
GetDist() << endl;
45 cout <<
"Az: " << Input.
GetAz() << endl;
46 cout <<
"Baz: " << Input.
GetBaz() << endl;
47 cout <<
"GcArc: " << Input.
GetGcarc() << endl;
48 cout <<
"Dt: " << Input.
GetDt() << endl;
49 cout <<
"B: " << Input.
GetB() << endl;
int ReadData(const std::string &filename, tseismicdataformat format=sac)
Read in data from a file, as we cannot determine the type from the ending we have to provide it...
double GetStLa() const
Return the latitude of the station.
double GetStDp() const
Get the depth of the station below the ground in m.
double GetDist() const
Get the distance between event and station.
double GetEvDp() const
Get the depth of the event.
double GetEvLo() const
Get the longitude of the event.
double GetEvEl() const
Get the elevation of the event.
double GetGcarc() const
Get the distance between station and event along a great circle.
double GetBaz() const
Get the back-azimuth of the event.
double GetEvLa() const
Get the latitude of the event.
double GetStEl() const
Get the elevation of the station in m.
std::string GetName() const
Return name of the component.
double GetMag() const
Get the magnitude of the event.
double GetAz() const
Get the azimuth of the event.
double GetStLo() const
Get the longitude of the station.
double GetDt() const
Return dt in s.
The basic exception class for all errors that arise in gplib.