![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "TDirectory.h"
21 TList *
ret =
new TList();
30 TObjArray *
ret =
new TObjArray(
size);
42 std::string::size_type
i =
path.find_first_of(
'/');
43 if(
i != std::string::npos ) {
44 std::string dName(
path, 0,
i );
45 std::string pName(
path,
i+1, std::string::npos );
47 TDirectory* subDir =
dir->GetDirectory(dName.c_str());
65 return dir->FindKey(
path.c_str() );
70 m_useRecursiveDelete(gROOT->MustClean())
72 gROOT->SetMustClean(
false);
81 dolsr(
const TDirectory*
dir, std::vector<std::string>&
hists,
const TDirectory* topdir)
87 TIter
keys(
dir->GetListOfKeys());
90 std::string toppath(topdir->GetPath());
91 std::string::size_type toppathlen = toppath.length();
92 while ((
key =
dynamic_cast<TKey*
>(
keys())) != NULL) {
94 TDirectory* newdir =
dynamic_cast<TDirectory*
>(
key->ReadObj());
96 std::cerr <<
"WARNING: cannot read directory "
98 <<
"; skipping" << std::endl;
104 if (std::string(
key->GetName()) ==
"metadata") {
108 if (
fullpath.substr(0, toppathlen) == toppath) {
110 if (toppath[toppathlen-1] ==
'/')
extra = 0;
void dolsr(const TDirectory *dir, std::vector< std::string > &hists, const TDirectory *topdir=nullptr)
bool starts_with(const char *s, const char *prefix)
Test whether one null-terminated byte string starts with another.
TDirectory & m_dir
The directory we need to return to.
path
python interpreter configuration --------------------------------------—
std::string m_path
the path being used
bool m_useRecursiveDelete
C++20-like starts_with/ends_with for strings.
HanHistogramLink(TDirectory *dir, const std::string &path)
TSeqCollection * newTList(const char *name, TObject *obj=0)
TSeqCollection * newTObjArray(const char *name, TObject *obj=0, Int_t size=TCollection::kInitCapacity)
TKey * getObjKey(TDirectory *dir, const std::string &path)