1 #ifndef Utils_TFileDirectory_h 2 #define Utils_TFileDirectory_h 12 #include "TDirectory.h" 41 TObject *objPtr =
_getObj(objname, subdir);
43 T *retval =
dynamic_cast<T *
>(objPtr);
46 throw cms::Exception(
"ObjectNotCorrectlyTyped") <<
"Object named " << objname <<
" is not of correct type";
52 template <
typename T,
typename... Args>
54 TDirectory *
d =
_cd();
56 ROOT::DirAutoAdd_t
func =
T::Class()->GetDirectoryAutoAdd();
74 TDirectory *
_cd(
const std::string &subdir =
"",
bool createNeededDirectories =
true)
const;
TFileDirectory(const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
TDirectory * _cd(const std::string &subdir="", bool createNeededDirectories=true) const
TObject * _getObj(const std::string &objname, const std::string &subdir="") const
virtual ~TFileDirectory()
descructor
T * make(const Args &...args) const
make new ROOT object
TDirectory * getBareDirectory(const std::string &subdir="") const
T * getObject(const std::string &objname, const std::string &subdir="")
TDirectory * _mkdir(TDirectory *dirPtr, const std::string &dir, const std::string &description) const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::string fullPath() const
return the full path of the stored histograms