Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
HEP
HEPnOS
Commits
4efe19bc
Commit
4efe19bc
authored
Feb 27, 2020
by
Matthieu Dorier
Browse files
Fixing bug with listing DataSets.
parent
c6fb1562
Changes
5
Hide whitespace changes
Inline
Side-by-side
bin/hepnos-ls.cpp
View file @
4efe19bc
...
...
@@ -24,8 +24,8 @@ void navigate_dataset(int level, hepnos::DataSet& ds) {
for
(
auto
&
sub_ds
:
ds
)
{
navigate_dataset
(
level
+
1
,
sub_ds
);
}
for
(
auto
&
r
:
ds
.
runs
()
)
{
navigate_run
(
level
+
1
,
r
);
for
(
auto
it
=
ds
.
runs
().
begin
();
it
!=
ds
.
runs
().
end
();
it
++
)
{
navigate_run
(
level
+
1
,
*
it
);
}
}
...
...
include/hepnos/UUID.hpp
View file @
4efe19bc
...
...
@@ -52,7 +52,7 @@ struct UUID {
template
<
typename
T
>
T
&
operator
<<
(
T
&
stream
,
const
UUID
&
id
)
{
stream
<<
(
std
::
string
)
id
;
stream
<<
id
.
to_
string
(
);
return
stream
;
}
...
...
src/DataStoreImpl.hpp
View file @
4efe19bc
...
...
@@ -391,6 +391,7 @@ class DataStoreImpl {
throw
Exception
(
"Error occured when calling sdskv::database::list_keys (SDSKV error="
+
std
::
string
(
ex
.
what
())
+
")"
);
}
result
.
resize
(
0
);
unsigned
j
=
0
;
for
(
const
auto
&
entry
:
entries
)
{
size_t
i
=
entry
.
find_last_of
(
'/'
);
if
(
i
==
std
::
string
::
npos
)
i
=
1
;
...
...
@@ -401,9 +402,10 @@ class DataStoreImpl {
level
,
current
->
m_container
,
entry
.
substr
(
i
),
uuids
[
i
]
uuids
[
j
]
)
);
j
+=
1
;
}
return
result
.
size
();
}
...
...
src/Run.cpp
View file @
4efe19bc
...
...
@@ -181,7 +181,7 @@ Run::const_iterator Run::find(const SubRunNumber& subRunNumber) const {
Run
::
iterator
Run
::
begin
()
{
auto
it
=
find
(
0
);
if
(
it
!=
end
())
return
*
it
;
if
(
it
!=
end
())
return
it
;
auto
&
id
=
m_impl
->
m_descriptor
;
auto
new_subrun_impl
=
std
::
make_shared
<
ItemImpl
>
(
m_impl
->
m_datastore
,
id
.
dataset
,
id
.
run
,
0
);
...
...
src/RunSet.cpp
View file @
4efe19bc
...
...
@@ -56,7 +56,7 @@ RunSet::const_iterator RunSet::find(const RunNumber& runNumber) const {
RunSet
::
iterator
RunSet
::
begin
()
{
auto
it
=
find
(
0
);
if
(
it
!=
end
())
return
*
it
;
if
(
it
!=
end
())
return
it
;
auto
ds_level
=
m_impl
->
m_level
;
auto
datastore
=
m_impl
->
m_datastore
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment