public void body()
    {
        // Process Events until END_OF_SIMULATION is received
        Sim_event ev = new Sim_event();
        for (sim_get_next(ev); ev.get_tag() != GridSimTags.END_OF_SIMULATION;
                sim_get_next(ev) )
        {
            if ( !active_ ) {
                continue; // Skip processing of this event
            }

            switch ( ev.get_tag() )
            {
                case GridSimTags.RECORD_STATISTICS:
                    if (ev.get_data() != null) {
                        recordStat( (Stat) ev.get_data() );
                    }
                    break;

                case GridSimTags.RETURN_ACC_STATISTICS_BY_CATEGORY:
                    returnAccStatByCategory(ev);
                    break;

                default:
                    System.out.println("GridStatistics.body() : " +
                            "Unable to handle request from GridSimTags " +
                            "with constant number " + ev.get_tag() );
                    break;
            }
        }

        if (active_) {
            outFile_.close();
        }
    }