Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

StRoot/Stv*: replace sys/types.h with stdint.h #211

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions StRoot/Stv/Factory/FactoryT.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ class FactoryB : public TNamed
static int Alive(void *obj);

void setFastDelete() {fFastDel=1;}
void setMaxIncrementCount(uint maxCount) {fMaxCount=maxCount;}
uint getMaxIncrementCount() const {return fMaxCount; }
uint getCurrentSize() const {return fCurCount; }
uint getCurrentCount() const {return fCurCount; }
void setMaxIncrementCount(unsigned int maxCount) {fMaxCount=maxCount;}
unsigned int getMaxIncrementCount() const {return fMaxCount; }
unsigned int getCurrentSize() const {return fCurCount; }
unsigned int getCurrentCount() const {return fCurCount; }
protected:
uint fMaxCount;
uint fCurCount;
uint fUseCount;
uint fFastDel;
uint fInstCount;
uint fFreeCount;
unsigned int fMaxCount;
unsigned int fCurCount;
unsigned int fUseCount;
unsigned int fFastDel;
unsigned int fInstCount;
unsigned int fFreeCount;
static double fgTotal;
};

Expand Down
6 changes: 3 additions & 3 deletions StRoot/Stv/Factory/StvFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class StvBlock {
enum {kSize=100};
StvBlock(StvBlock **bTop,StvHolder<Object> **hTop,char *buf);
void reset(StvBlock **bTop,StvHolder<Object> **hTop);
uint getSize() const {return kSize;}
unsigned int getSize() const {return kSize;}

StvBlock *fNext;
char *fBuff;
Expand Down Expand Up @@ -119,7 +119,7 @@ Abstract *StvFactory<Concrete,Abstract>::getInstance()
this->fCurCount < this->fMaxCount);

if (this->fFastDel) {
uint nBuf = sizeof(StvBlock<Concrete>) + FENCE;
unsigned int nBuf = sizeof(StvBlock<Concrete>) + FENCE;
char *cBuf = new char[nBuf];
cBuf[nBuf-1]=46;
new((StvBlock<Concrete>*)cBuf) StvBlock<Concrete>(&fBTop,&fHTop,cBuf);
Expand All @@ -144,7 +144,7 @@ Abstract *StvFactory<Concrete,Abstract>::getInstance()
template <class Concrete, class Abstract>
void StvFactory<Concrete,Abstract>::free(Abstract *obj)
{
static const uint shift = (char*)(&(((StvHolder<Concrete>*)1)->fObj))-(char*)1;
static const unsigned int shift = (char*)(&(((StvHolder<Concrete>*)1)->fObj))-(char*)1;
obj->unset();
StvHolder<Concrete>* h = (StvHolder<Concrete>*)((char*)obj-shift);
assert(h->fFact == this);
Expand Down
2 changes: 1 addition & 1 deletion StRoot/StvMaker/StvHitLoader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int knt=0;knt++;
if (tk->GetHA(x)<1./1000) seed = 0;
} }
//VP if (mStvHit->IsCombo()) seed = 0;
hard *= (uint)kMaxDetectorId; hard+=(uint)did;
hard *= (unsigned int)kMaxDetectorId; hard+=(unsigned int)did;

const StHitPlane *hp = tgh->AddHit(mStvHit,mDetId,xyz,hard,seed);
sure = tgh->IsGoodHit();
Expand Down