8 #include "TDirectory.h"
20 TList *ret =
new TList();
29 TObjArray *ret =
new TObjArray(
size);
41 std::string::size_type
i =
path.find_first_of(
'/');
42 if(
i != std::string::npos ) {
43 std::string dName(
path, 0,
i );
44 std::string pName(
path,
i+1, std::string::npos );
46 TDirectory* subDir =
dir->GetDirectory(dName.c_str());
64 return dir->FindKey(
path.c_str() );
69 m_useRecursiveDelete(gROOT->MustClean())
71 gROOT->SetMustClean(
false);
80 dolsr(
const TDirectory*
dir, std::vector<std::string>&
hists,
const TDirectory* topdir)
86 TIter
keys(
dir->GetListOfKeys());
89 std::string toppath(topdir->GetPath());
90 std::string::size_type toppathlen = toppath.length();
91 while ((
key =
dynamic_cast<TKey*
>(
keys())) != NULL) {
92 if (std::string(
key->GetClassName()).starts_with(
"TDirectory")) {
93 TDirectory* newdir =
dynamic_cast<TDirectory*
>(
key->ReadObj());
95 std::cerr <<
"WARNING: cannot read directory "
97 <<
"; skipping" << std::endl;
103 if (std::string(
key->GetName()) ==
"metadata") {
107 if (
fullpath.substr(0, toppathlen) == toppath) {
109 if (toppath[toppathlen-1] ==
'/')
extra = 0;