33 std::vector<std::string> mechanisms;
34 std::stringstream ss(filter);
41 std::string mech_name;
44 std::getline(iss, mech_name,
'.');
45 std::getline(iss, var_name,
'.');
46 if (var_name.empty()) {
51 if (mech_name ==
"i_membrane") {
59 ss.read(
reinterpret_cast<char*
>(
v.data()),
n *
sizeof(
int));
61 ss.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
65 const std::string& output_dir,
69 std::ifstream report_conf(conf_file);
72 report_conf >> num_reports;
73 std::vector<ReportConfiguration> reports(num_reports);
74 for (
auto& report: reports) {
75 report_conf >> report.name >> report.target_name;
76 report.output_path = output_dir +
"/" + report.name;
86 report_conf >> report.unit >> report.format;
95 report_conf >> report.report_dt >> report.start >> report.stop >> report.num_gids >>
112 report_conf.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
114 if (report.num_gids) {
115 fill_vec_int(report_conf, report.target, report.num_gids);
117 fill_vec_int(report_conf, report.point_section_ids, report.num_gids);
118 fill_vec_int(report_conf, report.point_compartment_ids, report.num_gids);
124 std::string spikes_population_name;
125 int spikes_population_offset;
126 if (report_conf.peek() ==
'\n') {
128 report_conf.ignore(std::numeric_limits<std::streamsize>::max(),
'\n');
130 if (isdigit(report_conf.peek())) {
131 report_conf >> num_populations;
136 for (
int i = 0;
i < num_populations;
i++) {
137 if (!(report_conf >> spikes_population_name >> spikes_population_offset)) {
139 report_conf >> spikes_population_name;
140 spikes_population_offset = 0;
143 std::make_pair(spikes_population_name, spikes_population_offset));
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
Compartments compartments_from_string(const std::string &str)
static const char * mechanism[]
void fill_vec_int(std::ifstream &ss, std::vector< int > &v, const int n)
Scaling scaling_from_string(const std::string &str)
void parse_filter_string(const std::string &filter, ReportConfiguration &config)
std::vector< ReportConfiguration > create_report_configurations(const std::string &filename, const std::string &output_dir, SpikesInfo &spikes_info)
SectionType section_type_from_string(std::string_view str)
ReportType report_type_from_string(const std::string &s)
#define nrn_assert(x)
assert()-like macro, independent of NDEBUG status
int const size_t const size_t n
std::vector< std::string > var_names
std::vector< std::string > mech_names
std::vector< std::pair< std::string, int > > population_info