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

Public Member Functions | |
| CCorrelationList () | |
| CCorrelationList constructor. More... | |
| ~CCorrelationList () | |
| CCorrelationList destructor. More... | |
| void | clear () |
| CCorrelationList clear function. More... | |
| bool | receiveExternalMessage (std::shared_ptr< json::Object > com) |
| CCorrelationList communication receiving function. More... | |
| bool | addCorrelationFromJSON (std::shared_ptr< json::Object > com) |
| CCorrelationList add correlation function. More... | |
| bool | checkDuplicate (CCorrelation *newCorrelation, double tWindow, double xWindow) |
| Checks if the provided correlation is sduplicate. More... | |
| bool | scavenge (std::shared_ptr< CHypo > hyp, double tWindow=2.5) |
| Search for any associable correlations that match hypo. More... | |
| const CSiteList * | getSiteList () const |
| Get the CSiteList pointer used by this correlation list for site lookups. More... | |
| void | setSiteList (CSiteList *siteList) |
| Set the CSiteList pointer used by this correlation list for site lookups. More... | |
| int | getMaxAllowableCorrelationCount () const |
| Get the maximum allowed size of this correlation list. More... | |
| void | setMaxAllowableCorrelationCount (int correlationMax) |
| Set the maximum allowed size of this correlation list. More... | |
| int | getCountOfTotalCorrelationsProcessed () const |
| Get the total number of correlations processed by this list. More... | |
| int | length () const |
| Get the current number of correlations contained in this list. More... | |
| std::vector< std::weak_ptr< CCorrelation > > | getCorrelations (double t1, double t2) |
| Get a vector of correlations that fall within a time window. More... | |
glasscore correlation list class
The CCorrelationList class is the class that maintains a std::multiset of all the correlations being considered by glasscore.
CCorrelationList contains functions to support correlation parsing, scavenging, and the creation of a new event hypocenter based on the correlation.
CCorrelationList uses smart pointers (std::shared_ptr).
| glasscore::CCorrelationList::CCorrelationList | ( | ) |
CCorrelationList constructor.
| glasscore::CCorrelationList::~CCorrelationList | ( | ) |
CCorrelationList destructor.
| bool glasscore::CCorrelationList::addCorrelationFromJSON | ( | std::shared_ptr< json::Object > | com | ) |
CCorrelationList add correlation function.
The function used by CCorrelationList to add a correlation to multiset, if the new correlation causes the number of correlations in the multiset to exceed the configured maximum, remove the oldest correlation from the multiset.
This function will generate a json formatted request for site (station) information if the correlation is from an unknown site via the CSiteList getSite() function.
This function will first attempt to associate the correlation with an existing hypocenter via calling the CHypoList::associate() function. If association is unsuccessful, the correlation creates a new hypocenter
| com | - A pointer to a json::object containing the correlation. |
| bool glasscore::CCorrelationList::checkDuplicate | ( | CCorrelation * | newCorrelation, |
| double | tWindow, | ||
| double | xWindow | ||
| ) |
Checks if the provided correlation is sduplicate.
Compares the given correlation with the existing correlation list, in order to determine whether the given correlation is a duplicate of an existing correlation.
| newCorrelation | - A shared pointer to the correlation to check |
| tWindow | - A double containing the allowable matching time window in seconds |
| xWindow | - A double containing the allowable matching distance window in degrees returns true if correlation is a duplicate, false otherwise |
| void glasscore::CCorrelationList::clear | ( | ) |
CCorrelationList clear function.
| std::vector< std::weak_ptr< CCorrelation > > glasscore::CCorrelationList::getCorrelations | ( | double | t1, |
| double | t2 | ||
| ) |
Get a vector of correlations that fall within a time window.
Get a vector of correlations that fall within the provided time window from t1 to t2
| t1 | - A double value containing the beginning of the time window in Gregorian seconds |
| t2 | - A double value containing the end of the time window in Gregorian seconds |
| int glasscore::CCorrelationList::getCountOfTotalCorrelationsProcessed | ( | ) | const |
Get the total number of correlations processed by this list.
| int glasscore::CCorrelationList::getMaxAllowableCorrelationCount | ( | ) | const |
Get the maximum allowed size of this correlation list.
| const CSiteList * glasscore::CCorrelationList::getSiteList | ( | ) | const |
| int glasscore::CCorrelationList::length | ( | ) | const |
Get the current number of correlations contained in this list.
| bool glasscore::CCorrelationList::receiveExternalMessage | ( | std::shared_ptr< json::Object > | com | ) |
CCorrelationList communication receiving function.
The function used by CCorrelationList to receive communication (such as configuration or input data), from outside the glasscore library, or it's parent CGlass.
Supports processing Correlation messages
| com | - A pointer to a json::object containing the communication. |
| bool glasscore::CCorrelationList::scavenge | ( | std::shared_ptr< CHypo > | hyp, |
| double | tWindow = 2.5 |
||
| ) |
Search for any associable correlations that match hypo.
Search through all correlations within a provided number seconds from the origin time of the given hypocenter, adding any correlations that meet association criteria to the given hypocenter.
| hyp | - A shared_ptr to a CHypo object containing the hypocenter to attempt to associate to. |
| tWindow | - A double value containing the window to search picks from origin time in seconds, defaults to 2.5 |
| void glasscore::CCorrelationList::setMaxAllowableCorrelationCount | ( | int | correlationMax | ) |
Set the maximum allowed size of this correlation list.
| correlationMax | - an integer containing the maximum allowed size of this correlation list |
| void glasscore::CCorrelationList::setSiteList | ( | CSiteList * | siteList | ) |
1.8.11