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

Add ordering for detector modules

parent 507329b7
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@ end
Base.length(d::DetectorModule) = d.n_pmts
Base.eltype(::Type{DetectorModule}) = PMT
Base.iterate(d::DetectorModule, state=1) = state > d.n_pmts ? nothing : (d.pmts[state], state+1)
Base.isless(lhs::DetectorModule, rhs::DetectorModule) = lhs.location < rhs.location
"""
Base.getindex(d::DetectorModule, i) = d.pmts[i+1]
......
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