12 #ifndef ROOT_PoolUtils 13 #define ROOT_PoolUtils 28 namespace ExecutorUtils {
38 static_assert(std::is_constructible<TObject *, T>::value,
39 "The argument should be a vector of pointers to TObject or derived classes");
51 Error(
"PoolUtils::ReduceObjects",
"could not find merge method for the TObject\n. Aborting operation.");
57 unsigned NObjs = objs.size();
58 for(
unsigned i=1; i<NObjs; ++i)
59 mergelist.
Add(objs[i]);
62 merge(obj, &mergelist,
nullptr);
77 namespace ExecutorUtils {
80 template <
class O,
class F>
93 return static_cast<F>(obj);
98 namespace PoolUtils = ExecutorUtils;
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Namespace for new ROOT classes and functions.
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)
T operator()(const std::vector< T > &objs)
Merge collection of TObjects.
static std::enable_if< std::is_pointer< F >::value, F >::type CastIfNeeded(TObject *obj)
static O CastIfNeeded(O &&obj)
Mother of all ROOT objects.
virtual void Add(TObject *obj)
void Error(ErrorHandler_t func, int code, const char *va_(fmt),...)
Write error message and call a handler, if required.