Public Member Functions | |
def | __init__ |
def | createConfiguration |
def | createCrabCfg |
def | createFiles |
def | createScript |
def | getCompareStrings |
def | getRepMap |
Public Attributes | |
alignmentToValidate | |
configFiles | |
crabConfigurationFiles | |
filesToCompare | |
general | |
jobmode | |
name | |
randomWorkdirPart | |
scriptFiles | |
Static Public Attributes | |
string | defaultReferenceName = "DEFAULT" |
Definition at line 272 of file validateAlignments.py.
def validateAlignments::GenericValidation::__init__ | ( | self, | |
valName, | |||
alignment, | |||
config | |||
) |
Reimplemented in validateAlignments::OfflineValidation, validateAlignments::OfflineValidationParallel, validateAlignments::OfflineValidationDQM, validateAlignments::MonteCarloValidation, validateAlignments::TrackSplittingValidation, and validateAlignments::ZMuMuValidation.
Definition at line 274 of file validateAlignments.py.
00275 : 00276 import random 00277 self.name = valName 00278 self.alignmentToValidate = alignment 00279 self.general = config.getGeneral() 00280 self.randomWorkdirPart = "%0i"%random.randint(1,10e9) 00281 self.configFiles = [] 00282 self.filesToCompare = {} 00283 self.jobmode = self.general["jobmode"]
def validateAlignments::GenericValidation::createConfiguration | ( | self, | |
fileContents, | |||
path, | |||
schedule = None |
|||
) |
Definition at line 333 of file validateAlignments.py.
00334 : 00335 self.configFiles = GenericValidation.createFiles( self, fileContents, path ) 00336 if not schedule == None: 00337 schedule = [ os.path.join( path, cfgName) for cfgName in schedule] 00338 for cfgName in schedule: 00339 if not cfgName in self.configFiles: 00340 raise StandardError, "scheduled %s missing in generated configfiles: %s"% (cfgName, self.configFiles) 00341 for cfgName in self.configFiles: 00342 if not cfgName in schedule: 00343 raise StandardError, "generated configuration %s not scheduled: %s"% (cfgName, schedule) 00344 self.configFiles = schedule 00345 return self.configFiles
def validateAlignments::GenericValidation::createCrabCfg | ( | self, | |
fileContents, | |||
path | |||
) |
Reimplemented in validateAlignments::OfflineValidation, validateAlignments::MonteCarloValidation, validateAlignments::TrackSplittingValidation, and validateAlignments::ZMuMuValidation.
Definition at line 352 of file validateAlignments.py.
00352 : 00353 self.crabConfigurationFiles = GenericValidation.createFiles( self, fileContents, path ) 00354 return self.crabConfigurationFiles 00355
def validateAlignments::GenericValidation::createFiles | ( | self, | |
fileContents, | |||
path | |||
) |
Definition at line 323 of file validateAlignments.py.
def validateAlignments::GenericValidation::createScript | ( | self, | |
fileContents, | |||
path, | |||
downloadFiles = [] |
|||
) |
Definition at line 346 of file validateAlignments.py.
00346 : 00347 self.scriptFiles = GenericValidation.createFiles( self, fileContents, path ) 00348 for script in self.scriptFiles: 00349 os.chmod(script,0755) 00350 return self.scriptFiles 00351
def validateAlignments::GenericValidation::getCompareStrings | ( | self, | |
requestId = None |
|||
) |
Definition at line 306 of file validateAlignments.py.
00307 : 00308 result = {} 00309 repMap = self.alignmentToValidate.getRepMap() 00310 for validationId in self.filesToCompare: 00311 repMap["file"] = self.filesToCompare[ validationId ] 00312 if repMap["file"].startswith( "/castor/" ): 00313 repMap["file"] = "rfio:%(file)s"%repMap 00314 result[ validationId ]= "%(file)s=%(name)s|%(color)s|%(style)s"%repMap 00315 if requestId == None: 00316 return result 00317 else: 00318 if not "." in requestId: 00319 requestId += ".%s"%GenericValidation.defaultReferenceName 00320 if not requestId.split(".")[-1] in result: 00321 raise StandardError, "could not find %s in reference Objects!"%requestId.split(".")[-1] 00322 return result[ requestId.split(".")[-1] ]
def validateAlignments::GenericValidation::getRepMap | ( | self, | |
alignment = None |
|||
) |
Reimplemented in validateAlignments::GeometryComparison, validateAlignments::OfflineValidation, validateAlignments::OfflineValidationParallel, validateAlignments::OfflineValidationDQM, validateAlignments::MonteCarloValidation, validateAlignments::TrackSplittingValidation, and validateAlignments::ZMuMuValidation.
Definition at line 284 of file validateAlignments.py.
00285 : 00286 if alignment == None: 00287 alignment = self.alignmentToValidate 00288 result = alignment.getRepMap() 00289 result.update( self.general ) 00290 result.update({ 00291 "workdir": os.path.join( self.general["workdir"], 00292 self.randomWorkdirPart ), 00293 "datadir": self.general["datadir"], 00294 "logdir": self.general["logdir"], 00295 "dbLoad": alignment.getLoadTemplate(), 00296 "APE": alignment.getAPETemplate(), 00297 "CommandLineTemplate": ("#run configfile and post-proccess it\n" 00298 "cmsRun %(cfgFile)s\n" 00299 "%(postProcess)s "), 00300 "CMSSW_BASE": os.environ['CMSSW_BASE'], 00301 "SCRAM_ARCH": os.environ['SCRAM_ARCH'], 00302 "alignmentName": alignment.name, 00303 "condLoad": alignment.getConditions() 00304 }) 00305 return result
Definition at line 274 of file validateAlignments.py.
Definition at line 274 of file validateAlignments.py.
Definition at line 352 of file validateAlignments.py.
string validateAlignments::GenericValidation::defaultReferenceName = "DEFAULT" [static] |
Definition at line 273 of file validateAlignments.py.
Definition at line 274 of file validateAlignments.py.
Definition at line 274 of file validateAlignments.py.
Reimplemented in validateAlignments::GeometryComparison, validateAlignments::OfflineValidation, validateAlignments::MonteCarloValidation, validateAlignments::TrackSplittingValidation, and validateAlignments::ZMuMuValidation.
Definition at line 274 of file validateAlignments.py.
Definition at line 274 of file validateAlignments.py.
Reimplemented in validateAlignments::GeometryComparison.
Definition at line 274 of file validateAlignments.py.
Definition at line 346 of file validateAlignments.py.