Skip to content

Commit bcf197b

Browse files
authored
Merge branch 'star-bnl:main' into main
2 parents f97f998 + b23f754 commit bcf197b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

StRoot/St_geant_Maker/GtHash.cxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#include "TMath.h"
21
#include "GtHash.h"
2+
#include "TString.h"
33

44
class GtCradle : public TObject
55
{
66
public:
77
Int_t fNWords; // number of words in array
8-
ULong_t *fArray; // array
8+
UInt_t *fArray; // array
99
void *fPointer; // user pointer
1010

1111
GtCradle(int n);
@@ -19,26 +19,26 @@ GtCradle(int n);
1919
GtCradle::GtCradle(int n)
2020
{
2121
fNWords = n;
22-
fArray = new ULong_t[fNWords];
22+
fArray = new UInt_t[fNWords];
2323
fPointer=0;
2424
}
2525

2626
Bool_t GtCradle::IsEqual(const TObject* obj) const
2727
{
2828
GtCradle *He = (GtCradle*)obj;
2929
if (fNWords != He->fNWords) return 0;
30-
ULong_t *me = fArray;
31-
ULong_t *he = He->fArray;
30+
UInt_t *me = fArray;
31+
UInt_t *he = He->fArray;
3232
if (me[0] != he[0]) return 0;
3333
for (int i=1; i<fNWords; i++) if (me[i]!=he[i]) return 0;
3434
return 1;
3535
}
3636
ULong_t GtCradle::Hash() const
3737
{
38-
ULong_t *me = (ULong_t *)fArray;
39-
ULong_t ret = fNWords;
38+
UInt_t *me = (UInt_t *)fArray;
39+
UInt_t ret = fNWords;
4040
//VP for (int i=0; i<fNWords; i++) ret ^= me[i];
41-
ret = TMath::Hash(me,fNWords*sizeof(ULong_t));
41+
ret = TString::Hash(me,fNWords*sizeof(UInt_t));
4242

4343
return ret;
4444
}
@@ -50,7 +50,7 @@ void *GtHash::GetPointer(void *array,Int_t narray)
5050
if (fPoka) delete fPoka;
5151
fPoka = new GtCradle(narray);}
5252

53-
memcpy(fPoka->fArray,array,narray*sizeof(ULong_t));
53+
memcpy(fPoka->fArray,array,narray*sizeof(UInt_t));
5454

5555
fFound = (GtCradle*)FindObject(fPoka);
5656
if (!fFound) return 0;

0 commit comments

Comments
 (0)