CMS 3D CMS Logo

Public Member Functions | Public Attributes

validateAlignments::TrackSplittingValidation Class Reference

Inheritance diagram for validateAlignments::TrackSplittingValidation:
validateAlignments::GenericValidation

List of all members.

Public Member Functions

def __init__
def createConfiguration
def createCrabCfg
def createScript
def getRepMap

Public Attributes

 crabWorkingDir
 jobmode

Detailed Description

Definition at line 818 of file validateAlignments.py.


Constructor & Destructor Documentation

def validateAlignments::TrackSplittingValidation::__init__ (   self,
  valName,
  alignment,
  config 
)

Reimplemented from validateAlignments::GenericValidation.

Definition at line 819 of file validateAlignments.py.

00820                                                   :
00821         GenericValidation.__init__(self, valName, alignment, config)
00822         defaults = {
00823             "jobmode":self.jobmode,
00824             "runRange":"",
00825             "JSON":""
00826             }
00827         mandatories = [ "trackcollection", "maxevents" ]
00828         if not config.has_section( "split:"+self.name ):
00829             split = config.getResultingSection( "general",
00830                                                 defaultDict = defaults,
00831                                                 demandPars = mandatories )
00832         else:
00833             split = config.getResultingSection( "split:"+self.name, 
00834                                                 defaultDict = defaults,
00835                                                 demandPars = mandatories )
00836         self.general.update( split )
00837         self.jobmode = self.general["jobmode"]
00838 


Member Function Documentation

def validateAlignments::TrackSplittingValidation::createConfiguration (   self,
  path 
)

Definition at line 839 of file validateAlignments.py.

00840                                         :
00841         cfgName = "TkAlTrackSplitting.%s.%s_cfg.py"%( self.name,
00842                                                       self.alignmentToValidate.name )
00843         repMap = self.getRepMap()
00844         repMap.update({
00845                 "outputFile": replaceByMap( (".oO[workdir]Oo./TrackSplitting_"
00846                                              + self.name +
00847                                              "_.oO[name]Oo..root"),
00848                                             repMap )
00849                 })
00850         repMap["outputFile"] = os.path.expandvars( repMap["outputFile"] )
00851         repMap["outputFile"] = os.path.abspath( repMap["outputFile"] )
00852         cfgs = {cfgName:replaceByMap( configTemplates.TrackSplittingTemplate, repMap)}
00853         self.filesToCompare[ GenericValidation.defaultReferenceName ] = repMap["outputFile"]
00854         GenericValidation.createConfiguration(self, cfgs, path)

def validateAlignments::TrackSplittingValidation::createCrabCfg (   self,
  path,
  crabCfgBaseName = "TkAlTrackSplitting" 
)

Reimplemented from validateAlignments::GenericValidation.

Definition at line 868 of file validateAlignments.py.

00870                                                                 :
00871         crabCfgName = "crab.%s.%s.%s.cfg"%( crabCfgBaseName, self.name,
00872                                             self.alignmentToValidate.name )
00873         repMap = self.getRepMap()
00874         repMap["script"] = "dummy_script.sh"
00875         repMap["crabOutputDir"] = os.path.basename( path )
00876         repMap["crabWorkingDir"] = crabCfgName.split( '.cfg' )[0]
00877         self.crabWorkingDir = repMap["crabWorkingDir"]
00878         repMap["numberOfJobs"] = self.general["parallelJobs"]
00879         repMap["cfgFile"] = self.configFiles[0]
00880         repMap["queue"] = self.jobmode.split( ',' )[1].split( '-q' )[1]
00881         crabCfg = {crabCfgName: replaceByMap( configTemplates.crabCfgTemplate,
00882                                               repMap ) }
00883         return GenericValidation.createCrabCfg( self, crabCfg, path )

def validateAlignments::TrackSplittingValidation::createScript (   self,
  path 
)

Definition at line 855 of file validateAlignments.py.

00856                                 :
00857         scriptName = "TkAlTrackSplitting.%s.%s.sh"%( self.name,
00858                                                      self.alignmentToValidate.name )
00859         repMap = self.getRepMap()
00860         repMap["CommandLine"]=""
00861         for cfg in self.configFiles:
00862             repMap["CommandLine"]+= repMap["CommandLineTemplate"]%{"cfgFile":cfg,
00863                                                   "postProcess":""
00864                                                   }
00865 
00866         scripts = {scriptName: replaceByMap( configTemplates.scriptTemplate, repMap ) }
00867         return GenericValidation.createScript(self, scripts, path)

def validateAlignments::TrackSplittingValidation::getRepMap (   self,
  alignment = None 
)

Reimplemented from validateAlignments::GenericValidation.

Definition at line 884 of file validateAlignments.py.

00885                                            :
00886         repMap = GenericValidation.getRepMap(self)
00887         # repMap = self.getRepMap()
00888         repMap.update({ 
00889             "nEvents": self.general["maxevents"],
00890             # Keep the following parameters for backward compatibility
00891             "TrackCollection": self.general["trackcollection"]
00892             })
00893         return repMap
    

Member Data Documentation

Definition at line 868 of file validateAlignments.py.

Reimplemented from validateAlignments::GenericValidation.

Definition at line 819 of file validateAlignments.py.