userAge = int(experiment.getUserProfile().Info["Age"]) #-------------------------------------------- for searchType in experiment.getSearchTypes(): searchData = reportData.SearchTypes[searchType] searchData.Charts["ResultAge"] = ReportGraph() searchData.Charts["MatchAge"] = ReportGraph() searchData.Charts["MutualAge"] = ReportGraph() for age,searchSet in experiment.getSearches(searchType).iteritems(): searchData.RawNames += searchSet searchData.Charts["ResultAge"].setValue(age,len(searchSet)) for profileName,fileName in experiment.getProfiles(searchType): searchData.MatchNames.append(profileName) matchProfile = MatchProfile() matchProfile.loadFromConfig(fileName) searchData.MatchProfiles.append(matchProfile) searchData.Charts["MatchAge"].incValue(int(matchProfile.Info["Age"]),1) if userAge < int(matchProfile.LookingFor["AgeLow"]): continue if userAge > int(matchProfile.LookingFor["AgeHigh"]): continue searchData.Charts["MutualAge"].incValue(int(matchProfile.Info["Age"]),1) searchData.MutualProfiles.append(matchProfile) searchData.Charts["Words"] = ProcessEssays(searchData.MutualProfiles) searchData.Charts["Answers"] = ProcessAnswers(searchData.MutualProfiles) searchData.InfoCharts["Ethnicity"] = (ProcessField("Details","Ethnicity",searchData.MatchProfiles),ProcessField("Details","Ethnicity",searchData.MutualProfiles)) searchData.InfoCharts["Relationship Type"] = (ProcessField("Details","Relationship Type",searchData.MatchProfiles),ProcessField("Details","Relationship Type",searchData.MutualProfiles)) searchData.InfoCharts["Smokes"] = (ProcessField("Details","Smokes",searchData.MatchProfiles),ProcessField("Details","Smokes",searchData.MutualProfiles))