neic-glass3  1.4.6
ZoneStats.h
Go to the documentation of this file.
1 /*****************************************
2  * This file is documented for Doxygen.
3  * If you modify this file please update
4  * the comments so that Doxygen will still
5  * be able to work.
6  ****************************************/
7 #ifndef ZONESTATS_H
8 #define ZONESTATS_H
9 
10 #include <string>
11 #include <vector>
12 #include <iostream>
13 #include <fstream>
14 
15 namespace traveltime {
16 
23 typedef struct _ZoneStatsInfoStruct {
24  float fLat;
25  float fLon;
27  float fMaxDepth;
28  float fMinDepth;
29  float fAvgDepth;
30  float fMaxMag;
31  float fMinMag;
32  float fAvgMag;
34 
42  const ZoneStatsInfoStruct &rhs);
43 
50 class CZoneStats {
51  public:
57  CZoneStats();
58 
64  ~CZoneStats();
65 
74  virtual bool setup(const std::string * pConfigFileName);
75 
82  virtual void clear();
83 
94  const ZoneStatsInfoStruct * getZonestatsInfoForLatLon(double dLat,
95  double dLon);
96 
105  float getMaxDepthForLatLon(double dLat, double dLon);
106 
116  float getRelativeObservabilityOfSeismicEventsAtLocation(double dLat,
117  double dLon);
118 
122  static const char* szLatGridBinSize;
123 
127  static const char* szLonGridBinSize;
128 
132  static const char* szLatLonHeader;
133 
137  static const int nNumExpectedFields;
138 
142  static const int iParseStateGetSZRecords;
143 
147  static const int iParseStateGetLatGBS;
148 
152  static const int iParseStateGetLonGBS;
153 
158  static const int iParseStateGetRecordHeader;
159 
163  static const float depthInvalid;
164 
165  protected:
170  std::vector<ZoneStatsInfoStruct> m_vZSData;
171 
177 
182 
187 
192 
198 }; // End CZoneStats class
199 } // namespace traveltime
200 #endif // ZONESTATS_H
float fMaxDepth
Definition: ZoneStats.h:27
float fLon
Definition: ZoneStats.h:25
bool ZSCompareByLatLon(const ZoneStatsInfoStruct &lhs, const ZoneStatsInfoStruct &rhs)
ZoneStatsInfoStruct Latitude/Longitude comparison function.
Definition: ZoneStats.cpp:23
static const int iParseStateGetRecordHeader
An integer constant defining the state for getting the record header.
Definition: ZoneStats.h:158
static const float depthInvalid
A float constant containing the invalid depth value.
Definition: ZoneStats.h:163
std::vector< ZoneStatsInfoStruct > m_vZSData
a std::vector of ZoneStatsInfoStruct&#39;s containing the zone stats information
Definition: ZoneStats.h:170
ZoneStatsInfoStruct m_ZSDefault
a ZoneStatsInfoStruct containing the default zone stats information
Definition: ZoneStats.h:197
glassutil zonestats class
Definition: ZoneStats.h:50
float fLonBinSizeDeg
A float containing the longitude bin size in degrees.
Definition: ZoneStats.h:191
static const char * szLatGridBinSize
A const char array representing the Lat grid bin string size.
Definition: ZoneStats.h:122
static const char * szLonGridBinSize
A const char array representing the Lon grid bin string size.
Definition: ZoneStats.h:127
traveltime namespace phase travel time classes and functions
static const int nNumExpectedFields
An integer constant containing the number of fields for parsing.
Definition: ZoneStats.h:137
float fLatBinSizeDeg
A float containing the laititude bin size in degrees.
Definition: ZoneStats.h:186
float fAvgDepth
Definition: ZoneStats.h:29
float fMinDepth
Definition: ZoneStats.h:28
static const int iParseStateGetLonGBS
An integer constant defining the state for getting lon gbs.
Definition: ZoneStats.h:152
CZoneStats information structure.
Definition: ZoneStats.h:23
double m_dAvgObservabilityPerBin
A double containing the average observability per bin.
Definition: ZoneStats.h:181
static const int iParseStateGetLatGBS
An integer constant defining the state for getting lat gbs.
Definition: ZoneStats.h:147
static const int iParseStateGetSZRecords
An integer constant defining the state for getting sz records.
Definition: ZoneStats.h:142
int m_nTotalNumEvents
An integer containing the total number of events in the zone stats information.
Definition: ZoneStats.h:176
float fAvgMag
Definition: ZoneStats.h:32
float fMaxMag
Definition: ZoneStats.h:30
struct traveltime::_ZoneStatsInfoStruct ZoneStatsInfoStruct
CZoneStats information structure.
float fMinMag
Definition: ZoneStats.h:31
int nEventCount
Definition: ZoneStats.h:26
float fLat
Definition: ZoneStats.h:24
static const char * szLatLonHeader
A const char array representing the Lat/Lon header string size.
Definition: ZoneStats.h:132