Skip to content
Snippets Groups Projects
Verified Commit c66852dc authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Extend the Detector constructor

parent 71498715
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment