|
neic-glass3
1.4.6
|
glass cross correlation message parser class More...
#include <ccparser.h>


Public Member Functions | |
| CCParser (const std::string &defaultAgencyID, const std::string &defaultAuthor) | |
| ccparser constructor More... | |
| ~CCParser () | |
| ccparser destructor More... | |
| std::shared_ptr< json::Object > | parse (const std::string &input) override |
| cross correlation parsing function More... | |
Public Member Functions inherited from glass3::parse::Parser | |
| Parser () | |
| Parser (const std::string &defaultAgencyID, const std::string &defaultAuthor) | |
| parser constructor More... | |
| virtual | ~Parser () |
| parser destructor More... | |
Public Member Functions inherited from glass3::util::BaseClass | |
| BaseClass () | |
| BaseClass constructor. More... | |
| virtual | ~BaseClass () |
| BaseClass destructor. More... | |
| virtual bool | setup (std::shared_ptr< const json::Object > config) |
| BaseClass configuration function. More... | |
| virtual void | clear () |
| BaseClass clear function. More... | |
| const std::shared_ptr< const json::Object > | getConfig () |
| bool | getSetup () |
| Retrieves the class member boolean flag indicating whether the class has been setup, set to true if setup was successful. More... | |
| const std::string & | getDefaultAgencyId () |
| Function to retrieve the name of the default agency id. More... | |
| void | setDefaultAgencyId (const std::string &id) |
| Function to set the name of the default agency id. More... | |
| const std::string & | getDefaultAuthor () |
| Function to retrieve the name of the default author. More... | |
| void | setDefaultAuthor (const std::string &author) |
| Function to set the name of the default author. More... | |
Additional Inherited Members | |
Protected Attributes inherited from glass3::util::BaseClass | |
| std::shared_ptr< const json::Object > | m_Config |
| A shared pointer to the json::Object that holds the configuration. More... | |
| std::atomic< bool > | m_bIsSetup |
| the boolean flag indicating whether the class has been setup, set to true if setup was successful. More... | |
| std::string | m_DefaultAgencyID |
| A std::string containing the default agency id to use in parsing if one is not provided. More... | |
| std::string | m_DefaultAuthor |
| A std::string containing the default author to use in parsing if one is not provided. More... | |
glass cross correlation message parser class
The CCParser class is a class encapsulating the logic for parsing a cross correlation message and validating the results.
The correlation message is space delimited and has the following format: 2015/03/23 07:36:32.880 36.769 -98.019 5.0 2.6136482 mblg GS OK032 HHZ 00 P 2015/03/23 07:36:36.100 0.6581729 0.65 // NOLINT
Where: index 0 is the origin date index 1 is the origin time index 2 is the latitude index 3 is the longitude index 4 is the depth index 5 is the magnitude index 6 is the magnitude type index 7 is the network code index 8 is the station code index 9 is the channel code index 10 is the location code index 11 is the phase type index 12 is the arrival date index 13 is the arrival time index 14 is the correlation value index 15 is the correlation threshold
Since the correlation format does not include any source information, the default author and default agency ID will be used to provide source attribution
This class depends on the external earthquake detection formats library to format message strings.
This class uses the external SuperEasyJSON library to return parsed messages
This class inherits from the glass3::parse::Parser class
| glass3::parse::CCParser::CCParser | ( | const std::string & | defaultAgencyID, |
| const std::string & | defaultAuthor | ||
| ) |
ccparser constructor
The constructor for the ccparser class. Initializes members to provided values.
| defaultAgencyID | - A std::string containing the agency id to use if one is not provided. |
| defaultAuthor | - A std::string containing the author to use if one is not provided. |
| glass3::parse::CCParser::~CCParser | ( | ) |
ccparser destructor
The destructor for the ccparser class.
|
overridevirtual |
cross correlation parsing function
An overridden function (from Parser) used to parse a given cross correlation string (from a file, broker, or other source) into a SuperEasyJSON object (the common data interchange object) which is returned as a shared_ptr for use in other neic-glass3 functions and classes (such as glasscore).
| input | - The cross correlation formatted std::string to parse |
Implements glass3::parse::Parser.
1.8.11