38 m_fstream.open((file +
"_person.csv").c_str());
41 m_fstream <<
"id,is_recovered,is_immune,start_infectiousness," 42 <<
"end_infectiousness,start_symptomatic,end_symptomatic" << endl;
46 for (
const auto& p : *population) {
47 const auto& h = p.getHealth();
48 if (!h.isSusceptible()) {
49 m_fstream << p.getId() <<
"," << h.isRecovered() <<
"," << h.isImmune() <<
"," 50 << h.getStartInfectiousness() <<
"," << h.getEndInfectiousness() <<
"," 51 << h.getStartSymptomatic() <<
"," << h.getEndSymptomatic() << endl;
void initialize(const std::string &file)
Generate file name and open the file stream.
Time Dependent Person DataType.
PersonFile(const std::string &file="stride_person")
Constructor: initialize.
void print(const std::shared_ptr< const Population > population)
Print the given cases with corresponding tag.
Header for the PersonFile class.
~PersonFile()
Destructor: close the file stream.