Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HEPnOS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
HEP
HEPnOS
Commits
c350d83f
Commit
c350d83f
authored
Apr 13, 2018
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
can create datasets inside datasets now
parent
c71d3a17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
include/hepnos/DataSet.hpp
include/hepnos/DataSet.hpp
+17
-0
src/DataSet.cpp
src/DataSet.cpp
+6
-1
No files found.
include/hepnos/DataSet.hpp
View file @
c350d83f
...
@@ -242,6 +242,23 @@ class DataSet {
...
@@ -242,6 +242,23 @@ class DataSet {
* entry in the HEPnOS service, true otherwise.
* entry in the HEPnOS service, true otherwise.
*/
*/
bool
operator
!=
(
const
DataSet
&
other
)
const
;
bool
operator
!=
(
const
DataSet
&
other
)
const
;
/**
* @brief Creates a dataset with a given name inside the
* DataSet. This name must not have the '/' and '#' characters.
* A DataSet object pointing to the created dataset is returned.
* If a dataset with this name already exists in the DataStore,
* it is not created, but a DataSet object pointing to the
* existing one is returned instead.
*
* @param name Name of DataSet.
*
* @return A DataSet instance pointing to the created dataset.
*/
DataSet
createDataSet
(
const
std
::
string
&
name
);
typedef
DataStore
::
const_iterator
const_dataset_iterator
;
typedef
DataStore
::
iterator
dataset_iterator
;
};
};
}
}
...
...
src/DataSet.cpp
View file @
c350d83f
...
@@ -108,6 +108,11 @@ std::string DataSet::fullname() const {
...
@@ -108,6 +108,11 @@ std::string DataSet::fullname() const {
return
ss
.
str
();
return
ss
.
str
();
}
}
DataSet
DataSet
::
createDataSet
(
const
std
::
string
&
name
)
{
if
(
name
.
find
(
'/'
)
!=
std
::
string
::
npos
)
{
throw
Exception
(
"Invalid character '/' in dataset name"
);
}
m_impl
->
m_datastore
->
store
(
m_impl
->
m_level
+
1
,
fullname
(),
name
,
std
::
vector
<
char
>
());
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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