lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
kwargs.hh File Reference

get_kwargs(), which parses a comma-separated key=value string into a map. More...

#include <string>
#include <map>

Functions

void get_kwargs (const std::string &kwargs_str, std::map< std::string, std::string > &kwargs)
 Split kwargs_str at commas and store each key=value pair (key and value trimmed of surrounding white space) in kwargs, overwriting existing keys.
 

Detailed Description

get_kwargs(), which parses a comma-separated key=value string into a map.

Function Documentation

◆ get_kwargs()

void get_kwargs ( const std::string &  kwargs_str,
std::map< std::string, std::string > &  kwargs 
)

Split kwargs_str at commas and store each key=value pair (key and value trimmed of surrounding white space) in kwargs, overwriting existing keys.

Logs and throws a std::string if an item has no equal sign.