13std::map<std::string, std::string>
14read(
const std::string& strFile)
16 std::ifstream is(strFile.c_str());
20 std::map<std::string, std::string>
result;
24 int nPos = strLine.find(
'=');
25 if ((
signed int)std::string::npos == nPos)
27 std::string strKey = strLine.substr(0, nPos);
28 std::string strVal = strLine.substr(nPos + 1, strLine.length() - nPos + 1);
29 result.insert({ strKey, strVal });
39 const std::string& idkey,
40 const std::string& isokey,
41 const std::string& trigkey)
46 if (!recokey.empty()) {
51 (recokey.empty() && isokey.empty() && trigkey.empty())) {
55 if ((!idkey.empty() && !isokey.empty()) && recokey.empty() &&
57 key = std::string(idkey +
"_" + isokey);
60 if (!trigkey.empty() && !idkey.empty()) {
62 if (!isokey.empty()) {
63 key = std::string(trigkey +
"_" + idkey +
"_" + isokey);
66 key = std::string(trigkey +
"_" + idkey);
76 const std::string& key)
78 std::map<std::string, std::string> fileTomap =
read(
file);
79 if (fileTomap.empty()) {
83 auto i = fileTomap.find(key);
84 if (i != fileTomap.end()) {
std::string getValueByKey(const std::string &mapFile, const std::string &key)
std::string convertToOneKey(const std::string &recokey, const std::string &idkey, const std::string &isokey, const std::string &trigkey)
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)