Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QVectorI Class Reference

Interface for raw daq vectors in Diana. More...

Inheritance diagram for QVectorI:
QObject

Public Member Functions

 QVectorI ()
 
 QVectorI (const size_t size)
 
 QVectorI (const QVectorI &orig)
 
 QVectorI (const QVector &orig)
 
 QVectorI (const std::vector< int > &orig)
 
 QVectorI (const std::vector< double > &orig)
 
 ~QVectorI ()
 
const QVectorIoperator= (const QVectorI &orig)
 
const QVectorIoperator= (const QVector &orig)
 
const QVectorIoperator= (const std::vector< int > &orig)
 
const QVectorIoperator= (const std::vector< double > &orig)
 
void Resize (const size_t size)
 
size_t Size () const
 
void Clear ()
 reset members to default values More...
 
void Initialize (int val)
 
int & operator[] (size_t i)
 
int operator[] (size_t i) const
 
- Public Member Functions inherited from QObject
 QObject ()
 default constructor More...
 
virtual ~QObject ()
 destructor More...
 
QObjectoperator= (const QObject &rhs)
 operator= More...
 
void Validate ()
 make object valid More...
 
void InValidate ()
 make object non valid More...
 
bool IsValid () const
 check wheter object is valid More...
 
void SetWrite (bool write=true)
 write or not this object More...
 
bool GetWrite () const
 check wheter write or not this object More...
 
bool IsRequired () const
 check wheter this object is required by some module More...
 
void SetIsRequired (bool required=true)
 set that this object is required
More...
 
bool IsJustAdded () const
 check wheter this object has been just added by some module More...
 
void SetIsJustAdded (bool added=true)
 set that this object has been just added
More...
 
void Reset ()
 set object to non valid and calls Clear() More...
 
virtual bool Fill (QObject *evData) const =0
 calls operator= of inheriting classes. Validity flag and bits are not copied. This function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp. If evData type mismatches returns false, true otherwise. More...
 
void FullyFill (QObject *evData) const
 calls Fill(QObject*) if this QObject IsValid(). Copies Validity flag and bits More...
 
virtual QObjectDuplicate () const =0
 create object of same type, this function is automatically declared/implemented in derived classes by QObjectDef/QObjectImp More...
 
virtual void Dump (std::ostream &o) const
 print content to stream (intended for screen print or log files) More...
 
virtual void Print () const
 print content on screen 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 CopyBits (QObject *obj) const
 copy validity and temporary bits to another QObject More...
 
virtual void Draw (Option_t *option="")
 

Private Member Functions

 QObjectDef (QVectorI, 3)
 

Private Attributes

Int_t fSize
 size of the array More...
 
Int_t fAllocSize
 
Int_t * fData
 array More...
 

Additional Inherited Members

- Public Types inherited from QObject
enum  { kIsValid = BIT(15) , kWrite = BIT(0) , kIsRequired = BIT(1) , kIsJustAdded = BIT(2) }
 TObject bits. More...
 
- Static Public Member Functions inherited from QObject
static QObjectNew (const char *object)
 

Detailed Description

Interface for raw daq vectors in Diana.

Author
M. Vignati

Definition at line 18 of file QVectorI.hh.

Constructor & Destructor Documentation

◆ QVectorI() [1/6]

Q_BEGIN_NAMESPACE QVectorI::QVectorI ( )

Definition at line 11 of file QVectorI.cc.

References fAllocSize, fData, and fSize.

◆ QVectorI() [2/6]

QVectorI::QVectorI ( const size_t  size)

Definition at line 18 of file QVectorI.cc.

References fAllocSize, fData, fSize, and Resize().

◆ QVectorI() [3/6]

QVectorI::QVectorI ( const QVectorI orig)

Definition at line 27 of file QVectorI.cc.

References fAllocSize, fData, fSize, QObject::operator=(), and operator=().

◆ QVectorI() [4/6]

QVectorI::QVectorI ( const QVector orig)

Definition at line 36 of file QVectorI.cc.

References fAllocSize, fData, fSize, and operator=().

◆ QVectorI() [5/6]

QVectorI::QVectorI ( const std::vector< int > &  orig)

Definition at line 44 of file QVectorI.cc.

References fAllocSize, fData, fSize, and operator=().

◆ QVectorI() [6/6]

QVectorI::QVectorI ( const std::vector< double > &  orig)

Definition at line 52 of file QVectorI.cc.

References fAllocSize, fData, fSize, and operator=().

◆ ~QVectorI()

QVectorI::~QVectorI ( )

Definition at line 60 of file QVectorI.cc.

References fAllocSize, fData, and fSize.

Member Function Documentation

◆ Clear()

void QVectorI::Clear ( )
inlinevirtual

reset members to default values

Implements QObject.

Definition at line 47 of file QVectorI.hh.

References Resize().

◆ Initialize()

void QVectorI::Initialize ( int  val)

Definition at line 119 of file QVectorI.cc.

References fData, and fSize.

◆ operator=() [1/4]

const QVectorI & QVectorI::operator= ( const QVector orig)

Definition at line 100 of file QVectorI.cc.

References fData, fSize, Resize(), and QVector::Size().

◆ operator=() [2/4]

const QVectorI & QVectorI::operator= ( const QVectorI orig)

Definition at line 92 of file QVectorI.cc.

References fData, fSize, QObject::operator=(), Resize(), and Size().

Referenced by QVectorI().

◆ operator=() [3/4]

const QVectorI & QVectorI::operator= ( const std::vector< double > &  orig)

Definition at line 113 of file QVectorI.cc.

References fData, fSize, and Resize().

◆ operator=() [4/4]

const QVectorI & QVectorI::operator= ( const std::vector< int > &  orig)

Definition at line 107 of file QVectorI.cc.

References fData, fSize, and Resize().

◆ operator[]() [1/2]

int & QVectorI::operator[] ( size_t  i)

Definition at line 123 of file QVectorI.cc.

References DianaThrow, fData, fSize, and QERR_OUT_OF_RANGE.

◆ operator[]() [2/2]

int QVectorI::operator[] ( size_t  i) const

Definition at line 133 of file QVectorI.cc.

References DianaThrow, fData, fSize, Q_INT_DEFAULT, and QERR_OUT_OF_RANGE.

◆ QObjectDef()

QVectorI::QObjectDef ( QVectorI  ,
 
)
private

◆ Resize()

void QVectorI::Resize ( const size_t  size)

Definition at line 68 of file QVectorI.cc.

References fAllocSize, fData, and fSize.

Referenced by Clear(), operator=(), and QVectorI().

◆ Size()

size_t QVectorI::Size ( ) const
inline

Definition at line 45 of file QVectorI.hh.

References fSize.

Referenced by QVector::operator=(), and operator=().

Member Data Documentation

◆ fAllocSize

Int_t QVectorI::fAllocSize
private

Definition at line 59 of file QVectorI.hh.

Referenced by QVectorI(), Resize(), and ~QVectorI().

◆ fData

Int_t* QVectorI::fData
private

array

Definition at line 61 of file QVectorI.hh.

Referenced by Initialize(), operator=(), operator[](), QVectorI(), Resize(), and ~QVectorI().

◆ fSize

Int_t QVectorI::fSize
private

size of the array

Definition at line 57 of file QVectorI.hh.

Referenced by Initialize(), operator=(), operator[](), QVectorI(), Resize(), Size(), and ~QVectorI().


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