'Aggregate an event for the whole profile.'

def aggregate(self, event):

    total = event.null()
    for function in self.functions.itervalues():
        try:
            total = event.aggregate(total, function[event])
        except UndefinedEvent:
            return
    self[event] = total
