CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
monteCarloValidation.MonteCarloValidation Class Reference
Inheritance diagram for monteCarloValidation.MonteCarloValidation:
genericValidation.GenericValidationData genericValidation.GenericValidation

Public Member Functions

def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from genericValidation.GenericValidationData
def __init__
 
def createCrabCfg
 
- Public Member Functions inherited from genericValidation.GenericValidation
def __init__
 
def createConfiguration
 
def createCrabCfg
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

Additional Inherited Members

- Public Attributes inherited from genericValidation.GenericValidationData
 crabWorkingDir
 
 dataset
 
 jobmode
 
- Public Attributes inherited from genericValidation.GenericValidation
 alignmentToValidate
 
 config
 
 configFiles
 
 crabConfigFiles
 
 filesToCompare
 
 general
 
 jobmode
 
 name
 
 randomWorkdirPart
 
 scriptFiles
 
- Static Public Attributes inherited from genericValidation.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 10 of file monteCarloValidation.py.

Constructor & Destructor Documentation

def monteCarloValidation.MonteCarloValidation.__init__ (   self,
  valName,
  alignment,
  config 
)

Definition at line 11 of file monteCarloValidation.py.

11 
12  def __init__(self, valName, alignment, config):
13  mandatories = [ "dataset", "maxevents" ]
14  GenericValidationData.__init__(self, valName, alignment, config,
15  "mcValidate", addMandatories=mandatories)

Member Function Documentation

def monteCarloValidation.MonteCarloValidation.createConfiguration (   self,
  path 
)

Definition at line 16 of file monteCarloValidation.py.

References genericValidation.GenericValidation.filesToCompare, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

16 
17  def createConfiguration(self, path ):
18  cfgName = "TkAlMcValidate.%s.%s_cfg.py"%(self.name,
19  self.alignmentToValidate.name)
20  repMap = self.getRepMap()
21  cfgs = {cfgName:replaceByMap(configTemplates.mcValidateTemplate,
22  repMap)}
23  self.filesToCompare[GenericValidationData.defaultReferenceName] = \
24  repMap["resultFile"]
25  GenericValidationData.createConfiguration(self, cfgs, path)
def replaceByMap
— Helpers —############################
def monteCarloValidation.MonteCarloValidation.createCrabCfg (   self,
  path,
  crabCfgBaseName = "TkAlMcValidate" 
)

Definition at line 39 of file monteCarloValidation.py.

39 
40  def createCrabCfg(self, path, crabCfgBaseName = "TkAlMcValidate"):
41  return GenericValidationData.createCrabCfg(self, path,
42  crabCfgBaseName)
def monteCarloValidation.MonteCarloValidation.createScript (   self,
  path 
)

Definition at line 26 of file monteCarloValidation.py.

References genericValidation.GenericValidation.configFiles, genericValidation.GenericValidation.getRepMap(), alignment.Alignment.getRepMap(), entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

26 
27  def createScript(self, path):
28  scriptName = "TkAlMcValidate.%s.%s.sh"%(self.name,
29  self.alignmentToValidate.name)
30  repMap = self.getRepMap()
31  repMap["CommandLine"]=""
32  for cfg in self.configFiles:
33  repMap["CommandLine"] += \
34  repMap["CommandLineTemplate"]%{"cfgFile":cfg, "postProcess":"" }
35 
36  scripts = {scriptName: replaceByMap(configTemplates.scriptTemplate,
37  repMap)}
38  return GenericValidationData.createScript(self, scripts, path)
def replaceByMap
— Helpers —############################
def monteCarloValidation.MonteCarloValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 43 of file monteCarloValidation.py.

References genericValidation.GenericValidation.general, entry.name, genericValidation.GenericValidation.name, alignment.Alignment.name, MuonGeometrySanityCheckPoint.name, plotscripts.SawTeethFunction.name, and helperFunctions.replaceByMap().

43 
44  def getRepMap( self, alignment = None ):
45  repMap = GenericValidationData.getRepMap(self, alignment)
46  repMap.update({
47  "resultFile": replaceByMap(("/store/caf/user/$USER/.oO[eosdir]Oo."
48  "/McValidation_"
49  + self.name +
50  "_.oO[name]Oo..root"), repMap ),
51  "outputFile": replaceByMap(("McValidation_"
52  + self.name +
53  "_.oO[name]Oo..root"), repMap ),
54  "nEvents": self.general["maxevents"]
55  })
56  repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
57  repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
58  return repMap
59 
def replaceByMap
— Helpers —############################