Skip to content

Commit

Permalink
cms-2016-pileup-dataset: force category to Pileup
Browse files Browse the repository at this point in the history
  • Loading branch information
Kati Lassila-Perini committed Mar 5, 2024
1 parent 323babf commit 7d5b912
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cms-2016-pileup-dataset/code/dataset_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,14 @@ def create_record(dataset_full_name, doi_info, recid_info, eos_dir, das_dir, mcm

rec['title_additional'] = additional_title

topic = guess_title_category(dataset_full_name)
category = topic.split('/')[0]
# For pileup dataset, force category to "Pileup"
#topic = guess_title_category(dataset_full_name)
#category = topic.split('/')[0]
subcategory = None
if len(topic.split('/')) == 2:
subcategory = topic.split('/')[1]
#if len(topic.split('/')) == 2:
# subcategory = topic.split('/')[1]
rec['categories'] = {}
rec['categories']['primary'] = category
rec['categories']['primary'] = 'Pileup'
if subcategory:
rec['categories']['secondary'] = [subcategory]
rec['categories']['source'] = 'CMS Collaboration'
Expand Down

0 comments on commit 7d5b912

Please sign in to comment.