1 #ifndef Utils_TFileDirectory_h 2 #define Utils_TFileDirectory_h 12 #include "TDirectory.h" 36 TDirectory *getBareDirectory(
const std::string &subdir =
"")
const;
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();
55 T *
t =
new T(args...);
56 ROOT::DirAutoAdd_t
func =
T::Class()->GetDirectoryAutoAdd();
74 TDirectory *_cd(
const std::string &subdir =
"",
bool createNeededDirectories =
true)
const;
82 : file_(file),
dir_(dir), descr_(descr),
path_(path) {}
TFileDirectory(const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
virtual ~TFileDirectory()
descructor
T * getObject(const std::string &objname, const std::string &subdir="")
T * make(const Args &...args) const
make new ROOT object