//*-- Author :    Damir Buskulic   22/05/02

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// VFrVectObject                                                        //
//                                                                      //
// Encapsulates an FrVect structure. Mainly used in the VSignal and     //
// VSignalManager classes. It is also the output of a frame channel's   //
// GetSignal classes, which may be adopted by VSignal objects, without  //
// fear that the user may want to get the ownership.                    //
// This class is a helper class and should not be used or taken care of //
// by users                                                             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "VFrVectObject.h"
#include "TMath.h"

ClassImp(VFrVectObject)

//______________________________________________________________________________
VFrVectObject::VFrVectObject()
{
// default constructor
   mVect = 0;
   mCount = 0;
}

//______________________________________________________________________________
VFrVectObject::VFrVectObject(FrVect* vect)
{
// Constructor
   mVect = vect;
   mCount = 1;
}

//______________________________________________________________________________
VFrVectObject::~VFrVectObject()
{
// Destructor. Should have destroyed the vector with delete before.
// This is not perfect but works for the time being 

}

//______________________________________________________________________________
 ULong_t VFrVectObject::Hash() const
{
// Return hash value for this VFrVectObject. Used for inclusion in THashTable

   const void *ptr = GetFrVect();
   return TMath::Hash(&ptr, sizeof(void*));
}

//______________________________________________________________________________
 void VFrVectObject::Delete(Option_t* opt)
{
// Delete the frame vector

   if (mCount==0) {printf("here Delete n");FrVectFree(mVect);}
}

//______________________________________________________________________________
 Bool_t VFrVectObject::IsEqual(const TObject *obj) const
{
   // Default equal comparison (VFrVectObjects are equal if they point to the same
   // FrVect in memory).

   Bool_t result = (((VFrVectObject*)obj)->GetFrVect() == GetFrVect());
   return result;
}


- ROOT page - VEGA page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to , or contact with any questions or problems regarding ROOT or VEGA.