def METHOD_NAME(self):
    if mpi.rank == 0:
        assert self.file is not None
        n = len(self.cycleHistory)
        assert len(self.timeHistory) == n
        assert len(self.sampleHistory) == n
        if mpi.rank == 0:
            for i in range(n):
                if isinstance(self.sampleHistory[i], tuple):
                    samplestr = ""
                    for x in self.sampleHistory[i]:
                        samplestr += str(x) + " "
                else:
                    samplestr = str(self.sampleHistory[i])
                self.file.write("%i \t %g \t %s\n" % (self.cycleHistory[i],
                                                      self.timeHistory[i],
                                                      samplestr))
        self.file.flush()
    return