1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 14:57:05 +01:00

Added JSON parser (without NextElement)

This commit is contained in:
Guido Cossu
2017-01-23 14:57:38 +00:00
parent 27dfe816fa
commit 244f8fb6dc
10 changed files with 12731 additions and 30 deletions

View File

@ -115,14 +115,18 @@ class HMCResourceManager {
ObservablesList.emplace_back(ObsFactory.create(obs_type, Read));
ObservablesList[ObservablesList.size() - 1]->print_parameters();
} while (Read.nextElement(observable_string));
std::cout << "Size of ObservablesList " << ObservablesList.size()
<< std::endl;
Read.pop();
// Loop on levels
Read.push("Actions");
if(!Read.push("Actions")){
std::cout << "Actions not found" << std::endl;
exit(1);
}
Read.push("Level");// push must check if the node exist
if(!Read.push("Level")){// push must check if the node exist
std::cout << "Level not found" << std::endl;
exit(1);
}
do
{
fill_ActionsLevel(Read);
@ -267,11 +271,12 @@ private:
auto &ActionFactory = HMC_LGTActionModuleFactory<gauge_string, ReaderClass>::getInstance();
std::string action_type;
Read.readDefault("name", action_type);
std::cout << ActionFactory.getBuilderList() << std::endl;
std::cout << ActionFactory.getBuilderList() << std::endl; // temporary
ActionsList.emplace(m, ActionFactory.create(action_type, Read));
} while (Read.nextElement("Action"));
ActionsList.find(m)->second->print_parameters();
Read.pop();
ActionsList.find(m)->second->print_parameters();
}