3 from genericValidation
import GenericValidationData
4 from helperFunctions
import replaceByMap
5 from TkAlExceptions
import AllInOneError
9 def __init__(self, valName, alignment, config):
10 mandatories = [
"trackcollection",
"maxevents",
"dataset"]
11 GenericValidationData.__init__(self, valName, alignment, config,
12 "split", addMandatories = mandatories)
15 cfgName =
"TkAlTrackSplitting.%s.%s_cfg.py"%(self.
name,
16 self.alignmentToValidate.name)
18 cfgs = {cfgName:
replaceByMap(configTemplates.TrackSplittingTemplate,
20 self.
filesToCompare[GenericValidationData.defaultReferenceName] = \
22 GenericValidationData.createConfiguration(self, cfgs, path)
25 scriptName =
"TkAlTrackSplitting.%s.%s.sh"%(self.
name,
26 self.alignmentToValidate.name)
28 repMap[
"CommandLine"]=
""
30 repMap[
"CommandLine"]+= (repMap[
"CommandLineTemplate"]
31 %{
"cfgFile":cfg,
"postProcess":
""})
33 scripts = {scriptName:
replaceByMap(configTemplates.scriptTemplate,
35 return GenericValidationData.createScript(self, scripts, path)
38 return GenericValidationData.createCrabCfg(self, path, crabCfgBaseName)
41 repMap = GenericValidationData.getRepMap(self)
43 "resultFile":
replaceByMap( (
"/store/caf/user/$USER/.oO[eosdir]Oo."
46 "_.oO[name]Oo..root"),
50 "_.oO[name]Oo..root"),
52 "nEvents": self.
general[
"maxevents"],
53 "TrackCollection": self.
general[
"trackcollection"]
55 repMap[
"outputFile"] = os.path.expandvars( repMap[
"outputFile"] )
56 repMap[
"resultFile"] = os.path.expandvars( repMap[
"resultFile"] )
65 if no argument or "" is passed a string with an instantiation is
66 returned, else the validation is appended to the list
70 if validationsSoFar !=
"":
71 validationsSoFar +=
','
72 validationsSoFar += comparestring
73 return validationsSoFar
def appendToExtendedValidation
def replaceByMap
— Helpers —############################