1 #ifndef art_Framework_Services_Optional_TFileDirectory_h 2 #define art_Framework_Services_Optional_TFileDirectory_h 12 #include "TDirectory.h" 31 template <
typename T,
typename... ARGS>
32 T*
make(ARGS... args)
const;
38 template <
typename T,
typename... ARGS>
39 T*
makeAndRegister(
char const* name,
char const* title, ARGS... args)
const;
41 template <
typename T,
typename... ARGS>
43 std::string
const& title,
56 std::string
const& descr,
58 std::string
const& path);
77 std::map<std::string, std::vector<Callback_t>>
callbacks_{};
80 template <
typename T,
typename... ARGS>
86 return new T(args...);
89 template <
typename T,
typename... ARGS>
97 T* p =
new T(args...);
100 gDirectory->Append(p);
104 template <
typename T,
typename... ARGS>
107 std::string
const& title,
virtual ~TFileDirectory()=default
std::function< void()> Callback_t
TFileDirectory mkdir(std::string const &dir, std::string const &descr="")
void registerCallback(Callback_t)
T * makeAndRegister(char const *name, char const *title, ARGS...args) const
T * make(ARGS...args) const
std::string fullPath() const
std::map< std::string, std::vector< Callback_t > > callbacks_
TFileDirectory(std::string const &dir, std::string const &descr, TFile *file, std::string const &path)
Create a new TFileDirectory object.