3 import globalDictionaries
4 from dataset
import Dataset
5 from genericValidation
import GenericValidationData
6 from helperFunctions
import replaceByMap
7 from TkAlExceptions
import AllInOneError
11 def __init__(self, valName, alignment, config):
12 mandatories = [
"dataset",
"maxevents" ]
13 GenericValidationData.__init__(self, valName, alignment, config,
14 "mcValidate", addMandatories=mandatories)
17 cfgName =
"TkAlMcValidate.%s.%s_cfg.py"%(self.
name,
18 self.alignmentToValidate.name)
20 cfgs = {cfgName:
replaceByMap(configTemplates.mcValidateTemplate,
22 self.
filesToCompare[GenericValidationData.defaultReferenceName] = \
24 GenericValidationData.createConfiguration(self, cfgs, path)
27 scriptName =
"TkAlMcValidate.%s.%s.sh"%(self.
name,
28 self.alignmentToValidate.name)
30 repMap[
"CommandLine"]=
""
32 repMap[
"CommandLine"] += \
33 repMap[
"CommandLineTemplate"]%{
"cfgFile":cfg,
"postProcess":
"" }
35 scripts = {scriptName:
replaceByMap(configTemplates.scriptTemplate,
37 return GenericValidationData.createScript(self, scripts, path)
40 return GenericValidationData.createCrabCfg(self, path,
44 repMap = GenericValidationData.getRepMap(self, alignment)
46 "resultFile":
replaceByMap((
"/store/caf/user/$USER/.oO[eosdir]Oo."
49 "_.oO[name]Oo..root"), repMap ),
52 "_.oO[name]Oo..root"), repMap ),
53 "nEvents": self.
general[
"maxevents"]
55 repMap[
"outputFile"] = os.path.expandvars( repMap[
"outputFile"] )
56 repMap[
"resultFile"] = os.path.expandvars( repMap[
"resultFile"] )
def replaceByMap
— Helpers —############################