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:

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();
}

and

typedef typename CC::PARAM_CONFIG P;
typedef typename CC::ATOM_TYPE T;
dev/data_output.1413517150.txt.gz · Last modified: 2014/10/17 03:39 by csymonds