6 #include "TDirectory.h"
36 std::stringstream
ss(
"");
44 std::stringstream run_type_label;
45 std::stringstream run_type_title;
48 TNamed run_type_description(run_type_label.str().c_str(), run_type_title.str().c_str());
70 if (
top_ != gDirectory)
82 TObject*
obj = keylist->First();
86 if (
obj == keylist->Last()) {
173 std::vector<std::string> directories;
174 directories.reserve(10);
177 std::string::const_iterator it, previous_dir, latest_dir;
179 it = previous_dir = latest_dir =
path.begin();
181 it = previous_dir = latest_dir =
path.begin() - 1;
184 while (it !=
path.end()) {
187 previous_dir = latest_dir;
189 directories.push_back(
std::string(previous_dir + 1, latest_dir));
193 if (latest_dir != (
path.end() - 1)) {
198 TDirectory*
child = gDirectory;
199 for (std::vector<std::string>::const_iterator
dir = directories.begin();
dir != directories.end();
dir++) {
200 if (!dynamic_cast<TDirectory*>(
child->Get(
dir->c_str()))) {
214 std::vector<TDirectory*>
dirs;
220 while (!
dirs.empty()) {
229 std::vector<TDirectory*>*
dirs,
231 TList* keylist =
dir->GetListOfKeys();
233 TObject*
obj = keylist->First();
238 if (
obj == keylist->Last()) {
242 if (dynamic_cast<TDirectory*>(
dir->Get(
obj->GetName()))) {
243 TDirectory*
child = dynamic_cast<TDirectory*>(
dir->Get(
obj->GetName()));
249 TH1* his = dynamic_cast<TH1*>(
dir->Get(
obj->GetName()));
254 if ((*ihis)->GetName() == his->GetName()) {
262 obj = keylist->After(
obj);