From 75cd730e670a37b97ef1889a8dea60f7f036fde0 Mon Sep 17 00:00:00 2001 From: Adriano Di Florio Date: Thu, 2 Oct 2025 21:38:12 +0200 Subject: [PATCH] Reading certification json from cvmfs in das-up-to-nevents --- .../scripts/das-up-to-nevents.py | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Configuration/PyReleaseValidation/scripts/das-up-to-nevents.py b/Configuration/PyReleaseValidation/scripts/das-up-to-nevents.py index 8bf702db82a32..a6e7a64b63d44 100755 --- a/Configuration/PyReleaseValidation/scripts/das-up-to-nevents.py +++ b/Configuration/PyReleaseValidation/scripts/das-up-to-nevents.py @@ -16,7 +16,8 @@ ## Helpers base_cert_url = "https://cms-service-dqmdc.web.cern.ch/CAF/certification/" -base_cert_path = "/eos/user/c/cmsdqm/www/CAF/certification/" +base_cert_eos = "/eos/user/c/cmsdqm/www/CAF/certification/" +base_cert_cvmfs = "/cvmfs/cms-griddata.cern.ch/cat/metadata/DC/" def get_url_clean(url): @@ -142,18 +143,29 @@ def no_intersection(): elif "HI" in PD: cert_type = "Collisions" + str(year) + "HI" - cert_path = base_cert_path + cert_type + "/" - web_fallback = False + cert_path = base_cert_cvmfs + cert_type + "/" + web_fallback = True - ## if we have access to eos we get from there ... + ## if we have access to cvmfs we get from there ... if os.path.isdir(cert_path): + cert_path = cert_path + "/latest/" + web_fallback = False json_list = os.listdir(cert_path) if len(json_list) == 0: web_fallback == True json_list = [c for c in json_list if "golden" in c.lower() and "era" not in c.lower()] json_list = [c for c in json_list if c.lower().startswith("cert_c") and c.endswith("json")] - else: - web_fallback = True + + ## ... if not we try eos ... + if web_fallback and os.path.isdir(base_cert_eos + cert_type +"/"): + web_fallback = False + cert_path = base_cert_eos + cert_type +"/" + json_list = os.listdir(cert_path) + if len(json_list) == 0: + web_fallback == True + json_list = [c for c in json_list if "golden" in c.lower() and "era" not in c.lower() and "ppref" not in c.lower()] + json_list = [c for c in json_list if c.lower().startswith("cert_c") and c.endswith("json")] + ## ... if not we go to the website if web_fallback: cert_url = base_cert_url + cert_type + "/"