def METHOD_NAME(self, filename):
    """
    Attempt to be mostly compatible to previous Gate stat output file
    """
    sec = gate.g4_units("s")
    f = open(filename, "w+")
    s = f"# NumberOfRun    = {self.counts.run_count}\n"
    s += f"# NumberOfEvents = {self.counts.event_count}\n"
    s += f"# NumberOfTracks = {self.counts.track_count}\n"
    s += f"# NumberOfSteps  = {self.counts.step_count}\n"
    s += f"# NumberOfGeometricalSteps  = ?\n"
    s += f"# NumberOfPhysicalSteps     = ?\n"
    s += f"# ElapsedTime           = {self.counts.duration / sec + self.counts.init / sec}\n"
    s += f"# ElapsedTimeWoInit     = {self.counts.duration / sec}\n"
    s += (
        f'# StartDate             = {g4.G4BestUnit(self.simu_start_time, "Time")}\n'
    )
    s += f'# EndDate               = {g4.G4BestUnit(self.simu_end_time, "Time")}\n'
    s += f"# PPS (Primary per sec)      = {self.pps:.0f}\n"
    s += f"# TPS (Track per sec)        = {self.tps:.0f}\n"
    s += f"# SPS (Step per sec)         = {self.sps:.0f}\n"
    s += f"# Threads                    = {self.nb_thread}\n"
    s += f"# Date                       = {datetime.now()}\n"
    if self.user_info.track_types_flag:
        s += f"# Track types:\n"
        for t in self.counts.track_types:
            s += f"# {t} = {self.counts.track_types[t]}\n"
    f.METHOD_NAME(s)