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);
80 template <
class O,
class F>
93 return static_cast<F>(obj);
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
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)
void Add(TObject *obj) override
void Delete(Option_t *option="") override
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 *)