neic-glass3  1.4.6
Trigger.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 TRIGGER_H
8 #define TRIGGER_H
9 
10 #include <geo.h>
11 #include <vector>
12 #include <memory>
13 #include <string>
14 #include <utility>
15 #include <mutex>
16 #include <tuple>
17 #include <atomic>
18 #include "Link.h"
19 
20 namespace glasscore {
21 
22 // forward declarations
23 class CPick;
24 class CWeb;
25 
36 class CTrigger {
37  public:
41  CTrigger();
42 
67  CTrigger(double lat, double lon, double z, double ot, double resolution,
68  double maxZ, double sum, int count, bool aSeismic,
69  std::vector<std::shared_ptr<CPick>> picks, CWeb *web);
70 
74  ~CTrigger();
75 
100  bool initialize(double lat, double lon, double z, double ot,
101  double resolution, double maxZ, double sum, int count,
102  bool aSeismic,
103  std::vector<std::shared_ptr<CPick>> picks, CWeb *web);
104 
108  void clear();
109 
114  double getLatitude() const;
115 
120  double getLongitude() const;
121 
126  double getDepth() const;
127 
133  glass3::util::Geo getGeo() const;
134 
139  double getTOrigin() const;
140 
146  double getWebResolution() const;
147 
152  double getNodeMaxDepth() const;
153 
159  bool getNodeAseismic() const;
160 
165  double getBayesValue() const;
166 
172  int getPickCount() const;
173 
179  const CWeb* getWeb() const;
180 
186  const std::vector<std::shared_ptr<CPick>> getVPick() const;
187 
188  private:
192  std::atomic<double> m_dLatitude;
193 
197  std::atomic<double> m_dLongitude;
198 
202  std::atomic<double> m_dDepth;
203 
207  std::atomic<double> m_tOrigin;
208 
213  std::atomic<double> m_dWebResolution;
214 
218  std::atomic<double> m_dNodeMaxDepth;
219 
223  std::atomic<bool> m_dNodeAseismic;
224 
229  std::atomic<double> m_dBayesValue;
230 
235  std::atomic<int> m_iPickCount;
236 
241  std::vector<std::shared_ptr<CPick>> m_vPick;
242 
246  CWeb * m_pWeb;
247 
251  mutable std::recursive_mutex m_TriggerMutex;
252 };
253 } // namespace glasscore
254 #endif // TRIGGER_H
double getDepth() const
Get the depth for this trigger.
Definition: Trigger.cpp:91
~CTrigger()
CTrigger destructor.
Definition: Trigger.cpp:31
double getBayesValue() const
Gets the current bayes stack value for this trigger.
Definition: Trigger.cpp:119
double getNodeMaxDepth() const
Get the node max depth for this trigger.
Definition: Trigger.cpp:114
double getWebResolution() const
Gets the node resolution of the web that nucleated this trigger.
Definition: Trigger.cpp:109
double getLatitude() const
Get the latitude for this trigger.
Definition: Trigger.cpp:81
geographic coordinate conversion class
Definition: geo.h:25
int getPickCount() const
Gets the number of picks supporting this trigger.
Definition: Trigger.cpp:124
bool initialize(double lat, double lon, double z, double ot, double resolution, double maxZ, double sum, int count, bool aSeismic, std::vector< std::shared_ptr< CPick >> picks, CWeb *web)
CTrigger initialization function.
Definition: Trigger.cpp:53
const std::vector< std::shared_ptr< CPick > > getVPick() const
Get the list of picks supporting this trigger.
Definition: Trigger.cpp:134
bool getNodeAseismic() const
Gets a flag indicating that the node is in an aseismic area.
Definition: Trigger.cpp:140
double getLongitude() const
Get the longitude for this trigger.
Definition: Trigger.cpp:86
glass3::util::Geo getGeo() const
Get the combined trigger location (latitude, longitude, depth) as a CGeo object.
Definition: Trigger.cpp:101
CTrigger()
CTrigger constructor.
Definition: Trigger.cpp:15
The namespace containing the core algorithm.
Definition: Correlation.h:17
void clear()
CTrigger clear function.
Definition: Trigger.cpp:35
const CWeb * getWeb() const
Gets a pointer to the web that generated this trigger, used to get travel times.
Definition: Trigger.cpp:129
glasscore detection trigger class
Definition: Trigger.h:36
double getTOrigin() const
Get the origin time for this trigger.
Definition: Trigger.cpp:96
glasscore detection web class
Definition: Web.h:46