16 #include <boost/property_tree/xml_parser.hpp> 21 using std::shared_ptr;
33 void loadFromTimestep(
unsigned int timestep, shared_ptr<Simulator> sim)
const;
36 void extendSimulation(shared_ptr<Simulator> sim)
const {
37 loadFromTimestep(this->getLastSavedTimestep(), sim);
42 ptree getConfig()
const {
return m_pt_config; }
44 ptree getDisease()
const {
return m_pt_disease; }
46 ptree getContact()
const {
return m_pt_contact; }
49 unsigned int getLastSavedTimestep()
const;
53 static void extractConfigs(
string filename);
58 void updateClusterImmuneIndices(shared_ptr<Simulator> sim)
const;
61 void loadClusters(H5::H5File& file,
string full_dataset_name, std::vector<Cluster>& cluster,
62 shared_ptr<Simulator> sim)
const;
65 void loadCalendar(H5::H5File& file,
string dataset_name, shared_ptr<Simulator> sim)
const;
68 void loadPersonTDData(H5::H5File& file,
string dataset_name, shared_ptr<Simulator> sim)
const;
71 void loadRngState(H5::H5File& file,
string dataset_name, shared_ptr<Simulator> sim)
const;
74 void loadTravellers(H5::H5File& file,
string dataset_name, shared_ptr<Simulator> sim)
const;
81 const char* m_filename;
100 ptree
getConfig()
const { ptree result;
return result; }
void extendSimulation(shared_ptr< Simulator > sim) const
Extend the simulation at the last saved timestep.
void loadFromTimestep(unsigned int timestep, shared_ptr< Simulator > sim) const
Load from timestep, if the specified timestep is present in the hdf5 file.
Time Dependent Person DataType.
Hdf5Loader(const char *filename)
Interface/Implementation of Observer.
static void extractConfigs(string filename)
Extract the configuration files saved in the hdf5 file.
Header for the Simulator class.
unsigned int getLastSavedTimestep() const
Retrieves the last saved timestep index in the hdf5 file.