Check if the right CDI file is use for a given MC Campaign
Definition at line 14 of file CDIHelpers.py.
15 """ Check if the right CDI file is use for a given MC Campaign """
17 if MCCampaign ==
"MCUnknown":
18 raise ValueError(
"The MC Campaign is not recognized. Currently we only have CDI file for MC20, MC21 and MC23.")
20 run3_campaigns = [
"MC21",
"MC23"]
21 if MCCampaign ==
"MC20":
22 if MCCampaign
not in CDIFile
and "noSF" not in CDIFile:
23 raise ValueError(
"Mismatch of MC Campaign and CDI file. CDI file %s being used for %s campaign" % (CDIFile, MCCampaign))
24 elif not any (campaign
in CDIFile
for campaign
in run3_campaigns)
and "noSF" not in CDIFile:
25 raise ValueError(
"Mismatch of MC Campaign and CDI file. CDI file %s being used for %s campaign" % (CDIFile, MCCampaign))