Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
km3io
Commits
c2809bd9
Commit
c2809bd9
authored
5 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Update example
parent
7abf4e26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/conf.py
+1
-1
1 addition, 1 deletion
doc/conf.py
examples/plot_example.py
+15
-21
15 additions, 21 deletions
examples/plot_example.py
requirements-dev.txt
+1
-0
1 addition, 0 deletions
requirements-dev.txt
with
17 additions
and
22 deletions
doc/conf.py
+
1
−
1
View file @
c2809bd9
...
...
@@ -73,5 +73,5 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path
=
[
'
_static
'
]
#
html_static_path = ['_static']
html_title
=
"
km3io {}
"
.
format
(
km3io
.
__version__
)
This diff is collapsed.
Click to expand it.
examples/plot_example.py
+
15
−
21
View file @
c2809bd9
"""
This is my example script
======================
===
Reading DAQ Data (Jpp)
======================
This example doesn
'
t do much, it just makes a simple output
The following example shows how to access hits in a ROOT file which is coming
from the detector and written by the `JDataWriter` application.
"""
import
km3io
#
%%
#
This is a section header
#
####################################################
#
Accessing the event tree
# ------------------------
# This is the first section!
# The `#%%` signifies to Sphinx-Gallery that this text should be rendered as
# rST and if using one of the above IDE/plugin's, also signifies the start of a
# 'code block'.
# Just pass a filename to the reader class and get access to the event tree
# with:
# This line won't be rendered as rST because there's a space after the last block.
myvariable
=
2
print
(
"
my variable is {}
"
.
format
(
myvariable
))
# This is the end of the 'code block' (if using an above IDE). All code within
# this block can be easily executed all at once.
events
=
km3io
.
JppReader
(
"
samples/jpp_v12.0.0.root
"
).
events
#%%
# This is another section header
# ------------------------------
#
# In the built documentation, it will be rendered as rST after the code above!
# This is also another code block.
# Note that only some meta information is read into memory.
print
(
'
my variable plus 2 is {}
'
.
format
(
myvariable
+
2
))
# Printing it will simply tell you how many events it has found. Again, nothing
# else is read yet:
print
(
events
)
This diff is collapsed.
Click to expand it.
requirements-dev.txt
+
1
−
0
View file @
c2809bd9
...
...
@@ -9,4 +9,5 @@ sphinx
sphinx-autoapi
sphinx-gallery
sphinx-rtd-theme
sphinxcontrib-versioning
yapf
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment