Skip to content

[sdsarchive] Search *.3 directories (mseed3)#181

Draft
andres-h wants to merge 2 commits intoSeisComP:mainfrom
andres-h:mseed3sds
Draft

[sdsarchive] Search *.3 directories (mseed3)#181
andres-h wants to merge 2 commits intoSeisComP:mainfrom
andres-h:mseed3sds

Conversation

@andres-h
Copy link
Contributor

Not 100% sure if done correctly, but seems to work. Ideally mseed2 should take precedence if both formats are available.

@cla-bot cla-bot bot added the cla-signed The CLA has been signed by all contributors label Mar 16, 2026
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
SDSArchive::SDSArchive() {}
SDSArchive::SDSArchive() {
_format = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is more readable to do an inline initialization at the member declaration:

int _format{0};

This also avoid initializing this member twice in different constructors.

if ( name == "format" ) {
if ( !Core::fromString(_format, value) ||
_format < 2 || _format > 3 )
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging an error would be nice, wouldn't it?

bool SDSArchive::setSource(const string &src) {
if ( src.empty() ) {
string arcroots;
size_t pos = src.find('?');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we could use Util::Url to parse the given source. This will give you access to URL parameters and do the proper decoding of all components.

return resolveCha(pathStr, net, sta, loc, cha, requestStartTime, doy, year, first);
bool res = true;

if (_format == 0 || _format == 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add spaces within parentheses. Furthermore use curly brackets for conditional blocks even if they are just one-liners.

@gempa-jabe gempa-jabe marked this pull request as draft March 17, 2026 10:07
@gempa-jabe
Copy link
Contributor

The code is in general looking good. Is this decision to use 3 as quality flag in the path name of a new ms3 archive file documented somewhere? Is there a version of slarchive which populates an archive like that? And last but not least, there is no option for mixed ms2/ms3 files, right?

@andres-h
Copy link
Contributor Author

The code is in general looking good. Is this decision to use 3 as quality flag in the path name of a new ms3 archive file documented somewhere? Is there a version of slarchive which populates an archive like that?

There is a pull request at EarthScope/slarchive#6

Anyway, it's just a proposal.

I don't expect that slarchive4 fully replaces slarchive yet, but people who need mseed3 can use it together with seedlink4 and chain4_plugin from https://github.com/andres-h/seedlink4

I've heard that EarthScope is planning to start seedlink4 streaming in few months.

And last but not least, there is no option for mixed ms2/ms3 files, right?

That would probably break too many tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed by all contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants