|
| LoggingEnsemble () |
|
| LoggingEnsemble (const size_t n) |
|
| LoggingEnsemble (const mspass::utility::Metadata &md, const size_t n) |
|
| LoggingEnsemble (const mspass::utility::Metadata &md, const mspass::utility::ErrorLogger &elogin, const size_t ndata) |
|
| LoggingEnsemble (const LoggingEnsemble< T > &parent) |
|
| LoggingEnsemble (const Ensemble< T > &parent) |
|
void | kill () |
|
bool | live () const |
|
bool | dead () const |
|
bool | validate () |
|
bool | set_live () |
|
LoggingEnsemble< T > & | operator= (const LoggingEnsemble< T > &parent) |
|
size_t | memory_use () const |
|
| Ensemble () |
|
| Ensemble (const size_t n) |
| Reserve space but build empty ensemble. More...
|
|
| Ensemble (const mspass::utility::Metadata &md, const size_t n) |
|
| Ensemble (const Ensemble &parent) |
|
Ensemble & | operator= (const Ensemble &parent) |
|
T & | operator[] (const size_t n) const try |
|
| catch (...) |
|
| catch (...) |
|
void | update_metadata (const mspass::utility::Metadata &newmd) try |
| updates ensemble header (Metadata). More...
|
|
void | sync_metadata () |
| copy ensemble metadata to all members. More...
|
|
void | sync_metadata (std::vector< std::string > exclude) |
| copy ensemble metadata to all members except for the ones excluded.
|
|
| Metadata () |
|
| Metadata (std::ifstream &ifs, const std::string form=std::string("pf")) |
|
| Metadata (const Metadata &mdold) |
|
virtual | ~Metadata () |
|
Metadata & | operator= (const Metadata &mdold) |
|
Metadata & | operator+= (const Metadata &rhs) noexcept |
|
const Metadata | operator+ (const Metadata &other) const |
|
double | get_double (const std::string key) const override |
|
int | get_int (const std::string key) const override |
|
long | get_long (const std::string key) const |
|
std::string | get_string (const std::string key) const override |
|
bool | get_bool (const std::string key) const override |
|
template<typename T > |
T | get (const std::string key) const |
|
template<typename T > |
T | get (const char *key) const |
| Generic get interface for C char array. More...
|
|
boost::any | get_any (const std::string key) const |
|
std::string | type (const std::string key) const |
|
template<typename T > |
void | put (const std::string key, T val) noexcept |
|
template<typename T > |
void | put (const char *key, T val) noexcept |
|
void | put (const std::string key, const double val) override |
|
void | put (const std::string key, const int val) override |
|
void | put (const std::string key, const bool val) override |
|
void | put (const std::string key, const std::string val) override |
|
void | put (const char *key, const char *val) |
|
void | put (std::string key, const char *val) |
|
void | put_object (const std::string key, const pybind11::object val) |
|
void | put_int (const std::string key, const int val) |
|
void | put_string (const std::string key, const std::string val) |
|
void | put_bool (const std::string key, const bool val) |
|
void | put_double (const std::string key, const double val) |
|
void | put_long (const std::string key, const long val) |
|
void | append_chain (const std::string key, const std::string val, const std::string separator=std::string(":")) |
|
std::set< std::string > | modified () const |
|
void | clear_modified () |
| Mark all data as unmodified. More...
|
|
std::set< std::string > | keys () const noexcept |
|
bool | is_defined (const std::string key) const noexcept |
|
void | erase (const std::string key) |
|
std::size_t | size () const noexcept |
|
std::map< std::string, boost::any >::const_iterator | begin () const noexcept |
|
std::map< std::string, boost::any >::const_iterator | end () const noexcept |
|
void | change_key (const std::string oldkey, const std::string newkey) |
| Change the keyword to access an attribute. More...
|
|
template<typename T>
class mspass::seismic::LoggingEnsemble< T >
Template class that extends Ensemble to include an error log and live tests.
This class extends the Ensemble class defined in MsPASS for bundling collections of data that can be pushed to an std::vector container. The class is actually very generic, but mspass defines it for TimeSeries and Seismogram objects. This class is a necessary extension for an algorithm that take ensembles in and emits a different ensemble. In that situation we need a way to indicate the entire ensemble is invalid and not be to used and post error messages that give an explanation of why the output is invalid. This class provides that mechanism by adding a mspass::utility::ErrorLogger and a (private) boolean defining if the ensemble has valid data. That makes the API to a LoggingEnsemble a hybrid with the atomic Seismogram and TimeSeries objects (adds the dna of ErrorLogger and live/dead concept).
A secondary fundamental reason this class can be needed is to parallelize algorithms that emit an ensemble (regardless of inputs). The live/dead tests and error logger make the handlers consistent with the atomic objects of mspass.