Belle II Software  release-08-01-10
MergeableNamed Class Referenceabstract

Abstract base class for objects that can be merged but also named. More...

#include <MergeableNamed.h>

Inheritance diagram for MergeableNamed:
Collaboration diagram for MergeableNamed:

Public Member Functions

virtual void merge (const MergeableNamed *other)=0
 Merge object 'other' into this one. More...
 
virtual void clear ()=0
 Clear content of this object (e.g. set to zeroes). Called by the Reset() function.
 
virtual Long64_t Merge (TCollection *hlist)
 Allow merging using TFileMerger if saved directly to a file.
 
virtual void Reset ()
 Root-like Reset function for "template compatibility" with ROOT objects. More...
 
virtual void SetDirectory (TDirectory *)
 Root-like Clone function for "template compatibility" with ROOT objects. More...
 

Private Member Functions

 ClassDef (MergeableNamed, 0)
 Abstract base class for objects that can be merged and named.
 

Detailed Description

Abstract base class for objects that can be merged but also named.

Mostly copied from framework/pcore/Mergeable.h

This is mainly intended to be a base class for custom objects we save via the CAF. We do less TDirectory/TFile management here compared to Mergeable since we aren't using the datastore and don't need to disconnect from TFiles etc. We'll be explicitly managing that in the CAF (see CalibObjManager).

Definition at line 29 of file MergeableNamed.h.

Member Function Documentation

◆ merge()

virtual void merge ( const MergeableNamed other)
pure virtual

Merge object 'other' into this one.

Your derived class must implement this function. You can static_cast 'other' to your own type (when called, this and other are guaranteed to point to objects of the same type).

Note that 'other' will be deleted after the merge, so make sure you copy all data from it that you will need.

Implemented in MilleData.

◆ Reset()

virtual void Reset ( )
inlinevirtual

Root-like Reset function for "template compatibility" with ROOT objects.

Alias for clear().

Definition at line 52 of file MergeableNamed.h.

◆ SetDirectory()

virtual void SetDirectory ( TDirectory *  )
inlinevirtual

Root-like Clone function for "template compatibility" with ROOT objects.

Calls clone() Root-like SetDirectory function for "template compatibility" with ROOT objects. Does nothing.

Definition at line 56 of file MergeableNamed.h.


The documentation for this class was generated from the following files: