CMS 3D CMS Logo

monteCarloValidation.py
Go to the documentation of this file.
1 import os
2 import configTemplates
3 import globalDictionaries
4 from dataset import Dataset
5 from genericValidation import GenericValidationData
6 from helperFunctions import replaceByMap
7 from TkAlExceptions import AllInOneError
8 
9 
11  configBaseName = "TkAlMcValidate"
12  scriptBaseName = "TkAlMcValidate"
13  crabCfgBaseName = "TkAlMcValidate"
14  resultBaseName = "McValidation"
15  outputBaseName = "McValidation"
16  needParentFiles = True
17  valType = "mcValidate"
18  def __init__(self, valName, alignment, config):
19  super(MonteCarloValidation, self).__init__(valName, alignment, config)
20  if self.NJobs > 1:
21  raise AllInOneError("Parallel jobs not implemented for the MC validation!\n"
22  "Please set parallelJobs = 1.")
23 
24  @property
25  def cfgTemplate(self):
26  return configTemplates.mcValidateTemplate
27 
28  def createScript(self, path):
29  return super(MonteCarloValidation, self).createScript(path)
30 
31  def createCrabCfg(self, path):
32  return super(MonteCarloValidation, self).createCrabCfg(path, self.crabCfgBaseName)
33 
34  def getRepMap( self, alignment = None ):
35  repMap = super(MonteCarloValidation, self).getRepMap(alignment)
36  repMap.update({
37  "nEvents": self.general["maxevents"]
38  })
39  repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
40  repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
41  return repMap
42 
def __init__(self, valName, alignment, config)