|
neic-glass3
1.4.6
|
glasscore correlation class More...
#include <Correlation.h>

Public Member Functions | |
| CCorrelation () | |
| CCorrelation default constructor. More... | |
| CCorrelation (std::shared_ptr< CSite > correlationSite, double correlationTime, std::string correlationIdString, std::string phase, double orgTime, double orgLat, double orgLon, double orgZ, double corrVal) | |
| CCorrelation advanced constructor. More... | |
| CCorrelation (std::shared_ptr< json::Object > correlation, CSiteList *pSiteList) | |
| CCorrelation advanced constructor. More... | |
| ~CCorrelation () | |
| CCorrelation destructor. More... | |
| void | clear () |
| CCorrelation clear function. More... | |
| bool | initialize (std::shared_ptr< CSite > correlationSite, double correlationTime, std::string correlationIdString, std::string phase, double orgTime, double orgLat, double orgLon, double orgZ, double corrVal) |
| CCorrelation initialization function. More... | |
| void | addHypoReference (std::shared_ptr< CHypo > hyp, bool force=false) |
| Add a hypo reference to this correlation. More... | |
| void | removeHypoReference (std::shared_ptr< CHypo > hyp) |
| Remove hypo specific reference to this correlation. More... | |
| void | removeHypoReference (std::string pid) |
| Remove hypo specific reference to this correlation by id. More... | |
| void | clearHypoReference () |
| Remove hypo reference to this correlation. More... | |
| double | getCorrelation () const |
| Get the correlation value for this correlation. More... | |
| double | getLatitude () const |
| Get the correlation source latitude for this correlation. More... | |
| double | getLongitude () const |
| Get the correlation source longitude for this correlation. More... | |
| double | getDepth () const |
| Get the correlation source depth for this correlation. More... | |
| double | getTOrigin () const |
| Get the correlation source origin time for this correlation. More... | |
| const std::shared_ptr< json::Object > & | getJSONCorrelation () const |
| Get input JSON correlation message. More... | |
| const std::shared_ptr< CHypo > | getHypoReference () const |
| Get the current hypo reference to this correlation. More... | |
| const std::shared_ptr< CSite > | getSite () const |
| Get the site for this correlation. More... | |
| const std::string & | getPhaseName () const |
| Get the phase name for this correlation. More... | |
| const std::string & | getID () const |
| Get the ID of this correlation. More... | |
| double | getTCorrelation () const |
| Get the arrival time for this correlation. More... | |
| double | getTCreate () const |
| Get the creation (insertion) time of this correlation. More... | |
glasscore correlation class
The CCorrelation class is the class that encapsulates everything necessary to represent a waveform arrival correlation, including arrival time, phase id, and an unique identifier. The CCorrelation class is also a node in the detection graph database.
CCorrelation contains functions to support creation of a new event based on the correlation.
CCorrelation maintains a graph database link between it and the the site (station) the correlation was made at.
CCorrelation also maintains a weak_ptr to a CHypo object representing a graph database link between this correlation and a hypocenters. A single correlation may be included in multiple hypocenters, but a correlation will only include a single hypocenter
CCorrelation uses smart pointers (std::shared_ptr).
| glasscore::CCorrelation::CCorrelation | ( | ) |
CCorrelation default constructor.
The default constructor for the CCorrelation class. Initializes members to default values.
| glasscore::CCorrelation::CCorrelation | ( | std::shared_ptr< CSite > | correlationSite, |
| double | correlationTime, | ||
| std::string | correlationIdString, | ||
| std::string | phase, | ||
| double | orgTime, | ||
| double | orgLat, | ||
| double | orgLon, | ||
| double | orgZ, | ||
| double | corrVal | ||
| ) |
CCorrelation advanced constructor.
An advanced constructor for the CCorrelation class. This function initializes members to the provided values.
| correlationSite | - A shared pointer to a CSite object that the correlation wasmade at |
| correlationTime | - A double containing the correlation arrival time |
| correlationIdString | - A std::string containing the external correlation id. |
| phase | - A std::string containing the phase name |
| orgTime | - A double containing the Gregorian time in seconds to use |
| orgLat | - A double containing the geocentric latitude in degrees to use |
| orgLon | - A double containing the geocentric longitude in degrees to use |
| orgZ | - A double containing the geocentric depth in kilometers to use |
| corrVal | - A double containing the correlation value |
| glasscore::CCorrelation::CCorrelation | ( | std::shared_ptr< json::Object > | correlation, |
| CSiteList * | pSiteList | ||
| ) |
CCorrelation advanced constructor.
An advanced constructor for the CCorrelation class. This function initializing members to the values parsed from the provided json object, and using the provided pointer to a CSiteList class to lookup the correlation station.
| correlation | - A shared pointer to a json::Object to containing the data to construct the correlation from |
| pSiteList | - A pointer to the CSiteList class to use when looking up the correlation station |
| glasscore::CCorrelation::~CCorrelation | ( | ) |
CCorrelation destructor.
| void glasscore::CCorrelation::addHypoReference | ( | std::shared_ptr< CHypo > | hyp, |
| bool | force = false |
||
| ) |
Add a hypo reference to this correlation.
Adds a weak_ptr reference to the given hypo to this correlation, representing a graph database link between this correlation and a hypocenter. If the correlation is already linked to a hypocenter, the new link will be ignored unless force is set to true.
Note that this correlation may or may not also be included in other hypocenter correlation data lists, but this correlation will only link to a single hypocenter
| hyp | - A std::shared_ptr to an object containing the hypocenter to link. |
| force | - A boolean flag indicating whether to force the association, defaults to false. |
| void glasscore::CCorrelation::clear | ( | ) |
CCorrelation clear function.
| void glasscore::CCorrelation::clearHypoReference | ( | ) |
Remove hypo reference to this correlation.
Remove any existing weak_ptr reference to a hypo from this correlation, breaking the graph database link between this correlation and a hypocenter.
Note that this correlation may or may not still be included in other hypocenter correlation data lists.
| double glasscore::CCorrelation::getCorrelation | ( | ) | const |
Get the correlation value for this correlation.
| double glasscore::CCorrelation::getDepth | ( | ) | const |
Get the correlation source depth for this correlation.
| const std::shared_ptr< CHypo > glasscore::CCorrelation::getHypoReference | ( | ) | const |
Get the current hypo reference to this correlation.
Note that this correlation may or may not also be included in other hypocenter correlation data lists, but this correlation will only link to a single hypocenter
| const std::string & glasscore::CCorrelation::getID | ( | ) | const |
Get the ID of this correlation.
| const std::shared_ptr< json::Object > & glasscore::CCorrelation::getJSONCorrelation | ( | ) | const |
Get input JSON correlation message.
| double glasscore::CCorrelation::getLatitude | ( | ) | const |
Get the correlation source latitude for this correlation.
| double glasscore::CCorrelation::getLongitude | ( | ) | const |
Get the correlation source longitude for this correlation.
| const std::string & glasscore::CCorrelation::getPhaseName | ( | ) | const |
Get the phase name for this correlation.
| const std::shared_ptr< CSite > glasscore::CCorrelation::getSite | ( | ) | const |
Get the site for this correlation.
| double glasscore::CCorrelation::getTCorrelation | ( | ) | const |
Get the arrival time for this correlation.
| double glasscore::CCorrelation::getTCreate | ( | ) | const |
Get the creation (insertion) time of this correlation.
| double glasscore::CCorrelation::getTOrigin | ( | ) | const |
Get the correlation source origin time for this correlation.
| bool glasscore::CCorrelation::initialize | ( | std::shared_ptr< CSite > | correlationSite, |
| double | correlationTime, | ||
| std::string | correlationIdString, | ||
| std::string | phase, | ||
| double | orgTime, | ||
| double | orgLat, | ||
| double | orgLon, | ||
| double | orgZ, | ||
| double | corrVal | ||
| ) |
CCorrelation initialization function.
Initializes correlation class to provided values.
| correlationSite | - A shared pointer to a CSite object that the correlation wasmade at |
| correlationTime | - A double containing the correlation arrival time |
| correlationIdString | - A std::string containing the external correlation id. |
| phase | - A std::string containing the phase name |
| orgTime | - A double containing the Gregorian time in seconds to use |
| orgLat | - A double containing the geocentric latitude in degrees to use |
| orgLon | - A double containing the geocentric longitude in degrees to use |
| orgZ | - A double containing the geocentric depth in kilometers to use |
| corrVal | - A double containing the correlation value |
| void glasscore::CCorrelation::removeHypoReference | ( | std::shared_ptr< CHypo > | hyp | ) |
Remove hypo specific reference to this correlation.
Remove a weak_ptr reference to the given hypo from this correlation, breaking the graph database link between this correlation and the hypocenter.
Note that this correlation may or may not still be included in other hypocenter correlation data lists.
| hyp | - A std::shared_ptr to an object containing the hypocenter to unlink. |
| void glasscore::CCorrelation::removeHypoReference | ( | std::string | pid | ) |
Remove hypo specific reference to this correlation by id.
Remove a weak_ptr reference to the given hypo id from this correlation, breaking the graph database link between this correlation and the hypocenter.
Note that this correlation may or may not still be included in other hypocenter correlation data lists.
| pid | - A std::string identifying the the hypocenter to unlink. |
1.8.11