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
c66852dc
Verified
Commit
c66852dc
authored
5 months ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Extend the Detector constructor
parent
71498715
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Project.toml
+1
-1
1 addition, 1 deletion
Project.toml
ext/KM3ioKM3DBExt.jl
+13
-0
13 additions, 0 deletions
ext/KM3ioKM3DBExt.jl
with
14 additions
and
1 deletion
Project.toml
+
1
−
1
View file @
c66852dc
...
...
@@ -26,7 +26,7 @@ KM3ioKM3DBExt = "KM3DB"
[compat]
DocStringExtensions
=
"0.8, 0.9"
HDF5
=
"^0.16.15, ^0.17"
KM3DB
=
"0.2.
2
"
KM3DB
=
"0.2.
3
"
KM3NeTTestData
=
"^0.4.16"
StaticArrays
=
"1"
UnROOT
=
"^0.10.26"
...
...
This diff is collapsed.
Click to expand it.
ext/KM3ioKM3DBExt.jl
+
13
−
0
View file @
c66852dc
...
...
@@ -8,6 +8,8 @@ else
end
"""
Detector(det_id::Integer; kwargs...)
Instantiate a detector by polling the database for a given detector ID.
The keyword arguments `kwargs` are passed to the `detx()` function in `KM3DB.jl`.
"""
...
...
@@ -16,4 +18,15 @@ function Detector(det_id::Integer; kwargs...)
read_detx
(
IOBuffer
(
raw
))
end
"""
Detector(det_id::Integer, run_id::Integer; version=5)
Instantiate a detector which was used for a given detector to take the
specified run by polling the database.
"""
function
Detector
(
det_id
::
Integer
,
run_id
::
Integer
;
version
=
5
)
raw
=
detx
(
det_id
,
run_id
;
version
=
version
)
read_detx
(
IOBuffer
(
raw
))
end
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