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
b504b7d1
Commit
b504b7d1
authored
Mar 17, 2020
by
Matthieu Dorier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected examples
parent
e325416c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
examples/07_events_from_dataset/main.cpp
examples/07_events_from_dataset/main.cpp
+5
-1
examples/13_async/main.cpp
examples/13_async/main.cpp
+1
-1
No files found.
examples/07_events_from_dataset/main.cpp
View file @
b504b7d1
...
...
@@ -19,6 +19,7 @@ int main(int argc, char** argv) {
// Create a DataSet
DataSet
example7
=
root
.
createDataSet
(
"example7"
);
// Create 5 Runs with 5 SubRuns with 5 Events
std
::
cout
<<
"Creating Runs, SubRuns, and Events"
<<
std
::
endl
;
for
(
unsigned
i
=
0
;
i
<
5
;
i
++
)
{
auto
run
=
example7
.
createRun
(
i
);
for
(
unsigned
j
=
0
;
j
<
5
;
j
++
)
{
...
...
@@ -29,6 +30,7 @@ int main(int argc, char** argv) {
}
}
// Iterate over the events directly from the example7 DataSet
std
::
cout
<<
"Iterating over all Events"
<<
std
::
endl
;
for
(
auto
&
event
:
example7
.
events
())
{
SubRun
subrun
=
event
.
subrun
();
Run
run
=
subrun
.
run
();
...
...
@@ -38,9 +40,11 @@ int main(int argc, char** argv) {
<<
std
::
endl
;
}
// Iterate target by target
std
::
cout
<<
"Iterating over all Events target by target"
<<
std
::
endl
;
unsigned
numTargets
=
datastore
.
numTargets
(
ItemType
::
EVENT
);
for
(
unsigned
target
=
0
;
target
<
numTargets
;
target
++
)
{
for
(
auto
&
event
:
example7
.
events
())
{
std
::
cout
<<
"Target "
<<
target
<<
std
::
endl
;
for
(
auto
&
event
:
example7
.
events
(
target
))
{
SubRun
subrun
=
event
.
subrun
();
Run
run
=
subrun
.
run
();
std
::
cout
<<
"Run "
<<
run
.
number
()
...
...
examples/13_async/main.cpp
View file @
b504b7d1
...
...
@@ -34,7 +34,7 @@ int main(int argc, char** argv) {
std
::
string
configFile
(
argv
[
1
]);
DataStore
datastore
=
DataStore
::
connect
(
configFile
);
DataStore
datastore
=
DataStore
::
connect
(
configFile
,
true
);
// Get the root of the DataStore
DataSet
root
=
datastore
.
root
();
// Create a DataSet
...
...
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