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