MsPASS C++ API  2.4.1.dev4+g92330b7a
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
10public:
11 std::string net;
12 std::string sta;
13 std::string loc;
14 std::string chan;
15 size_t foff;
16 size_t nbytes;
17 size_t npts;
18 double samprate;
19 double starttime;
20 double endtime;
22 /* These aren't really essential because the compiler should automatically
23 generate them, but better to be explicit since the std::vector demands them*/
26 net = "";
27 sta = "";
28 loc = "";
29 chan = "";
30 foff = 0;
31 nbytes = 0;
32 npts = 0;
33 samprate = 0.0;
34 starttime = 0.0;
35 endtime = 0.0;
36 last_packet_time = 0.0;
37 };
39 mseed_index(const mseed_index &parent)
40 : net(parent.net), sta(parent.sta), loc(parent.loc), chan(parent.chan) {
41 foff = parent.foff;
42 nbytes = parent.nbytes;
43 npts = parent.npts;
44 samprate = parent.samprate;
45 starttime = parent.starttime;
46 endtime = parent.endtime;
48 };
51 if (&parent != this) {
52 net = parent.net;
53 sta = parent.sta;
54 loc = parent.loc;
55 chan = parent.chan;
56 foff = parent.foff;
57 npts = parent.npts;
58 nbytes = parent.nbytes;
59 samprate = parent.samprate;
60 starttime = parent.starttime;
61 endtime = parent.endtime;
63 }
64 return *this;
65 };
67 friend std::ostringstream &operator<<(std::ostringstream &ss,
68 const mseed_index &ind);
69};
106std::pair<std::vector<mseed_index>, mspass::utility::ErrorLogger>
107mseed_file_indexer(const std::string inputfile, const bool segment_timetears,
108 const bool Verbose);
109
110} // namespace mspass::io
111#endif
Index entry describing one contiguous MiniSEED data segment.
Definition mseed_index.h:9
size_t nbytes
Definition mseed_index.h:16
std::string chan
Definition mseed_index.h:14
double endtime
Definition mseed_index.h:20
size_t npts
Definition mseed_index.h:17
friend std::ostringstream & operator<<(std::ostringstream &ss, const mseed_index &ind)
Definition mseed_index.cc:6
double samprate
Definition mseed_index.h:18
mseed_index & operator=(const mseed_index &parent)
Definition mseed_index.h:50
std::string sta
Definition mseed_index.h:12
mseed_index(const mseed_index &parent)
Definition mseed_index.h:39
double last_packet_time
Definition mseed_index.h:21
size_t foff
Definition mseed_index.h:15
double starttime
Definition mseed_index.h:19
mseed_index()
Definition mseed_index.h:25
std::string loc
Definition mseed_index.h:13
std::string net
Definition mseed_index.h:11
Container to hold error logs for a data object.
Definition ErrorLogger.h:63