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);
void Error(const char *location, const char *msgfmt,...)
Merge collection of TObjects.
T operator()(const std::vector< T > &objs)
static std::enable_if< std::is_pointer< F >::value, F >::type CastIfNeeded(TObject *obj)
static O CastIfNeeded(O &&obj)
virtual void Add(TObject *obj)
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Mother of all ROOT objects.
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Long64_t(* MergeFunc_t)(void *, TCollection *, TFileMergeInfo *)