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

Update fibonacci fit parameters on run change

parent d2e1a367
Branches
No related tags found
No related merge requests found
Pipeline #59105 passed
...@@ -7,6 +7,7 @@ end ...@@ -7,6 +7,7 @@ end
println("Initialising libraries, this may take a minute...") println("Initialising libraries, this may take a minute...")
using Sockets using Sockets
using Dates
using KM3io using KM3io
using KM3DB using KM3DB
using NeRCA using NeRCA
...@@ -17,7 +18,7 @@ const LIGIER_PORT = parse(Int, ARGS[2]) ...@@ -17,7 +18,7 @@ const LIGIER_PORT = parse(Int, ARGS[2])
function main() function main()
println("Starting live FibonacciFit") println("$(now()): Starting live FibonacciFit")
current_run = 0 current_run = 0
...@@ -37,17 +38,19 @@ function main() ...@@ -37,17 +38,19 @@ function main()
msfparams = MuonScanfitParameters(;tmaxlocal=18.0, roadwidth=200.0, nfits=12) msfparams = MuonScanfitParameters(;tmaxlocal=18.0, roadwidth=200.0, nfits=12)
msfit = MuonScanfit(msfparams, detector) msfit = MuonScanfit(msfparams, detector)
@show msfparams println("$(now()): $(msfparams)")
idx = 0 idx = 0
for event in CHClient{KM3io.DAQEvent}(LIGIER_HOST, LIGIER_PORT) for event in CHClient{KM3io.DAQEvent}(LIGIER_HOST, LIGIER_PORT)
idx += 1 idx += 1
if current_run != event.header.run if current_run != event.header.run
println("Run ID has changed from $(current_run) to $(event.header.run). Updating the detector description.") println("\n$(now()): Run ID has changed from $(current_run) to $(event.header.run). Updating the detector description.")
current_run = event.header.run current_run = event.header.run
detector = Detector(event.header.detector_id, current_run) detector = Detector(event.header.detector_id, current_run)
@show detector msfit = MuonScanfit(msfparams, detector)
println("\n$(now()): $(detector)")
println("\n$(now()): $(msfparams)")
end end
muons = msfit(event.snapshot_hits) muons = msfit(event.snapshot_hits)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment