MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / openFileStreams

Function openFileStreams

okvis_ros/src/dataset_convertor.cpp:195–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195map<string, shared_ptr<std::ofstream>> openFileStreams(const string folder_path,
196 map<string, map<string, string>>& sensor_info) { // NOLINT
197 map<string, shared_ptr<std::ofstream>> topic2file_map;
198 for (auto& iterator : sensor_info) {
199 string topic = iterator.first;
200 string csv_file_path = folder_path + string("/") + iterator.second[CSVFILE];
201 std::ofstream* file = new std::ofstream(csv_file_path.c_str());
202 shared_ptr<std::ofstream> file_ptr(file);
203 topic2file_map.insert(std::pair<string, shared_ptr<std::ofstream>>(topic, file_ptr));
204 }
205 writeCSVHeaders(topic2file_map, sensor_info);
206 return topic2file_map;
207}
208
209map<string, map<string, string>> sensorInfo(const ros::NodeHandle& nh) {
210 cout << colouredString("\tRetrieving sensor list...", RED, REGULAR);

Callers 1

mainFunction · 0.85

Calls 2

writeCSVHeadersFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected