CMS 3D CMS Logo

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