User Tools

Site Tools


dev:data_output

This is an old revision of the document!


Getting Statistical Data Out of Your Simulation

You have a simulation up and running, but how do you get the statistical data you need ouput to a file? Below you will find some code provided by Professor Ackley that will allow you to do so.

There are two files that need to be modified:

 1. /src/drivers/mfmc/src/main.cpp
 2. /src/sim/include/AbstractDriver.h

main.cpp

To edit the main.cpp file, paste the following code into the Private section of the file:

<code cpp>

  const char* GetSimDirPathTemporary(const char* format, ...) const
  {
    static OverflowableCharBufferByteSink<500> buf;
    buf.Reset();
    buf.Printf("%s",this->GetSimulationBasePath());
    va_list ap;
    va_start(ap, format);
    buf.Vprintf(format, ap);
    if (buf.HasOverflowed())
    {
      FAIL(OUT_OF_ROOM);
    }
    return buf.GetZString();
  }

</code cpp>

dev/data_output.1413516020.txt.gz · Last modified: 2014/10/17 03:20 by csymonds