#include <TFolder.h>
#include <TH1.h>
#include <HistMan/RootHists.h>
Go to the source code of this file.
Classes | |
class | HistMan |
manage histograms. More... | |
Functions | |
TFolder & | mkdir_p (TFolder &folder, const char *path) |
TFolder& mkdir_p | ( | TFolder & | folder, | |
const char * | path | |||
) |
Definition at line 43 of file HistMan/HEAD/HistMan.cxx.
References parse_path().
Referenced by HistMan::Adopt(), and HistMan::HistMan().
00044 { 00045 if (!path || path[0] == '\0') return top; 00046 00047 vector<string> vp = parse_path(path); 00048 TFolder* folder = ⊤ 00049 00050 for (unsigned int ind=0; ind < vp.size(); ++ind) { 00051 const char* name = vp[ind].c_str(); 00052 TFolder* tmp = dynamic_cast<TFolder*>(folder->FindObject(name)); 00053 if (tmp) folder = tmp; 00054 else folder = folder->AddFolder(name,name); 00055 } 00056 return *folder; 00057 }