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

Add modules()

parent 37e655fd
No related branches found
No related tags found
No related merge requests found
......@@ -251,6 +251,10 @@ struct Detector
strings::Vector{Int}
comments::Vector{String}
end
"""
Return a vector of all modules of a given detector.
"""
modules(d::Detector) = collect(values(d.modules))
Base.show(io::IO, d::Detector) = print(io, "Detector $(d.id) (v$(d.version)) with $(length(d.strings)) strings and $(d.n_modules) modules.")
Base.length(d::Detector) = d.n_modules
Base.eltype(::Type{Detector}) = DetectorModule
......
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