1 #ifndef ROOTHISTCNV_RHISTOGRAMCNV_H 2 #define ROOTHISTCNV_RHISTOGRAMCNV_H 1 31 template <
typename CLASS>
struct TTH :
public CLASS {
32 void CopyH(TObject& o) { CLASS::Copy(o); }
37 refpObj = DataObjFactory::create(
objType());
39 Q*
h =
dynamic_cast<Q*
>(refpObj);
44 S *
s =
dynamic_cast<S*
>(r->
tObj());
47 TArray* a =
dynamic_cast<TArray*
>(
s);
53 h->adoptRepresentation(p.
release());
58 return error(
"Cannot create histogram - invalid address.");
66 Q*
h =
dynamic_cast<Q*
>(pObj);
68 T *r =
dynamic_cast<T*
>(h->representation());
71 TArray* a =
dynamic_cast<TArray*
>(r);
82 error(
"Histogram object is invalid!");
92 #endif // ROOTHISTCNV_RHISTOGRAMCNV_H
RHistogramCnv(ISvcLocator *svc)
Standard constructor.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
const CLID & objType() const override
Retrieve the class type of objects the converter produces.
TObject * createPersistent(DataObject *pObj) override
Create the persistent representation of the histogram object.
virtual const name_type & name() const =0
Name of the directory (or key)
IRegistry * registry() const
Get pointer to Registry.
static const CLID & classID()
Inquire class type.
This class is used for returning status codes from appropriate routines.
virtual TObject * tObj() const
Retrieve TObject* ptr.
Generic converter to save/read AIDA_ROOT histograms using ROOT.
unsigned int CLID
Class ID definition.
StatusCode error(const std::string &msg)
~RHistogramCnv() override=default
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
StatusCode updateObj(IOpaqueAddress *, DataObject *) override
Update the transient object from the other representation.
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.