Go to the documentation of this file.
39 template <
typename T,
typename S,
typename Q>
41 template <
typename CLASS>
44 template <
typename INPUT>
45 TTH( INPUT* i ) :
m_c( dynamic_cast<CLASS*>( i ) ) {}
46 template <
typename INPUT>
48 if (
m_c ) {
m_c->Copy( i ); }
49 return m_c !=
nullptr;
61 Q*
h =
dynamic_cast<Q*
>( refpObj );
65 auto s =
dynamic_cast<S*
>( r->
tObj() );
67 auto a =
dynamic_cast<TArray*
>(
s );
69 auto p = std::make_unique<T>();
72 p->Set( a->GetSize() );
75 h->adoptRepresentation( p.release() );
81 return error(
"Cannot create histogram - invalid address." );
87 auto h =
dynamic_cast<Q*
>( pObj );
89 auto r =
dynamic_cast<T*
>(
h->representation() );
91 auto a =
dynamic_cast<TArray*
>( r );
93 auto c = std::make_unique<T>();
96 c->Set( a->GetSize() );
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.