Go to the documentation of this file.
11 #ifndef ROOTHISTCNV_RHISTOGRAMCNV_H
12 #define ROOTHISTCNV_RHISTOGRAMCNV_H 1
40 template <
typename T,
typename S,
typename Q>
42 template <
typename CLASS>
45 template <
typename INPUT>
46 TTH( INPUT* i ) :
m_c( dynamic_cast<CLASS*>( i ) ) {}
47 template <
typename INPUT>
49 if (
m_c ) {
m_c->Copy( i ); }
50 return m_c !=
nullptr;
62 Q*
h =
dynamic_cast<Q*
>( refpObj );
66 auto s =
dynamic_cast<S*
>( r->
tObj() );
68 auto a =
dynamic_cast<TArray*
>(
s );
70 auto p = std::make_unique<T>();
73 p->Set( a->GetSize() );
76 h->adoptRepresentation( p.release() );
82 return error(
"Cannot create histogram - invalid address." );
88 auto h =
dynamic_cast<Q*
>( pObj );
90 auto r =
dynamic_cast<T*
>(
h->representation() );
92 auto a =
dynamic_cast<TArray*
>( r );
94 auto c = std::make_unique<T>();
97 c->Set( a->GetSize() );
115 #endif // ROOTHISTCNV_RHISTOGRAMCNV_H
StatusCode updateObj(IOpaqueAddress *, DataObject *) override
Update the transient object from the other representation.
virtual TObject * tObj() const
Retrieve TObject* ptr.
virtual unsigned long release()
release reference to object
static const CLID & classID()
Inquire class type.
virtual const name_type & name() const =0
Name of the directory (or key)
unsigned int CLID
Class ID definition.
const CLID & objType() const override
Retrieve the class type of objects the converter produces.
StatusCode error(const std::string &msg)
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
StatusCode createObj(IOpaqueAddress *pAddr, DataObject *&refpObj) override
Create the transient representation of an object.
RHistogramCnv(ISvcLocator *svc)
Standard constructor.
TObject * createPersistent(DataObject *pObj) override
Create the persistent representation of the histogram object.
IRegistry * registry() const
Get pointer to Registry.