def __init__( self, valName, alignment, referenceAlignment, config, copyImages = True): """ Constructor of the GeometryComparison class. Arguments: - `valName`: String which identifies individual validation instances - `alignment`: `Alignment` instance to validate - `referenceAlignment`: `Alignment` instance which is compared with `alignment` - `config`: `BetterConfigParser` instance which includes the configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm """ defaults = { "3DSubdetector1":"1", "3DSubdetector2":"2", "3DTranslationalScaleFactor":"50", "modulesToPlot":"all", "moduleList": "/store/caf/user/cschomak/emptyModuleList.txt", "useDefaultRange":"false", "plotOnlyGlobal":"false", "plotPng":"true", "dx_min":"-99999", "dx_max":"-99999", "dy_min":"-99999", "dy_max":"-99999", "dz_min":"-99999", "dz_max":"-99999", "dr_min":"-99999", "dr_max":"-99999", "rdphi_min":"-99999", "rdphi_max":"-99999", "dalpha_min":"-99999", "dalpha_max":"-99999", "dbeta_min":"-99999", "dbeta_max":"-99999", "dgamma_min":"-99999", "dgamma_max":"-99999", } mandatories = ["levels", "dbOutput"] GenericValidation.__init__(self, valName, alignment, config, "compare", addDefaults=defaults, addMandatories = mandatories) self.referenceAlignment = referenceAlignment referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name allCompares = config.getCompares() self.__compares = {} if valName in allCompares: self.__compares[valName] = allCompares[valName] else: msg = ("Could not find compare section '%s' in '%s'" %(valName, allCompares)) raise AllInOneError(msg) self.copyImages = copyImages
def __init__(self, valName, alignment, referenceAlignment, config, copyImages=True, randomWorkdirPart=None): """ Constructor of the GeometryComparison class. Arguments: - `valName`: String which identifies individual validation instances - `alignment`: `Alignment` instance to validate - `referenceAlignment`: `Alignment` instance which is compared with `alignment` - `config`: `BetterConfigParser` instance which includes the configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm - `randomWorkDirPart`: If this option is ommitted a random number is generated to create unique path names for the individual validation instances. """ defaults = { "3DSubdetector1": "1", "3DSubdetector2": "2", "3DTranslationalScaleFactor": "50" } mandatories = ["levels", "dbOutput"] GenericValidation.__init__(self, valName, alignment, config, "compare", addDefaults=defaults, addMandatories=mandatories) if not randomWorkdirPart == None: self.randomWorkdirPart = randomWorkdirPart self.referenceAlignment = referenceAlignment referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name allCompares = config.getCompares() self.__compares = {} if valName in allCompares: self.__compares[valName] = allCompares[valName] else: msg = ("Could not find compare section '%s' in '%s'" % (valName, allCompares)) raise AllInOneError(msg) self.copyImages = copyImages
def __init__(self, valName, alignment, referenceAlignment, config, copyImages=True, randomWorkdirPart=None): """ Constructor of the GeometryComparison class. Arguments: - `valName`: String which identifies individual validation instances - `alignment`: `Alignment` instance to validate - `referenceAlignment`: `Alignment` instance which is compared with `alignment` - `config`: `BetterConfigParser` instance which includes the configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm - `randomWorkDirPart`: If this option is ommitted a random number is generated to create unique path names for the individual validation instances. """ GenericValidation.__init__(self, valName, alignment, config) if not randomWorkdirPart == None: self.randomWorkdirPart = randomWorkdirPart self.referenceAlignment = referenceAlignment try: # try to override 'jobmode' from [general] section self.jobmode = config.get("compare:" + self.name, "jobmode") except ConfigParser.NoOptionError: pass referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name allCompares = config.getCompares() self.__compares = {} if valName in allCompares: self.__compares[valName] = allCompares[valName] else: msg = ("Could not find compare section '%s' in '%s'" % (valName, allCompares)) raise AllInOneError(msg) self.copyImages = copyImages
def __init__( self, valName, alignment, referenceAlignment, config, copyImages = True, randomWorkdirPart = None): """ Constructor of the GeometryComparison class. Arguments: - `valName`: String which identifies individual validation instances - `alignment`: `Alignment` instance to validate - `referenceAlignment`: `Alignment` instance which is compared with `alignment` - `config`: `BetterConfigParser` instance which includes the configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm - `randomWorkDirPart`: If this option is ommitted a random number is generated to create unique path names for the individual validation instances. """ defaults = { "3DSubdetector1":"1", "3DSubdetector2":"2", "3DTranslationalScaleFactor":"50" } mandatories = ["levels", "dbOutput"] GenericValidation.__init__(self, valName, alignment, config, "compare", addDefaults=defaults, addMandatories = mandatories) if not randomWorkdirPart == None: self.randomWorkdirPart = randomWorkdirPart self.referenceAlignment = referenceAlignment referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name allCompares = config.getCompares() self.__compares = {} if valName in allCompares: self.__compares[valName] = allCompares[valName] else: msg = ("Could not find compare section '%s' in '%s'" %(valName, allCompares)) raise AllInOneError(msg) self.copyImages = copyImages
def __init__( self, valName, alignment, referenceAlignment, config, copyImages = True, randomWorkdirPart = None): """ Constructor of the GeometryComparison class. Arguments: - `valName`: String which identifies individual validation instances - `alignment`: `Alignment` instance to validate - `referenceAlignment`: `Alignment` instance which is compared with `alignment` - `config`: `BetterConfigParser` instance which includes the configuration of the validations - `copyImages`: Boolean which indicates whether png- and pdf-files should be copied back from the batch farm - `randomWorkDirPart`: If this option is ommitted a random number is generated to create unique path names for the individual validation instances. """ GenericValidation.__init__(self, valName, alignment, config) if not randomWorkdirPart == None: self.randomWorkdirPart = randomWorkdirPart self.referenceAlignment = referenceAlignment try: # try to override 'jobmode' from [general] section self.jobmode = config.get( "compare:"+self.name, "jobmode" ) except ConfigParser.NoOptionError: pass referenceName = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name allCompares = config.getCompares() self.__compares = {} if valName in allCompares: self.__compares[valName] = allCompares[valName] else: msg = ("Could not find compare section '%s' in '%s'" %(valName, allCompares)) raise AllInOneError(msg) self.copyImages = copyImages