Diana Software
Public Member Functions | Public Attributes | Private Member Functions | List of all members
QTObject< T > Class Template Reference

QObject with TObject member. More...

Inheritance diagram for QTObject< T >:

Public Member Functions

 QTObject ()
 ctor More...
 
 QTObject (const T &other)
 copy ctor More...
 
virtual ~QTObject ()
 dtor More...
 
void Clear ()
 clear members More...
 
const QTObject< T > & operator= (const T &other)
 
bool Fill (Diana::QObject *obj) const
 fill object of same type (like operator=) More...
 
QObjectDuplicate () const
 create object of same type More...
 
virtual void Dump (std::ostream &o) const
 print content to stream (intended for screen print or log files) More...
 
virtual QError WriteOnStream (std::ostream &o) const
 print content to stream (intended for storage in text files) More...
 
virtual QError ReadFromStream (std::istream &o)
 fill content from stream (intended for storage in text files) More...
 
void Draw (Option_t *option="")
 Draw root. More...
 

Public Attributes

fObject
 TObject member. More...
 

Private Member Functions

 ClassDef (QTObject, 1)
 

Detailed Description

template<class T>
class QTObject< T >

QObject with TObject member.

Author
Marco Vignati

Example on how to store a TH1D into the QEvent (for global TObjets look at GlobalDataManagerExample.C).

void MMyModule::Init(QEvent& ev) 
{
     ...
     ev.Add<QTObject<TH1D> >("Name");
     ...
}

void MMyModule::Do(QEvent& ev)
{
     TH1D histo("histo","Histogram",10,-5,5);
     histo.Fill(3)
     ...
     ev.Get<QTObject<TH1D> >("Name") = histo;
}

Definition at line 38 of file QTObject.hh.

Constructor & Destructor Documentation

◆ QTObject() [1/2]

template<class T >
QTObject< T >::QTObject ( )
inline

ctor

Definition at line 42 of file QTObject.hh.

References QTObject< T >::fObject, and histo().

◆ QTObject() [2/2]

template<class T >
QTObject< T >::QTObject ( const T &  other)
inline

copy ctor

Definition at line 50 of file QTObject.hh.

References QTObject< T >::fObject, and histo().

◆ ~QTObject()

template<class T >
virtual QTObject< T >::~QTObject ( )
inlinevirtual

dtor

Definition at line 59 of file QTObject.hh.

Member Function Documentation

◆ ClassDef()

template<class T >
QTObject< T >::ClassDef ( QTObject< T >  ,
 
)
private

◆ Clear()

template<class T >
void QTObject< T >::Clear ( )
inline

clear members

Definition at line 61 of file QTObject.hh.

References QTObject< T >::fObject.

◆ Draw()

template<class T >
void QTObject< T >::Draw ( Option_t *  option = "")
inline

Draw root.

Definition at line 106 of file QTObject.hh.

References QTObject< T >::fObject.

◆ Dump()

template<class T >
virtual void QTObject< T >::Dump ( std::ostream &  o) const
inlinevirtual

print content to stream (intended for screen print or log files)

Definition at line 85 of file QTObject.hh.

◆ Duplicate()

template<class T >
QObject* QTObject< T >::Duplicate ( ) const
inline

create object of same type

Definition at line 79 of file QTObject.hh.

◆ Fill()

template<class T >
bool QTObject< T >::Fill ( Diana::QObject *  obj) const
inline

fill object of same type (like operator=)

Definition at line 69 of file QTObject.hh.

◆ operator=()

template<class T >
const QTObject<T>& QTObject< T >::operator= ( const T &  other)
inline

Definition at line 63 of file QTObject.hh.

References QTObject< T >::fObject.

◆ ReadFromStream()

template<class T >
virtual QError QTObject< T >::ReadFromStream ( std::istream &  o)
inlinevirtual

fill content from stream (intended for storage in text files)

Definition at line 98 of file QTObject.hh.

References err, and QERR_NOT_IMPLEMENTED.

◆ WriteOnStream()

template<class T >
virtual QError QTObject< T >::WriteOnStream ( std::ostream &  o) const
inlinevirtual

print content to stream (intended for storage in text files)

Definition at line 91 of file QTObject.hh.

References err, and QERR_NOT_IMPLEMENTED.

Member Data Documentation

◆ fObject

template<class T >
T QTObject< T >::fObject

TObject member.

Definition at line 110 of file QTObject.hh.

Referenced by QTObject< T >::Clear(), QTObject< T >::Draw(), QTObject< T >::operator=(), and QTObject< T >::QTObject().


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