Skip to content

Commit

Permalink
Remove Suppressor dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Nov 9, 2024
1 parent 29b9237 commit 23cd3eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
StaticStrings = "4db0a0c5-418a-4e1d-8806-cb305fe13294"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
Expand Down Expand Up @@ -68,7 +67,6 @@ SolidStateDetectors = "0.10.2"
StaticStrings = "0.2"
Statistics = "<0.0.1, 1"
StructArrays = "0.5, 0.6"
Suppressor = "0.2"
Tables = "1.1"
TypedTables = "1.4"
UUIDs = "<0.0.1, 1"
Expand Down
1 change: 0 additions & 1 deletion src/LegendDataManagement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ using LRUCache: LRU
using ProgressMeter: @showprogress
using PropertyFunctions: PropertyFunction, @pf, filterby, props2varsyms, PropSelFunction
using StaticStrings: StaticString
using Suppressor: @suppress
import Tables
using Tables: columns
using TypedTables
Expand Down
4 changes: 2 additions & 2 deletions src/exposure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ function _get_exposure(data::LegendData, det::DetectorIdLike, rinfo::Table, is_a
mass = if !iszero(livetime) && !isempty(filekeys)
# read in the channelinfo
filekey = first(filekeys)
_chinfo = @suppress channelinfo(data, filekey, det, extended = true)
_chinfo = channelinfo(data, filekey, det, extended = true, verbose = false)
chinfo = if !all(x -> hasproperty(_chinfo, x), (:enrichment, :mass, :active_volume, :total_volume))
empty!(_cached_channelinfo)
@suppress channelinfo(data, filekey, det, extended = true)
channelinfo(data, filekey, det, extended = true, verbose = false)
else
_chinfo
end
Expand Down
4 changes: 2 additions & 2 deletions src/legend_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ const _cached_channelinfo = LRU{Tuple{UInt, AnyValiditySelection}, StructVector}
Get all channel information for the given [`LegendData`](@ref) and
[`ValiditySelection`](@ref).
"""
function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol = :all, only_processable::Bool = false, extended::Bool = false)
function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol = :all, only_processable::Bool = false, extended::Bool = false, verbose::Bool = true)
key = (objectid(data), sel)
chinfo = get!(_cached_channelinfo, key) do
chmap = data.metadata(sel).hardware.configuration.channelmaps
Expand Down Expand Up @@ -320,7 +320,7 @@ function channelinfo(data::LegendData, sel::AnyValiditySelection; system::Symbol
isa(fccds, PropDicts.MissingProperty) ||
isa(fccds[first(keys(fccds))].value, PropDicts.MissingProperty)

haskey(diodmap, k) && @warn "No FCCD value given for detector $(detector)"
verbose && haskey(diodmap, k) && @warn "No FCCD value given for detector $(detector)"
0.0
else
fccds[first(keys(fccds))].value
Expand Down

0 comments on commit 23cd3eb

Please sign in to comment.