Belle II Software  release-05-01-25
Mergeable.cc
1 #include <framework/pcore/Mergeable.h>
2 
3 #include <TCollection.h>
4 
5 using namespace Belle2;
6 
7 Long64_t Mergeable::Merge(TCollection* hlist)
8 {
9  Long64_t nMerged = 0;
10  if (hlist) {
11  const Mergeable* xh = nullptr;
12  TIter nxh(hlist);
13  while ((xh = dynamic_cast<Mergeable*>(nxh()))) {
14  // Add xh to me
15  merge(xh);
16  ++nMerged;
17  }
18  }
19  return nMerged;
20 }
Belle2::Mergeable::Merge
virtual Long64_t Merge(TCollection *hlist)
Allow merging using TFileMerger if saved directly to a file.
Definition: Mergeable.cc:7
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::Mergeable::merge
virtual void merge(const Mergeable *other)=0
Merge object 'other' into this one.
Belle2::Mergeable
Abstract base class for objects that can be merged.
Definition: Mergeable.h:33