Commit 0250d8a8 authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska
Browse files

21.6 n epj

parent 61dc9596
......@@ -317,6 +317,7 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO
evgenLog.error("gennames '%s' " %(expectedgenpart))
sys.exit(1)
del _norm
## Check if the tune/PDF part is needed, and if so whether it's present
if not gens_notune(gennames) and len(jo_physshortparts) < 3:
......@@ -518,6 +519,39 @@ if hasattr(testSeq, "TestHepMC") and not gens_testhepmc(evgenConfig.generators):
evgenLog.info("Removing TestHepMC sanity checker")
del testSeq.TestHepMC
##=============================================================
## Check release number
##=============================================================
# Function to check blacklist (from Spyros'es logParser.py)
def checkBlackList(relFlavour,cache,generatorName) :
isError = None
with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt') as bfile:
for line in bfile.readlines():
if not line.strip():
continue
# Blacklisted release flavours
badRelFlav=line.split(',')[0].strip()
# Blacklisted caches
badCache=line.split(',')[1].strip()
# Blacklisted generators
badGens=line.split(',')[2].strip()
used_gens = ','.join(generatorName)
#Match Generator and release type e.g. AtlasProduction, MCProd
if relFlavour==badRelFlav and cache==badCache and re.search(badGens,used_gens) is not None:
if badGens=="": badGens="all generators"
isError=relFlavour+","+cache+" is blacklisted for " + badGens
return isError
return isError
## Announce start of JO checkingrelease nimber checking
evgenLog.debug("****************** CHECKING RELEASE IS NOT BLACKLISTED *****************")
rel = os.popen("echo $AtlasVersion").read()
rel = rel.strip()
errorBL = checkBlackList("AthGeneration",rel,gennames)
if (errorBL):
# raise RuntimeError("This run is blacklisted for this generator, please use a different one !! "+ errorBL)
evgenLog.warning("This run is blacklisted for this generator, please use a different one !! "+ errorBL )
##==============================================================
## Handling of a post-include/exec args at the end of standard configuration
......
......@@ -472,6 +472,38 @@ svcMgr.TagInfoMgr.ExtraTagValuePairs += ["specialConfiguration", evgenConfig.spe
## Process random seed arg and pass to generators
#include("EvgenJobTransforms/Generate_randomseeds.py")
##=============================================================
## Check release number
##=============================================================
# Function to check blacklist (from Spyros'es logParser.py)
def checkBlackList(relFlavour,cache,generatorName) :
isError = None
with open('/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/common/BlackList_caches.txt') as bfile:
for line in bfile.readlines():
if not line.strip():
continue
# Blacklisted release flavours
badRelFlav=line.split(',')[0].strip()
# Blacklisted caches
badCache=line.split(',')[1].strip()
# Blacklisted generators
badGens=line.split(',')[2].strip()
used_gens = ','.join(generatorName)
#Match Generator and release type e.g. AtlasProduction, MCProd
if relFlavour==badRelFlav and cache==badCache and re.search(badGens,used_gens) is not None:
if badGens=="": badGens="all generators"
isError=relFlavour+","+cache+" is blacklisted for " + badGens
return isError
return isError
## Announce start of JO checkingrelease nimber checking
evgenLog.debug("****************** CHECKING RELEASE IS NOT BLACKLISTED *****************")
rel = os.popen("echo $AtlasVersion").read()
rel = rel.strip()
errorBL = checkBlackList("AthGeneration",rel,gennames)
if (errorBL):
evgenLog.warning("This run is blacklisted for this generator, please use a different one !! "+ errorBL )
# raise RuntimeError("This run is blacklisted for this generator, please use a different one !! "+ errorBL)
##==============================================================
## Handling of a post-include/exec args at the end of standard configuration
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment