mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
111 lines
3.3 KiB
Julia
111 lines
3.3 KiB
Julia
### A Pluto.jl notebook ###
|
|
# v0.20.8
|
|
|
|
using Markdown
|
|
using InteractiveUtils
|
|
|
|
# ╔═╡ 1d057382-316a-11f0-1fbd-c9c7f879bbb1
|
|
begin
|
|
using Pkg
|
|
Pkg.activate(".")
|
|
using CSV
|
|
using DataFrames
|
|
using PlutoUI
|
|
using PSBoardDataBase
|
|
end
|
|
|
|
# ╔═╡ 3bf488c4-cd2a-4b2c-b2ee-a6f8d84368df
|
|
TableOfContents(depth = 3)
|
|
|
|
# ╔═╡ f8b25d6d-5756-42fa-ac9f-a238d815dad2
|
|
second_run_result = let
|
|
result_file = PSBoardDataBase.DownloadCSVs.download_second_run_csv()
|
|
df = CSV.read(result_file, DataFrame)
|
|
PSBoardDataBase.prepare_eighth_campaign_result(df)
|
|
df
|
|
end
|
|
|
|
# ╔═╡ 7d7c80a3-800f-48cf-908b-172730320571
|
|
md"""
|
|
# Count summary
|
|
"""
|
|
|
|
# ╔═╡ d597786d-3112-476e-a640-d494aed630bd
|
|
filter(:motherboard_id => ismissing, second_run_result)
|
|
|
|
# ╔═╡ da2d6bb7-d970-4eeb-9a1a-bbdda6506312
|
|
findall(ismissing, second_run_result.motherboard_id)
|
|
|
|
# ╔═╡ 9dae37ff-614a-4d50-9f32-908e799e325e
|
|
@view(second_run_result[1315, :])
|
|
|
|
# ╔═╡ c3954e6c-5239-445e-bdeb-6caad6b3b377
|
|
sdf_wrong_psbid = @view(second_run_result[1:1315, :])
|
|
|
|
# ╔═╡ 157a0ca3-a92a-4f6d-a3d3-c9650b4bf573
|
|
sdf_correct_psbid = @view(second_run_result[1315:end, :])
|
|
|
|
# ╔═╡ 346993ff-fdb0-4f0f-a83f-23584e2bc540
|
|
let
|
|
correct_psbs = Set(sdf_correct_psbid.motherboard_id |> skipmissing)
|
|
filter(Set(sdf_wrong_psbid.motherboard_id |> skipmissing)) do psbid
|
|
!(psbid in correct_psbs)
|
|
end
|
|
end
|
|
|
|
# ╔═╡ c7adb9ed-ef92-4727-a446-556d65cf6f3f
|
|
falied_boards = [895, 896, 1142, 1276, 1094, 1095]
|
|
|
|
# ╔═╡ b8b31ee3-ffc9-4d55-80ff-001dfebfc776
|
|
md"""
|
|
# slave log validation
|
|
"""
|
|
|
|
# ╔═╡ f464ed57-7d42-42e5-a388-c815bba0ad60
|
|
map(eachrow(second_run_result)) do row
|
|
row
|
|
end
|
|
|
|
# ╔═╡ 2bd267ea-78ab-454e-93e4-81a2f7a5d671
|
|
second_run_writing_result = filter(:motherboard_id => (id -> begin
|
|
coalesce(id != 999999, false)
|
|
end), second_run_result)
|
|
|
|
# ╔═╡ 383e1e04-ba3e-49bf-9f99-46c53b37204b
|
|
map(eachrow(second_run_writing_result)) do row
|
|
slavelog_dir = "../test/input/slavelogs/main/"
|
|
logfilename = "$(row.motherboard_id)_$(row.runid).txt"
|
|
logfilepath = joinpath(slavelog_dir, logfilename)
|
|
if !ispath(logfilepath)
|
|
return (psbid = row.motherboard_id, slavelog_psbid = missing, qspip = row.qspip)
|
|
end
|
|
if row.qspip != 1
|
|
return (psbid = row.motherboard_id, slavelog_psbid = missing, qspip = row.qspip)
|
|
end
|
|
psbid = PSBoardDataBase.SlaveLogParserV2.parse_slave_log_v2(logfilepath)
|
|
(psbid = row.motherboard_id, slavelog_psbid = psbid, qspip = row.qspip)
|
|
end |> DataFrame
|
|
|
|
# ╔═╡ 162ef015-7acd-4431-91bd-f3c5f1d26f8a
|
|
md"""
|
|
## result
|
|
**Looks OK**
|
|
"""
|
|
|
|
# ╔═╡ Cell order:
|
|
# ╠═1d057382-316a-11f0-1fbd-c9c7f879bbb1
|
|
# ╠═3bf488c4-cd2a-4b2c-b2ee-a6f8d84368df
|
|
# ╠═f8b25d6d-5756-42fa-ac9f-a238d815dad2
|
|
# ╠═7d7c80a3-800f-48cf-908b-172730320571
|
|
# ╠═d597786d-3112-476e-a640-d494aed630bd
|
|
# ╠═da2d6bb7-d970-4eeb-9a1a-bbdda6506312
|
|
# ╠═9dae37ff-614a-4d50-9f32-908e799e325e
|
|
# ╠═c3954e6c-5239-445e-bdeb-6caad6b3b377
|
|
# ╠═157a0ca3-a92a-4f6d-a3d3-c9650b4bf573
|
|
# ╠═346993ff-fdb0-4f0f-a83f-23584e2bc540
|
|
# ╠═c7adb9ed-ef92-4727-a446-556d65cf6f3f
|
|
# ╠═b8b31ee3-ffc9-4d55-80ff-001dfebfc776
|
|
# ╠═f464ed57-7d42-42e5-a388-c815bba0ad60
|
|
# ╠═2bd267ea-78ab-454e-93e4-81a2f7a5d671
|
|
# ╠═383e1e04-ba3e-49bf-9f99-46c53b37204b
|
|
# ╠═162ef015-7acd-4431-91bd-f3c5f1d26f8a
|