Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3io.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
common
KM3io.jl
Commits
442cf161
Verified
Commit
442cf161
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Add RBRIterator
parent
eb03033d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!25
MC event matcher
,
!24
RBR iterator
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/KM3io.jl
+3
-0
3 additions, 0 deletions
src/KM3io.jl
src/tools/helpers.jl
+14
-0
14 additions, 0 deletions
src/tools/helpers.jl
with
17 additions
and
0 deletions
src/KM3io.jl
+
3
−
0
View file @
442cf161
...
...
@@ -56,6 +56,8 @@ export most_frequent, categorize, nthbitset
export
cherenkov
,
CherenkovPhoton
,
azimuth
,
zenith
,
theta
,
phi
export
RBRIterator
export
CHClient
,
CHTag
,
subscribe
,
@ip_str
@template
(
FUNCTIONS
,
METHODS
,
MACROS
)
=
...
...
@@ -100,6 +102,7 @@ include("tools/general.jl")
include
(
"tools/daq.jl"
)
include
(
"tools/trigger.jl"
)
include
(
"tools/reconstruction.jl"
)
include
(
"tools/helpers.jl"
)
include
(
"physics.jl"
)
...
...
This diff is collapsed.
Click to expand it.
src/tools/helpers.jl
0 → 100644
+
14
−
0
View file @
442cf161
"""
A basic container type to assist run-by-run iteration.
"""
struct
RBRIterator
f
::
ROOTFile
end
Base
.
length
(
itr
::
RBRIterator
)
=
length
(
itr
.
f
.
online
.
events
)
function
Base.iterate
(
itr
::
RBRIterator
,
state
=
1
)
state
>
length
(
itr
)
&&
return
nothing
event
=
f
.
online
.
events
[
state
]
mc_idx
=
event
.
header
.
trigger_counter
+
1
mc_event
=
itr
.
f
.
offline
[
mc_idx
]
((
event
,
mc_event
),
state
+
1
)
end
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