1 #include "DocStringManager.hxx" 5 DocStringManager::DocStringManager():
HLClonesArray(
"config",
"DocString",
"DocString",1000){
14 ReadClonesArray(file);
20 for (
int i = 0; i < _NObjects; i++) {
23 std::cout <<
"Unable to read docstring " << i << std::endl;
26 if (doc->
Name() == name && doc->
Tree() == tree_name) {
32 std::cout <<
"Unable to find requested variable" << std::endl;
38 std::vector<std::string> vars;
40 for (
int i = 0; i < _NObjects; i++) {
43 std::cout <<
"Unable to read docstring " << i << std::endl;
46 if (doc->
Tree() == tree_name) {
47 vars.push_back(doc->
Name());
51 std::sort(vars.begin(), vars.end());
53 for (
unsigned int i = 0; i < vars.size(); i++) {
54 std::cout << vars[i] << std::endl;
std::string Name()
Get the name of this variable.
void ExplainVar(const std::string &name, const std::string &tree_name)
Print the details of the specified variable in the given tree.
void ListVars(const std::string &tree_name)
List all the variables that were stored in this tree.
std::string Tree()
Get the name of the tree this variable was stored in.
void ReadDocStrings(const std::string &file)