12 ~
GtCradle(){
if (fArray)
delete [] fArray;};
15 virtual Bool_t IsEqual(
const TObject* obj)
const;
16 virtual ULong_t Hash()
const;
19 GtCradle::GtCradle(
int n)
22 fArray =
new ULong_t[fNWords];
26 Bool_t GtCradle::IsEqual(
const TObject* obj)
const
29 if (fNWords != He->fNWords)
return 0;
31 ULong_t *he = He->fArray;
32 if (me[0] != he[0])
return 0;
33 for (
int i=1; i<fNWords; i++)
if (me[i]!=he[i])
return 0;
36 ULong_t GtCradle::Hash()
const
38 ULong_t *me = (ULong_t *)fArray;
39 ULong_t ret = fNWords;
41 ret = TMath::Hash(me,fNWords*
sizeof(ULong_t));
45 GtHash::~GtHash(){Delete();
if (fPoka)
delete fPoka;};
47 void *GtHash::GetPointer(
void *array,Int_t narray)
49 if (!fPoka || fPoka->fNWords!=narray) {
50 if (fPoka)
delete fPoka;
53 memcpy(fPoka->fArray,array,narray*
sizeof(ULong_t));
60 void GtHash::SetPointer(
void *ptr)
65 fPoka->fPointer = ptr;
70 Int_t GtHash::GetNParams()
73 const void *GtHash::GetParams()
GtCradle * fFound
Cradle pointer.