7 #include <boost/filesystem.hpp> 16 SimulatorSetup::SimulatorSetup(
const ptree& config,
string hdf5_file,
RunMode run_mode,
17 const unsigned int timestamp_replay)
18 : m_pt_config(config), m_hdf5_file(hdf5_file),
19 m_timestamp_replay(timestamp_replay), m_run_mode(run_mode) {
32 string name =
m_pt_config.get_value(
"run.regions.region.<xmlattr>.name");
34 std::cerr <<
"WARNING: While setting up simulator for the region '" << name <<
"':" << endl;
35 std::cerr <<
" The configuration in the HDF5 file differs from the one given." << endl;
36 std::cerr <<
" Use the extract mode to get the configuration saved in the HDF5 file." << endl;
37 std::cerr <<
" Proceeding with the given configuration (not from HDF5)." << endl;
42 loader.extendSimulation(sim);
53 return exists(filename) and is_regular_file(filename);
unsigned int m_timestamp_replay
Time Dependent Person DataType.
shared_ptr< Simulator > getSimulator()
Setup for the simulator and configuration tree.
Header for the SimulatorBuilder class.
Header for the Simulator class.
Header file for the Loader class for the checkpointing functionality.
bool fileExists(string filename) const
Helper function to check if the file with filename actually exists.
static std::shared_ptr< Simulator > build(const boost::property_tree::ptree &pt_config)
Build simulator.