Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions Configuration/PyReleaseValidation/scripts/das-up-to-nevents.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down Expand Up @@ -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() and "ppref" 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 + "/"
Expand Down