def getRepMap(self, alignment = None): if alignment == None: alignment = self.alignmentToValidate repMap = super(GeometryComparison, self).getRepMap( alignment ) referenceName = "IDEAL" referenceTitle = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name referenceTitle = self.referenceAlignment.title assert len(self.__compares) == 1 #? not sure how it can be anything else, but just in case common = self.__compares.keys()[0] repMap.update({ "common": clean_name(common), "comparedGeometry": (".oO[alignmentName]Oo." "ROOTGeometry.root"), "referenceGeometry": "IDEAL", # will be replaced later # if not compared to IDEAL "reference": clean_name(referenceName), "referenceTitle": referenceTitle, "alignmentTitle": self.alignmentToValidate.title, "moduleListBase": os.path.basename(repMap["moduleList"]), }) if not referenceName == "IDEAL": repMap["referenceGeometry"] = (".oO[reference]Oo." "ROOTGeometry.root") repMap["name"] += "_vs_.oO[reference]Oo." return repMap
def __init__(self, name, config, runGeomComp = "1"): section = "alignment:%s"%name if not config.has_section( section ): raise AllInOneError("section %s not found. Please define the " "alignment!"%section) config.checkInput(section, knownSimpleOptions = ['globaltag', 'style', 'color', 'title', 'mp', 'mp_alignments', 'mp_deformations', 'mp_APEs', 'hp', 'hp_alignments', 'hp_deformations', 'sm', 'sm_alignments', 'sm_deformations'], knownKeywords = ['condition']) self.name = clean_name(name) if config.exists(section,"title"): self.title = config.get(section,"title") else: self.title = self.name if (int(runGeomComp) != 1): self.name += "_run" + runGeomComp self.title += " run " + runGeomComp if "|" in self.title or "," in self.title or '"' in self.title: msg = "The characters '|', '\"', and ',' cannot be used in the alignment title!" raise AllInOneError(msg) self.runGeomComp = runGeomComp self.globaltag = config.get( section, "globaltag" ) self.conditions = self.__getConditions( config, section ) self.color = config.get(section,"color") self.style = config.get(section,"style") self.color = str(parsecolor(self.color)) self.style = str(parsestyle(self.style))
def getRepMap(self, alignment=None): if alignment == None: alignment = self.alignmentToValidate repMap = super(GeometryComparison, self).getRepMap(alignment) referenceName = "IDEAL" referenceTitle = "IDEAL" if not self.referenceAlignment == "IDEAL": referenceName = self.referenceAlignment.name referenceTitle = self.referenceAlignment.title assert len( self.__compares ) == 1 #? not sure how it can be anything else, but just in case common = self.__compares.keys()[0] repMap.update({ "common": clean_name(common), "comparedGeometry": (".oO[alignmentName]Oo." "ROOTGeometry.root"), "referenceGeometry": "IDEAL", # will be replaced later # if not compared to IDEAL "reference": clean_name(referenceName), "referenceTitle": referenceTitle, "alignmentTitle": self.alignmentToValidate.title, "moduleListBase": os.path.basename(repMap["moduleList"]), }) if not referenceName == "IDEAL": repMap["referenceGeometry"] = (".oO[reference]Oo." "ROOTGeometry.root") repMap["name"] += "_vs_.oO[reference]Oo." return repMap