CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
validateAlignments.OfflineValidation Class Reference
Inheritance diagram for validateAlignments.OfflineValidation:
validateAlignments.GenericValidation validateAlignments.OfflineValidationDQM

Public Member Functions

def __init__
 
def appendToExtendedValidation
 
def createConfiguration
 
def createScript
 
def getRepMap
 
- Public Member Functions inherited from validateAlignments.GenericValidation
def __init__
 
def createConfiguration
 
def createFiles
 
def createScript
 
def getCompareStrings
 
def getRepMap
 

Private Attributes

 __DMRMethod
 
 __DMRMinimum
 
 __OfflineTreeBaseDir
 

Additional Inherited Members

- Public Attributes inherited from validateAlignments.GenericValidation
 alignmentToValidate
 
 configFiles
 
 filesToCompare
 
 randomWorkdirPart
 
 scriptFiles
 
- Static Public Attributes inherited from validateAlignments.GenericValidation
string defaultReferenceName = "DEFAULT"
 

Detailed Description

Definition at line 371 of file validateAlignments.py.

Constructor & Destructor Documentation

def validateAlignments.OfflineValidation.__init__ (   self,
  alignment,
  config 
)

Definition at line 372 of file validateAlignments.py.

References validateAlignments.readGeneral().

373  def __init__(self, alignment,config):
374  GenericValidation.__init__(self, alignment, config)
375  general = readGeneral( config )
376  self.__DMRMethod = general["DMRMethod"]
377  self.__DMRMinimum = general["DMRMinimum"]
378  self.__OfflineTreeBaseDir = general["OfflineTreeBaseDir"]

Member Function Documentation

def validateAlignments.OfflineValidation.appendToExtendedValidation (   self,
  validationsSoFar = "" 
)
if no argument or "" is passed a string with an instantiation is returned, 
else the validation is appended to the list

Definition at line 420 of file validateAlignments.py.

References validateAlignments.Alignment.getRepMap(), and validateAlignments.GenericValidation.getRepMap().

421  def appendToExtendedValidation( self, validationsSoFar = "" ):
422  """
423  if no argument or "" is passed a string with an instantiation is returned,
424  else the validation is appended to the list
425  """
426  repMap = self.getRepMap()
427  if validationsSoFar == "":
428  validationsSoFar = 'PlotAlignmentValidation p("%(resultFile)s", "%(name)s", %(color)s, %(style)s);\n'%repMap
429  else:
430  validationsSoFar +='p.loadFileList("%(resultFile)s", "%(name)s", %(color)s, %(style)s);\n'%repMap
431 
432 # PlotAlignmentValidation p(".oO[firstFile]Oo.",".oO[firstLegendEntry]Oo.");
433 # p.loadFileList("rfio:/castor/cern.ch/user/j/jdraeger/Validation/MCfromCRAFT/new/Validation_MC_Adun1_CosmicTF.root","Brot ist lecker2");
434  return validationsSoFar
def validateAlignments.OfflineValidation.createConfiguration (   self,
  path,
  configBaseName = "TkAlOfflineValidation" 
)

Definition at line 379 of file validateAlignments.py.

References validateAlignments.GenericValidation.filesToCompare, validateAlignments.Alignment.getRepMap(), validateAlignments.GenericValidation.getRepMap(), and validateAlignments.replaceByMap().

380  def createConfiguration(self, path, configBaseName = "TkAlOfflineValidation" ):
381  cfgName = "%s.%s_cfg.py"%( configBaseName, self.alignmentToValidate.name )
382  repMap = self.getRepMap()
383 
384  cfgs = {cfgName:replaceByMap( configTemplates.offlineTemplate, repMap)}
385  self.filesToCompare[ GenericValidation.defaultReferenceName ] = repMap["resultFile"]
386  GenericValidation.createConfiguration(self, cfgs, path)
def replaceByMap
— Helpers —############################ replaces .oO[id]Oo.
def validateAlignments.OfflineValidation.createScript (   self,
  path,
  scriptBaseName = "TkAlOfflineValidation" 
)

Definition at line 387 of file validateAlignments.py.

References validateAlignments.GenericValidation.configFiles, and validateAlignments.replaceByMap().

388  def createScript(self, path, scriptBaseName = "TkAlOfflineValidation"):
389  scriptName = "%s.%s.sh"%(scriptBaseName, self.alignmentToValidate.name )
390  repMap = GenericValidation.getRepMap(self)
391  repMap["CommandLine"]=""
392  for cfg in self.configFiles:
393  repMap["CommandLine"]+= repMap["CommandLineTemplate"]%{"cfgFile":cfg,
394  "postProcess":""
395  }
396  scripts = {scriptName: replaceByMap( configTemplates.scriptTemplate, repMap ) }
397  return GenericValidation.createScript(self, scripts, path)
def replaceByMap
— Helpers —############################ replaces .oO[id]Oo.
def validateAlignments.OfflineValidation.getRepMap (   self,
  alignment = None 
)

Definition at line 398 of file validateAlignments.py.

References validateAlignments.OfflineValidation.__DMRMethod, validateAlignments.OfflineValidation.__DMRMinimum, validateAlignments.OfflineValidation.__OfflineTreeBaseDir, and validateAlignments.replaceByMap().

399  def getRepMap(self, alignment = None):
400  repMap = GenericValidation.getRepMap(self, alignment)
401  repMap.update({
402  "OfflineTreeBaseDir": self.__OfflineTreeBaseDir,
403  "DMRMethod":self.__DMRMethod,
404  "DMRMinimum":self.__DMRMinimum,
405  "APE": configTemplates.APETemplate,
406  "outputFile": replaceByMap( ".oO[workdir]Oo./AlignmentValidation_.oO[name]Oo..root", repMap ),
407  "resultFile": replaceByMap( ".oO[datadir]Oo./AlignmentValidation_.oO[name]Oo..root", repMap ),
408  "TrackSelectionTemplate": configTemplates.TrackSelectionTemplate,
409  "LorentzAngleTemplate": configTemplates.LorentzAngleTemplate,
410  "offlineValidationMode": "Standalone",
411  "offlineValidationFileOutput": configTemplates.offlineStandaloneFileOutputTemplate
412  })
413  repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
414  repMap["outputFile"] = os.path.abspath( repMap["outputFile"] )
415  repMap["resultFile"] = os.path.expandvars( repMap["resultFile"] )
416  repMap["resultFile"] = os.path.abspath( repMap["resultFile"] )
417 
418  return repMap
419 
def replaceByMap
— Helpers —############################ replaces .oO[id]Oo.

Member Data Documentation

validateAlignments.OfflineValidation.__DMRMethod
private

Definition at line 375 of file validateAlignments.py.

Referenced by validateAlignments.OfflineValidation.getRepMap().

validateAlignments.OfflineValidation.__DMRMinimum
private

Definition at line 376 of file validateAlignments.py.

Referenced by validateAlignments.OfflineValidation.getRepMap().

validateAlignments.OfflineValidation.__OfflineTreeBaseDir
private

Definition at line 377 of file validateAlignments.py.

Referenced by validateAlignments.OfflineValidation.getRepMap().