|
1 | 1 | #!/usr/bin/env python
|
2 | 2 |
|
3 | 3 | #Script to create and/or submit multiple campaign using Project-py
|
4 |
| -#Create ini files: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_mixing.in --comb_json data/mix.json --simjob MDC2020ae |
5 |
| -#Create ini files: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_primary.ini --comb_json data/primary.json --simjob MDC2020ae --comb_type list --cutoff_key primary_name |
6 |
| -#Create, upload and submit all campaign: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_mixing.ini --cfg_file CampaignConfig/mdc2020_digireco.cfg --comb_json data/mix.json --simjob MDC2020ae --upload --submit |
| 4 | +#Create ini files: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_mixing.in --comb_json data/mix.json |
| 5 | +#Create ini files: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_primary.ini --comb_json data/primary.json --comb_type list --cutoff_key primary_name |
| 6 | +#Create, upload and submit all campaign: ./ProjPy/gen_Campaigns.py --ini_file ProjPy/mdc2020_mixing.ini --cfg_file CampaignConfig/mdc2020_digireco.cfg --comb_json data/mix.json --upload --submit |
7 | 7 |
|
8 | 8 | #To upload setup poms-client first, delete voms-proxy (NOT as mu2epro!!!), get kx509:
|
9 | 9 | #source /cvmfs/fermilab.opensciencegrid.org/packages/common/setup-env.sh
|
|
23 | 23 | requiredNamed.add_argument("--comb_type", type=str, help="JSON file type: list or product", required=True)
|
24 | 24 |
|
25 | 25 | parser.add_argument("--cutoff_key", type=str, help="Ignore keys in the campaign name after the cutoff_key", default=None)
|
26 |
| -parser.add_argument("--simjob", type=str, help="SimJob version, i.e. MDC2020", default="MDC2020") |
27 | 26 | parser.add_argument("--upload", action="store_true", help="Create campaigns")
|
28 | 27 | parser.add_argument("--submit", action="store_true", help="Submit campaigns")
|
29 | 28 | parser.add_argument("--test_run", action="store_true", help="Run in test run mode")
|
30 | 29 | parser.add_argument("--ini_version", default="", type=str, help="Append version to the end of campaign name, i.e. _v1")
|
31 | 30 |
|
32 | 31 | args = parser.parse_args()
|
33 | 32 | ini_file = args.ini_file
|
34 |
| -simjob = args.simjob |
35 | 33 | comb_json = args.comb_json
|
36 | 34 | comb_type = args.comb_type
|
37 | 35 | cutoff_key = args.cutoff_key
|
|
69 | 67 | # We use only keys that appear prior to cutoff_key (i.e "primary_name"), and ignore the rest in the campaign/file name
|
70 | 68 | if cutoff_key is not None:
|
71 | 69 | cutoff_key_index = list_keys.index(cutoff_key) + 1
|
72 |
| - campaign_name = f"{simjob}_{'_'.join(map(str, campain_name_list[:cutoff_key_index]))}{ini_version}" |
| 70 | + campaign_name = f"{'_'.join(map(str, campain_name_list[:cutoff_key_index]))}{ini_version}" |
73 | 71 | else:
|
74 |
| - campaign_name = f"{simjob}_{'_'.join(map(str, campain_name_list))}{ini_version}" |
| 72 | + campaign_name = f"{'_'.join(map(str, campain_name_list))}{ini_version}" |
75 | 73 |
|
76 | 74 | out_ini_file = f"{campaign_name}.ini"
|
77 | 75 | os.system(f"cp {ini_file} {out_ini_file}")
|
|
0 commit comments