version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
mseed_index.h
1#ifndef _MSEED_INDEX_H_
2#define _MSEED_INDEX_H_
3#include "mspass/utility/ErrorLogger.h"
4#include <string>
5#include <vector>
6namespace mspass::io {
7
9public:
10 std::string net;
11 std::string sta;
12 std::string loc;
13 std::string chan;
14 size_t foff;
15 size_t nbytes;
16 size_t npts;
17 double samprate;
18 double starttime;
19 double endtime;
20 double last_packet_time;
21 /* These aren't really essential because the compiler should automatically
22 generate them, but better to be explicit since the std::vector demands them*/
23 mseed_index() {
24 net = "";
25 sta = "";
26 loc = "";
27 chan = "";
28 foff = 0;
29 nbytes = 0;
30 npts = 0;
31 samprate = 0.0;
32 starttime = 0.0;
33 endtime = 0.0;
34 last_packet_time = 0.0;
35 };
36 mseed_index(const mseed_index &parent)
37 : net(parent.net), sta(parent.sta), loc(parent.loc), chan(parent.chan) {
38 foff = parent.foff;
39 nbytes = parent.nbytes;
40 npts = parent.npts;
41 samprate = parent.samprate;
42 starttime = parent.starttime;
43 endtime = parent.endtime;
44 last_packet_time = parent.last_packet_time;
45 };
46 mseed_index &operator=(const mseed_index &parent) {
47 if (&parent != this) {
48 net = parent.net;
49 sta = parent.sta;
50 loc = parent.loc;
51 chan = parent.chan;
52 foff = parent.foff;
53 npts = parent.npts;
54 nbytes = parent.nbytes;
55 samprate = parent.samprate;
56 starttime = parent.starttime;
57 endtime = parent.endtime;
58 last_packet_time = parent.last_packet_time;
59 }
60 return *this;
61 };
62 friend std::ostringstream &operator<<(std::ostringstream &ss,
63 const mseed_index &ind);
64};
101std::pair<std::vector<mseed_index>, mspass::utility::ErrorLogger>
102mseed_file_indexer(const std::string inputfile, const bool segment_timetears,
103 const bool Verbose);
104
105} // namespace mspass::io
106#endif
Definition mseed_index.h:8
Container to hold error logs for a data object.
Definition ErrorLogger.h:60