From d77cee5b57436b0d0a8aa94604238d0809cf9222 Mon Sep 17 00:00:00 2001 From: GioDho Date: Thu, 21 Mar 2024 15:39:45 +0100 Subject: [PATCH] Hotfix for GetNevents function for online run --- reconstruction.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reconstruction.py b/reconstruction.py index f0d6b40..54ee427 100644 --- a/reconstruction.py +++ b/reconstruction.py @@ -208,8 +208,11 @@ def getNEvents(self,options): run,tmpdir,tag = self.tmpname mf = sw.swift_download_midas_file(run,tmpdir,tag) #you download the file here so that in multithread does not confuse if it downloaded or not - runlog='runlog_%s_auto.csv' % (options.tag) - df = pd.read_csv('pedestals/%s'%runlog) + if options.offline==False: + df = cy.read_cygno_logbook(tag=options.tag,start_run=run-2000,end_run=run+1) + else: + runlog='runlog_%s_auto.csv' % (options.tag) + df = pd.read_csv('pedestals/%s'%runlog) if df.run_number.isin({int(options.run)}).any(): dffilter = df["run_number"] == int(options.run) try: