From e5522a1ab9f9e583d1003bbd6118f2cb9b45b307 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Aug 2025 20:01:36 +0200 Subject: [PATCH 1/7] [nfc] consistent renaming of all buffersize variables --- core/base/inc/TBuffer.h | 14 +++++++------- core/base/src/TBuffer.cxx | 18 +++++++++--------- core/cont/src/TCollection.cxx | 10 +++++----- core/cont/src/TMap.cxx | 12 ++++++------ graf3d/g3d/inc/TXTRU.h | 2 +- graf3d/g3d/src/TXTRU.cxx | 4 ++-- graf3d/gl/src/TGLOutput.cxx | 12 ++++++------ graf3d/gl/src/TGLPlotPainter.cxx | 6 +++--- hist/hist/inc/TH1.h | 4 ++-- hist/hist/inc/TProfile.h | 2 +- hist/hist/inc/TProfile2D.h | 2 +- hist/hist/inc/TProfile3D.h | 2 +- hist/hist/src/TH1.cxx | 10 +++++----- hist/hist/src/TProfile.cxx | 8 ++++---- hist/hist/src/TProfile2D.cxx | 8 ++++---- hist/hist/src/TProfile3D.cxx | 8 ++++---- hist/histpainter/src/TPainter3dAlgorithms.cxx | 4 ++-- io/io/inc/TBufferFile.h | 4 ++-- io/io/inc/TBufferIO.h | 4 ++-- io/io/inc/TFile.h | 6 +++--- io/io/inc/TFileCacheRead.h | 2 +- io/io/inc/TFileCacheWrite.h | 2 +- io/io/src/TBufferFile.cxx | 8 ++++---- io/io/src/TBufferIO.cxx | 6 +++--- io/io/src/TFile.cxx | 14 +++++++------- io/io/src/TFileCacheRead.cxx | 12 ++++++------ io/io/src/TFileCacheWrite.cxx | 12 ++++++------ io/sql/inc/TSQLFile.h | 2 +- net/net/inc/TMessage.h | 2 +- net/net/inc/TParallelMergingFile.h | 4 ++-- net/net/src/TMessage.cxx | 4 ++-- net/net/src/TParallelMergingFile.cxx | 4 ++-- tree/ntuple/src/RFieldMeta.cxx | 4 ++-- tree/tree/inc/TBranch.h | 2 +- tree/tree/inc/TBranchClones.h | 2 +- tree/tree/inc/TBranchElement.h | 2 +- tree/tree/inc/TBranchObject.h | 2 +- tree/tree/inc/TBranchSTL.h | 4 ++-- tree/tree/inc/TTreeCache.h | 2 +- tree/tree/src/TBranch.cxx | 6 +++--- tree/tree/src/TBranchClones.cxx | 4 ++-- tree/tree/src/TBranchElement.cxx | 4 ++-- tree/tree/src/TBranchObject.cxx | 4 ++-- tree/tree/src/TBranchSTL.cxx | 18 +++++++++--------- tree/tree/src/TBufferSQL.cxx | 8 ++++---- tree/tree/src/TTree.cxx | 8 ++++---- tree/tree/src/TTreeCache.cxx | 4 ++-- tree/tree/src/TTreeCacheUnzip.cxx | 2 +- 48 files changed, 144 insertions(+), 144 deletions(-) diff --git a/core/base/inc/TBuffer.h b/core/base/inc/TBuffer.h index 12c14d3e52c69..e383bb738d672 100644 --- a/core/base/inc/TBuffer.h +++ b/core/base/inc/TBuffer.h @@ -64,10 +64,10 @@ class TBuffer : public TObject { void operator=(const TBuffer &) = delete; Int_t Read(const char *name) override { return TObject::Read(name); } - Int_t Write(const char *name, Int_t opt, Int_t bufs) override - { return TObject::Write(name, opt, bufs); } - Int_t Write(const char *name, Int_t opt, Int_t bufs) const override - { return TObject::Write(name, opt, bufs); } + Int_t Write(const char *name, Int_t opt, Int_t bufsize) override + { return TObject::Write(name, opt, bufsize); } + Int_t Write(const char *name, Int_t opt, Int_t bufsize) const override + { return TObject::Write(name, opt, bufsize); } public: enum EMode { kRead = 0, kWrite = 1 }; @@ -78,8 +78,8 @@ class TBuffer : public TObject { enum { kInitialSize = 1024, kMinimalSize = 128 }; TBuffer(EMode mode); - TBuffer(EMode mode, Int_t bufsiz); - TBuffer(EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); + TBuffer(EMode mode, Int_t bufsize); + TBuffer(EMode mode, Int_t bufsize, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); virtual ~TBuffer(); Int_t GetBufferVersion() const { return fVersion; } @@ -87,7 +87,7 @@ class TBuffer : public TObject { Bool_t IsWriting() const { return (fMode & kWrite) != 0; } void SetReadMode(); void SetWriteMode(); - void SetBuffer(void *buf, UInt_t bufsiz = 0, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); + void SetBuffer(void *buf, UInt_t bufsize = 0, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); ReAllocCharFun_t GetReAllocFunc() const; void SetReAllocFunc(ReAllocCharFun_t reallocfunc = nullptr); void SetBufferOffset(Int_t offset = 0) { fBufCur = fBuffer+offset; } diff --git a/core/base/src/TBuffer.cxx b/core/base/src/TBuffer.cxx index a5e1b96a65961..daaf8d1d450d0 100644 --- a/core/base/src/TBuffer.cxx +++ b/core/base/src/TBuffer.cxx @@ -70,11 +70,11 @@ TBuffer::TBuffer(EMode mode) /// Create an I/O buffer object. Mode should be either TBuffer::kRead or /// TBuffer::kWrite. -TBuffer::TBuffer(EMode mode, Int_t bufsiz) +TBuffer::TBuffer(EMode mode, Int_t bufsize) { - if (bufsiz < 0) - Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz, kMaxBufferSize); - if (bufsiz < kMinimalSize) bufsiz = kMinimalSize; + if (bufsize < 0) + Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize); + if (bufsize < kMinimalSize) bufsiz = kMinimalSize; fBufSize = bufsiz; fMode = mode; fVersion = 0; @@ -101,11 +101,11 @@ TBuffer::TBuffer(EMode mode, Int_t bufsiz) /// is provided, a Fatal error will be issued if the Buffer attempts to /// expand. -TBuffer::TBuffer(EMode mode, Int_t bufsiz, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) +TBuffer::TBuffer(EMode mode, Int_t bufsize, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) { - if (bufsiz < 0) - Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsiz, kMaxBufferSize); - fBufSize = bufsiz; + if (bufsize < 0) + Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize); + fBufSize = bufsize; fMode = mode; fVersion = 0; fParent = nullptr; @@ -283,7 +283,7 @@ ReAllocCharFun_t TBuffer::GetReAllocFunc() const /// Set which memory reallocation method to use. If reallocafunc is null, /// reset it to the default value (TStorage::ReAlloc) -void TBuffer::SetReAllocFunc(ReAllocCharFun_t reallocfunc ) +void TBuffer::SetReAllocFunc(ReAllocCharFun_t reallocfunc) { if (reallocfunc) { fReAllocFunc = reallocfunc; diff --git a/core/cont/src/TCollection.cxx b/core/cont/src/TCollection.cxx index 4268f6666dd5e..8380df1f53e24 100644 --- a/core/cont/src/TCollection.cxx +++ b/core/cont/src/TCollection.cxx @@ -678,17 +678,17 @@ void TCollection::Streamer(TBuffer &b) /// objects using a single key specify a name and set option to /// TObject::kSingleKey (i.e. 1). -Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const +Int_t TCollection::Write(const char *name, Int_t option, Int_t bufsize) const { if ((option & kSingleKey)) { - return TObject::Write(name, option, bsize); + return TObject::Write(name, option, bufsize); } else { option &= ~kSingleKey; Int_t nbytes = 0; TIter next(this); TObject *obj; while ((obj = next())) { - nbytes += obj->Write(name, option, bsize); + nbytes += obj->Write(name, option, bufsize); } return nbytes; } @@ -702,9 +702,9 @@ Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) const /// objects using a single key specify a name and set option to /// TObject::kSingleKey (i.e. 1). -Int_t TCollection::Write(const char *name, Int_t option, Int_t bsize) +Int_t TCollection::Write(const char *name, Int_t option, Int_t bufsize) { - return ((const TCollection*)this)->Write(name,option,bsize); + return ((const TCollection*)this)->Write(name,option,bufsize); } //////////////////////////////////////////////////////////////////////////////// diff --git a/core/cont/src/TMap.cxx b/core/cont/src/TMap.cxx index f4631c8bb0aef..89abc3e1a45e4 100644 --- a/core/cont/src/TMap.cxx +++ b/core/cont/src/TMap.cxx @@ -402,10 +402,10 @@ void TMap::Streamer(TBuffer &b) /// objects using a single key specify a name and set option to /// TObject::kSingleKey (i.e. 1). -Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const +Int_t TMap::Write(const char *name, Int_t option, Int_t bufsize) const { if ((option & kSingleKey)) { - return TObject::Write(name, option, bsize); + return TObject::Write(name, option, bufsize); } else { option &= ~kSingleKey; Int_t nbytes = 0; @@ -413,9 +413,9 @@ Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const TPair *a; while ((a = (TPair*) next())) { if (a->Key()) - nbytes += a->Key()->Write(name, option, bsize); + nbytes += a->Key()->Write(name, option, bufsize); if (a->Value()) - nbytes += a->Value()->Write(name, option, bsize); + nbytes += a->Value()->Write(name, option, bufsize); } return nbytes; } @@ -429,9 +429,9 @@ Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) const /// objects using a single key specify a name and set option to /// TObject::kSingleKey (i.e. 1). -Int_t TMap::Write(const char *name, Int_t option, Int_t bsize) +Int_t TMap::Write(const char *name, Int_t option, Int_t bufsize) { - return ((const TMap*)this)->Write(name,option,bsize); + return ((const TMap*)this)->Write(name,option,bufsize); } /** \class TPair diff --git a/graf3d/g3d/inc/TXTRU.h b/graf3d/g3d/inc/TXTRU.h index 4fefcc3329ced..0a763127a21c0 100644 --- a/graf3d/g3d/inc/TXTRU.h +++ b/graf3d/g3d/inc/TXTRU.h @@ -87,7 +87,7 @@ class TXTRU : public TShape { private: void DumpPoints(int npoints, float *pointbuff) const; void DumpSegments(int nsegments, int *segbuff) const; - void DumpPolygons(int npolygons, int *polybuff, int buffsize) const; + void DumpPolygons(int npolygons, int *polybuff, int bufsize) const; ClassDefOverride(TXTRU,1) //TXTRU shape }; diff --git a/graf3d/g3d/src/TXTRU.cxx b/graf3d/g3d/src/TXTRU.cxx index 17585b6356ed1..82ce1f9b8e80a 100644 --- a/graf3d/g3d/src/TXTRU.cxx +++ b/graf3d/g3d/src/TXTRU.cxx @@ -709,7 +709,7 @@ void TXTRU::DumpSegments(int nsegments, int *segbuff) const //////////////////////////////////////////////////////////////////////////////// /// Dump the derived polygon info for visual inspection -void TXTRU::DumpPolygons(int npolygons, int *polybuff, int buffsize) const +void TXTRU::DumpPolygons(int npolygons, int *polybuff, int bufsize) const { std::cout << "TXTRU::DumpPolygons - " << npolygons << " polygons" << std::endl; int ioff = 0; @@ -729,7 +729,7 @@ void TXTRU::DumpPolygons(int npolygons, int *polybuff, int buffsize) const } std::cout << polybuff[ioff++] << ")" << std::endl; } - std::cout << " buffer size " << buffsize << " last used " << --ioff << std::endl; + std::cout << " buffer size " << bufsize << " last used " << --ioff << std::endl; } //////////////////////////////////////////////////////////////////////////////// diff --git a/graf3d/gl/src/TGLOutput.cxx b/graf3d/gl/src/TGLOutput.cxx index 88c80df953efd..aae123cd8e8f7 100644 --- a/graf3d/gl/src/TGLOutput.cxx +++ b/graf3d/gl/src/TGLOutput.cxx @@ -104,16 +104,16 @@ Bool_t TGLOutput::CapturePostscript(TGLViewer & viewer, EFormat format, const ch assert(kFALSE); return kFALSE; } - Int_t buffsize = 0, state = GL2PS_OVERFLOW; + Int_t bufsize = 0, state = GL2PS_OVERFLOW; viewer.DoDraw(); viewer.fIsPrinting = kTRUE; while (state == GL2PS_OVERFLOW) { - buffsize += 1024*1024; + bufsize += 1024*1024; gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr, gl2psFormat, gl2psSort, GL2PS_USE_CURRENT_VIEWPORT | GL2PS_SILENT | GL2PS_BEST_ROOT | GL2PS_OCCLUSION_CULL | 0, GL_RGBA, 0, nullptr,0, 0, 0, - buffsize, output, nullptr); + bufsize, output, nullptr); viewer.DoDraw(); state = gl2psEndPage(); std::cout << "."; @@ -210,17 +210,17 @@ void TGLOutput::Capture(TGLViewer & viewer) Int_t gl2psFormat = GL2PS_EPS; Int_t gl2psSort = GL2PS_BSP_SORT; - Int_t buffsize = 0, state = GL2PS_OVERFLOW; + Int_t bufsize = 0, state = GL2PS_OVERFLOW; viewer.DoDraw(); viewer.fIsPrinting = kTRUE; while (state == GL2PS_OVERFLOW) { - buffsize += 1024*1024; + bufsize += 1024*1024; gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr, gl2psFormat, gl2psSort, GL2PS_USE_CURRENT_VIEWPORT | GL2PS_SILENT | GL2PS_BEST_ROOT | GL2PS_OCCLUSION_CULL | 0, GL_RGBA, 0, nullptr,0, 0, 0, - buffsize, output, nullptr); + bufsize, output, nullptr); viewer.DoDraw(); state = gl2psEndPage(); std::cout << "."; diff --git a/graf3d/gl/src/TGLPlotPainter.cxx b/graf3d/gl/src/TGLPlotPainter.cxx index 0d60cb1d31bab..952be70a19e0c 100644 --- a/graf3d/gl/src/TGLPlotPainter.cxx +++ b/graf3d/gl/src/TGLPlotPainter.cxx @@ -243,7 +243,7 @@ void TGLPlotPainter::PrintPlot()const Int_t gl2psFormat = GL2PS_EPS; Int_t gl2psSort = GL2PS_BSP_SORT; - Int_t buffsize = 0; + Int_t bufsize = 0; Int_t state = GL2PS_OVERFLOW; GLint gl2psoption = GL2PS_USE_CURRENT_VIEWPORT | GL2PS_SILENT | @@ -252,11 +252,11 @@ void TGLPlotPainter::PrintPlot()const 0; while (state == GL2PS_OVERFLOW) { - buffsize += 1024*1024; + bufsize += 1024*1024; gl2psBeginPage ("ROOT Scene Graph", "ROOT", nullptr, gl2psFormat, gl2psSort, gl2psoption, GL_RGBA, 0, nullptr,0, 0, 0, - buffsize, output, nullptr); + bufsize, output, nullptr); DrawPlot(); state = gl2psEndPage(); } diff --git a/hist/hist/inc/TH1.h b/hist/hist/inc/TH1.h index 241cd2de75f98..5cc6fc7ef3ae4 100644 --- a/hist/hist/inc/TH1.h +++ b/hist/hist/inc/TH1.h @@ -628,13 +628,13 @@ class TH1 : public TNamed, public TAttLine, public TAttFill, public TAttMarker { const Double_t *zBins); virtual void SetBinsLength(Int_t = -1) { } //redefined in derived classes virtual void SetBinErrorOption(EBinErrorOpt type) { fBinStatErrOpt = type; } - virtual void SetBuffer(Int_t buffersize, Option_t *option=""); + virtual void SetBuffer(Int_t bufsize, Option_t *option=""); virtual UInt_t SetCanExtend(UInt_t extendBitMask); virtual void SetContent(const Double_t *content); virtual void SetContour(Int_t nlevels, const Double_t *levels = nullptr); virtual void SetContourLevel(Int_t level, Double_t value); virtual void SetColors(Color_t linecolor = -1, Color_t markercolor = -1, Color_t fillcolor = -1); - static void SetDefaultBufferSize(Int_t buffersize=1000); + static void SetDefaultBufferSize(Int_t bufsize=1000); static void SetDefaultSumw2(Bool_t sumw2=kTRUE); virtual void SetDirectory(TDirectory *dir); virtual void SetEntries(Double_t n) { fEntries = n; } diff --git a/hist/hist/inc/TProfile.h b/hist/hist/inc/TProfile.h index 724746de07111..2149b1b478aea 100644 --- a/hist/hist/inc/TProfile.h +++ b/hist/hist/inc/TProfile.h @@ -131,7 +131,7 @@ class TProfile : public TH1D { void SetBins(Int_t nbins, Double_t xmin, Double_t xmax) override; void SetBins(Int_t nx, const Double_t *xbins) override; void SetBinsLength(Int_t n=-1) override; - void SetBuffer(Int_t buffersize, Option_t *option="") override; + void SetBuffer(Int_t bufsize, Option_t *option="") override; virtual void SetErrorOption(Option_t *option=""); // *MENU* void Sumw2(Bool_t flag = kTRUE) override; diff --git a/hist/hist/inc/TProfile2D.h b/hist/hist/inc/TProfile2D.h index ac498cf705251..f7a0edc755600 100644 --- a/hist/hist/inc/TProfile2D.h +++ b/hist/hist/inc/TProfile2D.h @@ -145,7 +145,7 @@ class TProfile2D : public TH2D { void SetBins(Int_t nbinsx, Double_t xmin, Double_t xmax, Int_t nbinsy, Double_t ymin, Double_t ymax) override; void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t *yBins) override; void SetBinsLength(Int_t n=-1) override; - void SetBuffer(Int_t buffersize, Option_t *option="") override; + void SetBuffer(Int_t bufsize, Option_t *option="") override; virtual void SetErrorOption(Option_t *option=""); // *MENU* void Sumw2(Bool_t flag = kTRUE) override; Double_t GetNumberOfBins() { return fBinEntries.GetSize(); } diff --git a/hist/hist/inc/TProfile3D.h b/hist/hist/inc/TProfile3D.h index 2eab0fde45bb7..4fe600436ff10 100644 --- a/hist/hist/inc/TProfile3D.h +++ b/hist/hist/inc/TProfile3D.h @@ -143,7 +143,7 @@ class TProfile3D : public TH3D { void SetBins(Int_t nx, const Double_t *xBins, Int_t ny, const Double_t * yBins, Int_t nz, const Double_t *zBins) override; void SetBinsLength(Int_t n=-1) override; - void SetBuffer(Int_t buffersize, Option_t *opt="") override; + void SetBuffer(Int_t bufsize, Option_t *opt="") override; virtual void SetErrorOption(Option_t *option=""); // *MENU* void Sumw2(Bool_t flag = kTRUE) override; diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index 1bb323f675883..d07d207b05653 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -6728,9 +6728,9 @@ UInt_t TH1::GetAxisLabelStatus() const /// or equal to its upper limit, the function SetBuffer is automatically /// called with the default buffer size. -void TH1::SetDefaultBufferSize(Int_t buffersize) +void TH1::SetDefaultBufferSize(Int_t bufsize) { - fgBufferSize = buffersize > 0 ? buffersize : 0; + fgBufferSize = bufsize > 0 ? bufsize : 0; } //////////////////////////////////////////////////////////////////////////////// @@ -8486,18 +8486,18 @@ Double_t TH1::GetContourLevelPad(Int_t level) const //////////////////////////////////////////////////////////////////////////////// /// Set the maximum number of entries to be kept in the buffer. -void TH1::SetBuffer(Int_t buffersize, Option_t * /*option*/) +void TH1::SetBuffer(Int_t bufsize, Option_t * /*option*/) { if (fBuffer) { BufferEmpty(); delete [] fBuffer; fBuffer = nullptr; } - if (buffersize <= 0) { + if (bufsize <= 0) { fBufferSize = 0; return; } - if (buffersize < 100) buffersize = 100; + if (bufsize < 100) bufsize = 100; fBufferSize = 1 + buffersize*(fDimension+1); fBuffer = new Double_t[fBufferSize]; memset(fBuffer, 0, sizeof(Double_t)*fBufferSize); diff --git a/hist/hist/src/TProfile.cxx b/hist/hist/src/TProfile.cxx index 8cd32048ba9da..80d5247596a4a 100644 --- a/hist/hist/src/TProfile.cxx +++ b/hist/hist/src/TProfile.cxx @@ -1742,19 +1742,19 @@ void TProfile::SetBinsLength(Int_t n) //////////////////////////////////////////////////////////////////////////////// /// Set the buffer size in units of 8 bytes (double). -void TProfile::SetBuffer(Int_t buffersize, Option_t *) +void TProfile::SetBuffer(Int_t bufsize, Option_t *) { if (fBuffer) { BufferEmpty(); delete [] fBuffer; fBuffer = nullptr; } - if (buffersize <= 0) { + if (bufsize <= 0) { fBufferSize = 0; return; } - if (buffersize < 100) buffersize = 100; - fBufferSize = 1 + 3*buffersize; + if (bufsize < 100) bufsize = 100; + fBufferSize = 1 + 3*bufsize; fBuffer = new Double_t[fBufferSize]; memset(fBuffer,0,sizeof(Double_t)*fBufferSize); } diff --git a/hist/hist/src/TProfile2D.cxx b/hist/hist/src/TProfile2D.cxx index 63f8136c1c1d5..aad49759731bf 100644 --- a/hist/hist/src/TProfile2D.cxx +++ b/hist/hist/src/TProfile2D.cxx @@ -1995,19 +1995,19 @@ void TProfile2D::SetBinsLength(Int_t n) //////////////////////////////////////////////////////////////////////////////// /// Set the buffer size in units of 8 bytes (double). -void TProfile2D::SetBuffer(Int_t buffersize, Option_t *) +void TProfile2D::SetBuffer(Int_t bufsize, Option_t *) { if (fBuffer) { BufferEmpty(); delete [] fBuffer; fBuffer = nullptr; } - if (buffersize <= 0) { + if (bufsize <= 0) { fBufferSize = 0; return; } - if (buffersize < 100) buffersize = 100; - fBufferSize = 1 + 4*buffersize; + if (bufsize < 100) bufsize = 100; + fBufferSize = 1 + 4*bufsize; fBuffer = new Double_t[fBufferSize]; memset(fBuffer,0,sizeof(Double_t)*fBufferSize); } diff --git a/hist/hist/src/TProfile3D.cxx b/hist/hist/src/TProfile3D.cxx index 8f7745d28cdd8..8703c8d30577e 100644 --- a/hist/hist/src/TProfile3D.cxx +++ b/hist/hist/src/TProfile3D.cxx @@ -1364,19 +1364,19 @@ void TProfile3D::SetBinsLength(Int_t n) //////////////////////////////////////////////////////////////////////////////// /// Set the buffer size in units of 8 bytes (double). -void TProfile3D::SetBuffer(Int_t buffersize, Option_t *) +void TProfile3D::SetBuffer(Int_t bufsize, Option_t *) { if (fBuffer) { BufferEmpty(); delete [] fBuffer; fBuffer = nullptr; } - if (buffersize <= 0) { + if (bufsize <= 0) { fBufferSize = 0; return; } - if (buffersize < 100) buffersize = 100; - fBufferSize = 1 + 5*buffersize; + if (bufsize < 100) bufsize = 100; + fBufferSize = 1 + 5*bufsize; fBuffer = new Double_t[fBufferSize]; memset(fBuffer,0,sizeof(Double_t)*fBufferSize); } diff --git a/hist/histpainter/src/TPainter3dAlgorithms.cxx b/hist/histpainter/src/TPainter3dAlgorithms.cxx index c3ceed5fcdb76..94da4349b38d9 100644 --- a/hist/histpainter/src/TPainter3dAlgorithms.cxx +++ b/hist/histpainter/src/TPainter3dAlgorithms.cxx @@ -2000,8 +2000,8 @@ void TPainter3dAlgorithms::InitRaster(Double_t xmin, Double_t ymin, Double_t xma fDYrast = ymax - ymin; // Create buffer for raster - Int_t buffersize = nx*ny/30 + 1; - fRaster.resize(buffersize); + Int_t bufsize = nx*ny/30 + 1; + fRaster.resize(bufsize); // S E T M A S K S k = 0; diff --git a/io/io/inc/TBufferFile.h b/io/io/inc/TBufferFile.h index 57ca611463a8d..5aaf5f1916f83 100644 --- a/io/io/inc/TBufferFile.h +++ b/io/io/inc/TBufferFile.h @@ -69,8 +69,8 @@ class TBufferFile : public TBufferIO { enum { kStreamedMemberWise = BIT(14) }; //added to version number to know if a collection has been stored member-wise TBufferFile(TBuffer::EMode mode); - TBufferFile(TBuffer::EMode mode, Int_t bufsiz); - TBufferFile(TBuffer::EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); + TBufferFile(TBuffer::EMode mode, Int_t bufsize); + TBufferFile(TBuffer::EMode mode, Int_t bufsize, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); ~TBufferFile() override; Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss) override; diff --git a/io/io/inc/TBufferIO.h b/io/io/inc/TBufferIO.h index 09265c90377b4..1500beed2616e 100644 --- a/io/io/inc/TBufferIO.h +++ b/io/io/inc/TBufferIO.h @@ -44,8 +44,8 @@ class TBufferIO : public TBuffer { TBufferIO() {} // NOLINT: not allowed to use = default because of TObject::kIsOnHeap detection, see ROOT-10300 TBufferIO(TBuffer::EMode mode); - TBufferIO(TBuffer::EMode mode, Int_t bufsiz); - TBufferIO(TBuffer::EMode mode, Int_t bufsiz, void *buf, Bool_t adopt = kTRUE, + TBufferIO(TBuffer::EMode mode, Int_t bufsize); + TBufferIO(TBuffer::EMode mode, Int_t bufsize, void *buf, Bool_t adopt = kTRUE, ReAllocCharFun_t reallocfunc = nullptr); //////////////////////////////////////////////////////////////////////////////// diff --git a/io/io/inc/TFile.h b/io/io/inc/TFile.h index 669030ef432c6..c8518369493d0 100644 --- a/io/io/inc/TFile.h +++ b/io/io/inc/TFile.h @@ -286,7 +286,7 @@ class TFile : public TDirectoryFile { void Close(Option_t *option="") override; // *MENU* void Copy(TObject &) const override { MayNotUse("Copy(TObject &)"); } - virtual Bool_t Cp(const char *dst, Bool_t progressbar = kTRUE,UInt_t buffersize = 1000000); + virtual Bool_t Cp(const char *dst, Bool_t progressbar = kTRUE,UInt_t bufsize = 1000000); virtual TKey* CreateKey(TDirectory* mother, const TObject* obj, const char* name, Int_t bufsize); virtual TKey* CreateKey(TDirectory* mother, const void* obj, const TClass* cl, const char* name, Int_t bufsize); @@ -375,8 +375,8 @@ class TFile : public TDirectoryFile { Int_t Sizeof() const override; void SumBuffer(Int_t bufsize); virtual Bool_t WriteBuffer(const char *buf, Int_t len); - Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override; - Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) const override; + Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override; + Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) const override; virtual void WriteFree(); virtual void WriteHeader(); virtual UShort_t WriteProcessID(TProcessID *pid); diff --git a/io/io/inc/TFileCacheRead.h b/io/io/inc/TFileCacheRead.h index 7bd232693e232..0f05c7e8bb199 100644 --- a/io/io/inc/TFileCacheRead.h +++ b/io/io/inc/TFileCacheRead.h @@ -78,7 +78,7 @@ class TFileCacheRead : public TObject { public: TFileCacheRead(); - TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree = nullptr); + TFileCacheRead(TFile *file, Int_t bufsize, TObject *tree = nullptr); ~TFileCacheRead() override; virtual Int_t AddBranch(TBranch * /*b*/, Bool_t /*subbranches*/ = kFALSE) { return 0; } virtual Int_t AddBranch(const char * /*branch*/, Bool_t /*subbranches*/ = kFALSE) { return 0; } diff --git a/io/io/inc/TFileCacheWrite.h b/io/io/inc/TFileCacheWrite.h index 10cdeba203f80..83366eabcfc68 100644 --- a/io/io/inc/TFileCacheWrite.h +++ b/io/io/inc/TFileCacheWrite.h @@ -32,7 +32,7 @@ class TFileCacheWrite : public TObject { public: TFileCacheWrite(); - TFileCacheWrite(TFile *file, Int_t buffersize); + TFileCacheWrite(TFile *file, Int_t bufsize); ~TFileCacheWrite() override; virtual Bool_t Flush(); virtual Int_t GetBytesInCache() const { return fNtot; } diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx index 8b589bdde6883..a6248a808f9a8 100644 --- a/io/io/src/TBufferFile.cxx +++ b/io/io/src/TBufferFile.cxx @@ -85,8 +85,8 @@ TBufferFile::TBufferFile(TBuffer::EMode mode) /// Create an I/O buffer object. Mode should be either TBuffer::kRead or /// TBuffer::kWrite. -TBufferFile::TBufferFile(TBuffer::EMode mode, Int_t bufsiz) - :TBufferIO(mode,bufsiz), +TBufferFile::TBufferFile(TBuffer::EMode mode, Int_t bufsize) + :TBufferIO(mode,bufsize), fInfo(nullptr), fInfoStack() { } @@ -102,8 +102,8 @@ TBufferFile::TBufferFile(TBuffer::EMode mode, Int_t bufsiz) /// is provided, a Fatal error will be issued if the Buffer attempts to /// expand. -TBufferFile::TBufferFile(TBuffer::EMode mode, Int_t bufsiz, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) : - TBufferIO(mode,bufsiz,buf,adopt,reallocfunc), +TBufferFile::TBufferFile(TBuffer::EMode mode, Int_t bufsize, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) : + TBufferIO(mode,bufsize,buf,adopt,reallocfunc), fInfo(nullptr), fInfoStack() { } diff --git a/io/io/src/TBufferIO.cxx b/io/io/src/TBufferIO.cxx index 1e1fa5fe65e59..fe2efabeaa052 100644 --- a/io/io/src/TBufferIO.cxx +++ b/io/io/src/TBufferIO.cxx @@ -48,7 +48,7 @@ TBufferIO::TBufferIO(TBuffer::EMode mode) : TBuffer(mode) //////////////////////////////////////////////////////////////////////////////// /// constructor -TBufferIO::TBufferIO(TBuffer::EMode mode, Int_t bufsiz) : TBuffer(mode, bufsiz) +TBufferIO::TBufferIO(TBuffer::EMode mode, Int_t bufsize) : TBuffer(mode, bufsize) { fMapSize = fgMapSize; } @@ -56,8 +56,8 @@ TBufferIO::TBufferIO(TBuffer::EMode mode, Int_t bufsiz) : TBuffer(mode, bufsiz) //////////////////////////////////////////////////////////////////////////////// /// constructor -TBufferIO::TBufferIO(TBuffer::EMode mode, Int_t bufsiz, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) - : TBuffer(mode, bufsiz, buf, adopt, reallocfunc) +TBufferIO::TBufferIO(TBuffer::EMode mode, Int_t bufsize, void *buf, Bool_t adopt, ReAllocCharFun_t reallocfunc) + : TBuffer(mode, bufsize, buf, adopt, reallocfunc) { fMapSize = fgMapSize; } diff --git a/io/io/src/TFile.cxx b/io/io/src/TFile.cxx index a4162bffbe56c..b428ff031dd07 100644 --- a/io/io/src/TFile.cxx +++ b/io/io/src/TFile.cxx @@ -2465,7 +2465,7 @@ void TFile::SumBuffer(Int_t bufsize) /// The linked list of FREE segments is written. /// The file header is written (bytes 1->fBEGIN). -Int_t TFile::Write(const char *, Int_t opt, Int_t bufsiz) +Int_t TFile::Write(const char *, Int_t opt, Int_t bufsize) { if (!IsWritable()) { if (!TestBit(kWriteError)) { @@ -2483,7 +2483,7 @@ Int_t TFile::Write(const char *, Int_t opt, Int_t bufsiz) } fMustFlush = kFALSE; - Int_t nbytes = TDirectoryFile::Write(0, opt, bufsiz); // Write directory tree + Int_t nbytes = TDirectoryFile::Write(0, opt, bufsize); // Write directory tree WriteStreamerInfo(); WriteFree(); // Write free segments linked list WriteHeader(); // Now write file header @@ -4685,7 +4685,7 @@ void TFile::CpProgress(Long64_t bytesread, Long64_t size, TStopwatch &watch) /// Allows to copy this file to the dst URL. Returns kTRUE in case of success, /// kFALSE otherwise. -Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t buffersize) +Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t bufsize) { Bool_t rmdestiferror = kFALSE; TStopwatch watch; @@ -4740,7 +4740,7 @@ Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t buffersize) sfile->Seek(0); dfile->Seek(0); - copybuffer = new char[buffersize]; + copybuffer = new char[bufsize]; if (!copybuffer) { ::Error("TFile::Cp", "cannot allocate the copy buffer"); goto copyout; @@ -4788,7 +4788,7 @@ Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t buffersize) goto copyout; } totalread += read; - } while (read == (Long64_t)buffersize); + } while (read == (Long64_t)bufsize); if (progressbar) { CpProgress(totalread, filesize,watch); @@ -4817,7 +4817,7 @@ Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t buffersize) /// kFALSE otherwise. Bool_t TFile::Cp(const char *src, const char *dst, Bool_t progressbar, - UInt_t buffersize) + UInt_t buffsize) { TUrl sURL(src, kTRUE); @@ -4829,7 +4829,7 @@ Bool_t TFile::Cp(const char *src, const char *dst, Bool_t progressbar, if (!(sfile = TFile::Open(sURL.GetUrl(), "READ"))) { ::Error("TFile::Cp", "cannot open source file %s", src); } else { - success = sfile->Cp(dst, progressbar, buffersize); + success = sfile->Cp(dst, progressbar, bufsize); } if (sfile) { diff --git a/io/io/src/TFileCacheRead.cxx b/io/io/src/TFileCacheRead.cxx index de5eddbe49640..0395d2cff4d5e 100644 --- a/io/io/src/TFileCacheRead.cxx +++ b/io/io/src/TFileCacheRead.cxx @@ -90,11 +90,11 @@ TFileCacheRead::TFileCacheRead() : TObject() //////////////////////////////////////////////////////////////////////////////// /// Creates a TFileCacheRead data structure. -TFileCacheRead::TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree) +TFileCacheRead::TFileCacheRead(TFile *file, Int_t bufsize, TObject *tree) : TObject() { - if (buffersize <=10000) fBufferSize = 100000; - else fBufferSize = buffersize; + if (bufsize <=10000) fBufferSize = 100000; + else fBufferSize = bufsize; fBufferSizeMin = fBufferSize; fBufferLen = 0; @@ -741,7 +741,7 @@ Int_t TFileCacheRead::SetBufferSize(Long64_t buffersize) } delete [] fBuffer; fBuffer = 0; - np = new char[buffersize]; + np = new char[bufsize]; if (pres) { memcpy(np, pres, fNtot); } @@ -750,8 +750,8 @@ Int_t TFileCacheRead::SetBufferSize(Long64_t buffersize) delete [] fBuffer; fBuffer = np; - fBufferSizeMin = buffersize; - fBufferSize = buffersize; + fBufferSizeMin = bufsize; + fBufferSize = bufsize; if (inval) { return 1; diff --git a/io/io/src/TFileCacheWrite.cxx b/io/io/src/TFileCacheWrite.cxx index 5fb668bd9d514..e69943f9aaafd 100644 --- a/io/io/src/TFileCacheWrite.cxx +++ b/io/io/src/TFileCacheWrite.cxx @@ -47,21 +47,21 @@ TFileCacheWrite::TFileCacheWrite() : TObject() //////////////////////////////////////////////////////////////////////////////// /// Creates a TFileCacheWrite data structure. /// The write cache will be connected to file. -/// The size of the cache will be buffersize, -/// if buffersize < 10000 a default size of 512 Kbytes is used +/// The size of the cache will be bufsize, +/// if bufsize < 10000 a default size of 512 Kbytes is used -TFileCacheWrite::TFileCacheWrite(TFile *file, Int_t buffersize) +TFileCacheWrite::TFileCacheWrite(TFile *file, Int_t bufsize) : TObject() { - if (buffersize < 10000) buffersize = 512000; - fBufferSize = buffersize; + if (bufsize < 10000) bufsize = 512000; + fBufferSize = bufsize; fSeekStart = 0; fNtot = 0; fFile = file; fRecursive = kFALSE; fBuffer = new char[fBufferSize]; if (file) file->SetCacheWrite(this); - if (gDebug > 0) Info("TFileCacheWrite","Creating a write cache with buffersize=%d bytes",buffersize); + if (gDebug > 0) Info("TFileCacheWrite","Creating a write cache with buffersize=%d bytes",bufsize); } //////////////////////////////////////////////////////////////////////////////// diff --git a/io/sql/inc/TSQLFile.h b/io/sql/inc/TSQLFile.h index 0ece3679ae096..7c26c41bb9c3f 100644 --- a/io/sql/inc/TSQLFile.h +++ b/io/sql/inc/TSQLFile.h @@ -205,7 +205,7 @@ class TSQLFile final : public TFile { void StopLogFile(); // *MENU* void Close(Option_t *option = "") final; // *MENU* - TKey *CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize) final; + TKey *CreateKey(TDirectory *mother, const TObject *obj, const char *name, Int_t bufsize) final; TKey *CreateKey(TDirectory *mother, const void *obj, const TClass *cl, const char *name, Int_t bufsize) final; void DrawMap(const char * = "*", Option_t * = "") final {} void FillBuffer(char *&) final {} diff --git a/net/net/inc/TMessage.h b/net/net/inc/TMessage.h index 5d3e8833083a0..90f4f377d1577 100644 --- a/net/net/inc/TMessage.h +++ b/net/net/inc/TMessage.h @@ -66,7 +66,7 @@ friend class TXSocket; void SetLength() const; // only called by T(P)Socket::Send() public: - TMessage(UInt_t what = kMESS_ANY, Int_t bufsiz = TBuffer::kInitialSize); + TMessage(UInt_t what = kMESS_ANY, Int_t bufsize = TBuffer::kInitialSize); virtual ~TMessage(); void ForceWriteInfo(TVirtualStreamerInfo *info, Bool_t force) override; diff --git a/net/net/inc/TParallelMergingFile.h b/net/net/inc/TParallelMergingFile.h index 18715c65e6f8e..8f15d7ccee07c 100644 --- a/net/net/inc/TParallelMergingFile.h +++ b/net/net/inc/TParallelMergingFile.h @@ -51,8 +51,8 @@ class TParallelMergingFile : public TMemFile void Close(Option_t *option="") override; Bool_t UploadAndReset(); - Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) override; - Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsiz=0) const override; + Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) override; + Int_t Write(const char *name=nullptr, Int_t opt=0, Int_t bufsize=0) const override; void WriteStreamerInfo() override; Int_t GetServerIdx() const { return fServerIdx; } diff --git a/net/net/src/TMessage.cxx b/net/net/src/TMessage.cxx index b555ffc993aab..4fd724a8d58b5 100644 --- a/net/net/src/TMessage.cxx +++ b/net/net/src/TMessage.cxx @@ -43,8 +43,8 @@ ClassImp(TMessage); /// the message will be compressed in TSocket using the zip algorithm /// (only if message is > 256 bytes). -TMessage::TMessage(UInt_t what, Int_t bufsiz) : - TBufferFile(TBuffer::kWrite, bufsiz + 2*sizeof(UInt_t)), +TMessage::TMessage(UInt_t what, Int_t bufsize) : + TBufferFile(TBuffer::kWrite, bufsize + 2*sizeof(UInt_t)), fCompress(ROOT::RCompressionSetting::EAlgorithm::kUseGlobal) { // space at the beginning of the message reserved for the message length diff --git a/net/net/src/TParallelMergingFile.cxx b/net/net/src/TParallelMergingFile.cxx index ef94964d24ad6..894a093578611 100644 --- a/net/net/src/TParallelMergingFile.cxx +++ b/net/net/src/TParallelMergingFile.cxx @@ -175,9 +175,9 @@ Bool_t TParallelMergingFile::UploadAndReset() /// The linked list of FREE segments is written. /// The file header is written (bytes 1->fBEGIN). -Int_t TParallelMergingFile::Write(const char *, Int_t opt, Int_t bufsiz) +Int_t TParallelMergingFile::Write(const char *, Int_t opt, Int_t bufsize) { - Int_t nbytes = TMemFile::Write(0,opt,bufsiz); + Int_t nbytes = TMemFile::Write(0,opt,bufsize); if (nbytes) { UploadAndReset(); } diff --git a/tree/ntuple/src/RFieldMeta.cxx b/tree/ntuple/src/RFieldMeta.cxx index f1d8678ba89a2..988501b10d243 100644 --- a/tree/ntuple/src/RFieldMeta.cxx +++ b/tree/ntuple/src/RFieldMeta.cxx @@ -822,8 +822,8 @@ class TBufferRecStreamer : public TBufferFile { RCallbackStreamerInfo fCallbackStreamerInfo; public: - TBufferRecStreamer(TBuffer::EMode mode, Int_t bufsiz, RCallbackStreamerInfo callbackStreamerInfo) - : TBufferFile(mode, bufsiz), fCallbackStreamerInfo(callbackStreamerInfo) + TBufferRecStreamer(TBuffer::EMode mode, Int_t bufsize, RCallbackStreamerInfo callbackStreamerInfo) + : TBufferFile(mode, bufsize), fCallbackStreamerInfo(callbackStreamerInfo) { } void TagStreamerInfo(TVirtualStreamerInfo *info) final { fCallbackStreamerInfo(info); } diff --git a/tree/tree/inc/TBranch.h b/tree/tree/inc/TBranch.h index 48c7fd81035c9..a74cd85c01d15 100644 --- a/tree/tree/inc/TBranch.h +++ b/tree/tree/inc/TBranch.h @@ -270,7 +270,7 @@ class TBranch : public TNamed, public TAttFill { virtual void SetAddress(void *add); virtual void SetObject(void *objadd); virtual void SetAutoDelete(bool autodel=true); - virtual void SetBasketSize(Int_t buffsize); + virtual void SetBasketSize(Int_t bufsize); virtual void SetBufferAddress(TBuffer *entryBuffer); void SetCompressionAlgorithm(Int_t algorithm = ROOT::RCompressionSetting::EAlgorithm::kUseGlobal); void SetCompressionLevel(Int_t level = ROOT::RCompressionSetting::ELevel::kUseMin); diff --git a/tree/tree/inc/TBranchClones.h b/tree/tree/inc/TBranchClones.h index b11b340e26e14..6154609a91906 100644 --- a/tree/tree/inc/TBranchClones.h +++ b/tree/tree/inc/TBranchClones.h @@ -57,7 +57,7 @@ class TBranchClones : public TBranch { void Reset(Option_t *option="") override; void ResetAfterMerge(TFileMergeInfo *) override; void SetAddress(void *add) override; - void SetBasketSize(Int_t buffsize) override; + void SetBasketSize(Int_t bufsize) override; void SetTree(TTree *tree) override { fTree = tree; fBranchCount->SetTree(tree); } void UpdateFile() override; diff --git a/tree/tree/inc/TBranchElement.h b/tree/tree/inc/TBranchElement.h index c329178d2aeb6..1caa795fdf0d2 100644 --- a/tree/tree/inc/TBranchElement.h +++ b/tree/tree/inc/TBranchElement.h @@ -222,7 +222,7 @@ class TBranchElement : public TBranch { void SetAddress(void* addobj) override; bool SetMakeClass(bool decomposeObj = true) override; void SetObject(void *objadd) override; - void SetBasketSize(Int_t buffsize) override; + void SetBasketSize(Int_t bufsize) override; virtual void SetBranchFolder() { SetBit(kBranchFolder); } virtual void SetClassName(const char* name) { fClassName = name; } void SetOffset(Int_t offset) override; diff --git a/tree/tree/inc/TBranchObject.h b/tree/tree/inc/TBranchObject.h index 2162b50e24bfa..75dbbf96e5cf2 100644 --- a/tree/tree/inc/TBranchObject.h +++ b/tree/tree/inc/TBranchObject.h @@ -61,7 +61,7 @@ class TBranchObject : public TBranch { void ResetAfterMerge(TFileMergeInfo *) override; void SetAddress(void *addobj) override; void SetAutoDelete(bool autodel=true) override; - void SetBasketSize(Int_t buffsize) override; + void SetBasketSize(Int_t bufsize) override; void SetupAddresses() override; void UpdateAddress() override; diff --git a/tree/tree/inc/TBranchSTL.h b/tree/tree/inc/TBranchSTL.h index 3fc35b0f0c3c5..9afff67341619 100644 --- a/tree/tree/inc/TBranchSTL.h +++ b/tree/tree/inc/TBranchSTL.h @@ -24,10 +24,10 @@ class TBranchSTL: public TBranch { TBranchSTL(); TBranchSTL( TTree* tree, const char* name, TVirtualCollectionProxy* collProxy, - Int_t buffsize, Int_t splitlevel ); + Int_t bufsize, Int_t splitlevel ); TBranchSTL( TBranch* parent, const char* name, TVirtualCollectionProxy* collProxy, - Int_t buffsize, Int_t splitlevel, + Int_t bufsize, Int_t splitlevel, TStreamerInfo* info, Int_t id ); ~TBranchSTL() override; void Browse( TBrowser *b ) override; diff --git a/tree/tree/inc/TTreeCache.h b/tree/tree/inc/TTreeCache.h index ee2a3d96a52df..9b8621c3d7be7 100644 --- a/tree/tree/inc/TTreeCache.h +++ b/tree/tree/inc/TTreeCache.h @@ -127,7 +127,7 @@ class TTreeCache : public TFileCacheRead { public: TTreeCache(); - TTreeCache(TTree *tree, Int_t buffersize=0); + TTreeCache(TTree *tree, Int_t bufsize=0); ~TTreeCache() override; Int_t AddBranch(TBranch *b, bool subgbranches = false) override; Int_t AddBranch(const char *branch, bool subbranches = false) override; diff --git a/tree/tree/src/TBranch.cxx b/tree/tree/src/TBranch.cxx index 556d7c1df20e5..1fd91674fe754 100644 --- a/tree/tree/src/TBranch.cxx +++ b/tree/tree/src/TBranch.cxx @@ -2739,11 +2739,11 @@ void TBranch::SetAutoDelete(bool autodel) /// Set the basket size /// The function makes sure that the basket size is greater than fEntryOffsetlen -void TBranch::SetBasketSize(Int_t buffsize) +void TBranch::SetBasketSize(Int_t bufsize) { Int_t minsize = 100 + fName.Length(); - if (buffsize < minsize+fEntryOffsetLen) buffsize = minsize+fEntryOffsetLen; - fBasketSize = buffsize; + if (bufsize < minsize+fEntryOffsetLen) bufsize = minsize+fEntryOffsetLen; + fBasketSize = bufsize; TBasket *basket = (TBasket*)fBaskets[fWriteBasket]; if (basket) { basket->AdjustSize(fBasketSize); diff --git a/tree/tree/src/TBranchClones.cxx b/tree/tree/src/TBranchClones.cxx index 7a5b11b996fef..bea3cf646b237 100644 --- a/tree/tree/src/TBranchClones.cxx +++ b/tree/tree/src/TBranchClones.cxx @@ -370,9 +370,9 @@ void TBranchClones::SetAddress(void* addr) //////////////////////////////////////////////////////////////////////////////// /// Reset basket size for all sub-branches. -void TBranchClones::SetBasketSize(Int_t buffsize) +void TBranchClones::SetBasketSize(Int_t bufsize) { - TBranch::SetBasketSize(buffsize); + TBranch::SetBasketSize(bufsize); Int_t nbranches = fBranches.GetEntriesFast(); for (Int_t i = 0; i < nbranches; i++) { diff --git a/tree/tree/src/TBranchElement.cxx b/tree/tree/src/TBranchElement.cxx index 660f029532a3d..604e9d5439b3d 100644 --- a/tree/tree/src/TBranchElement.cxx +++ b/tree/tree/src/TBranchElement.cxx @@ -5548,9 +5548,9 @@ void TBranchElement::SetAddressImpl(void* addr, bool implied, Int_t offset) //////////////////////////////////////////////////////////////////////////////// /// Reset the basket size for all sub-branches of this branch element. -void TBranchElement::SetBasketSize(Int_t buffsize) +void TBranchElement::SetBasketSize(Int_t bufsize) { - TBranch::SetBasketSize(buffsize); + TBranch::SetBasketSize(bufsize); Int_t nbranches = fBranches.GetEntriesFast(); for (Int_t i = 0; i < nbranches; ++i) { TBranch* branch = (TBranch*) fBranches[i]; diff --git a/tree/tree/src/TBranchObject.cxx b/tree/tree/src/TBranchObject.cxx index 026514ad74ef0..9b6f9b9185009 100644 --- a/tree/tree/src/TBranchObject.cxx +++ b/tree/tree/src/TBranchObject.cxx @@ -528,9 +528,9 @@ void TBranchObject::SetAutoDelete(bool autodel) //////////////////////////////////////////////////////////////////////////////// /// Reset basket size for all subbranches of this branch. -void TBranchObject::SetBasketSize(Int_t buffsize) +void TBranchObject::SetBasketSize(Int_t bufsize) { - TBranch::SetBasketSize(buffsize); + TBranch::SetBasketSize(bufsize); Int_t nbranches = fBranches.GetEntriesFast(); for (Int_t i = 0; i < nbranches; ++i) { diff --git a/tree/tree/src/TBranchSTL.cxx b/tree/tree/src/TBranchSTL.cxx index 9dd82119b86c0..65887ae835d04 100644 --- a/tree/tree/src/TBranchSTL.cxx +++ b/tree/tree/src/TBranchSTL.cxx @@ -45,13 +45,13 @@ TBranchSTL::TBranchSTL(): //////////////////////////////////////////////////////////////////////////////// /// Normal constructor, called from TTree. -TBranchSTL::TBranchSTL( TTree *tree, const char *name, - TVirtualCollectionProxy *collProxy, - Int_t buffsize, Int_t splitlevel ) +TBranchSTL::TBranchSTL(TTree *tree, const char *name, + TVirtualCollectionProxy *collProxy, + Int_t bufsize, Int_t splitlevel ) { fTree = tree; fCollProxy = collProxy; - fBasketSize = buffsize; + fBasketSize = bufsize; fSplitLevel = splitlevel; fContName = collProxy->GetCollectionClass()->GetName(); fClCheckSum = 0; @@ -87,14 +87,14 @@ TBranchSTL::TBranchSTL( TTree *tree, const char *name, //////////////////////////////////////////////////////////////////////////////// /// Normal constructor, called from another branch. -TBranchSTL::TBranchSTL( TBranch* parent, const char* name, - TVirtualCollectionProxy* collProxy, - Int_t buffsize, Int_t splitlevel, - TStreamerInfo* info, Int_t id ) +TBranchSTL::TBranchSTL(TBranch* parent, const char* name, + TVirtualCollectionProxy* collProxy, + Int_t bufsize, Int_t splitlevel, + TStreamerInfo* info, Int_t id ) { fTree = parent->GetTree(); fCollProxy = collProxy; - fBasketSize = buffsize; + fBasketSize = bufsize; fSplitLevel = splitlevel; fContName = collProxy->GetCollectionClass()->GetName(); fClassName = info->GetClass()->GetName(); diff --git a/tree/tree/src/TBufferSQL.cxx b/tree/tree/src/TBufferSQL.cxx index dcb7063044692..b14c56f64f876 100644 --- a/tree/tree/src/TBufferSQL.cxx +++ b/tree/tree/src/TBufferSQL.cxx @@ -42,9 +42,9 @@ TBufferSQL::TBufferSQL(TBuffer::EMode mode, std::vector *vc, //////////////////////////////////////////////////////////////////////////////// /// Constructor. -TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector *vc, +TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsize, std::vector *vc, TString *insert_query, TSQLRow ** r) : - TBufferFile(mode,bufsiz), + TBufferFile(mode,bufsize), fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r) { fIter = fColumnVec->begin(); @@ -53,10 +53,10 @@ TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector *vc //////////////////////////////////////////////////////////////////////////////// /// Constructor. -TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsiz, std::vector *vc, +TBufferSQL::TBufferSQL(TBuffer::EMode mode, Int_t bufsize, std::vector *vc, TString *insert_query, TSQLRow ** r, void *buf, bool adopt) : - TBufferFile(mode,bufsiz,buf,adopt), + TBufferFile(mode,bufsize,buf,adopt), fColumnVec(vc), fInsertQuery(insert_query), fRowPtr(r) { fIter = fColumnVec->begin(); diff --git a/tree/tree/src/TTree.cxx b/tree/tree/src/TTree.cxx index fb37306f836c4..ab64e6b7a42ef 100644 --- a/tree/tree/src/TTree.cxx +++ b/tree/tree/src/TTree.cxx @@ -173,7 +173,7 @@ It is strongly recommended to persistify those as objects rather than lists of l ## Adding a column holding STL collection instances (e.g. std::vector or std::list) ~~~ {.cpp} - auto branch = tree.Branch( branchname, STLcollection, buffsize, splitlevel); + auto branch = tree.Branch( branchname, STLcollection, bufsize, splitlevel); ~~~ `STLcollection` is the address of a pointer to a container of the standard library such as `std::vector`, `std::list`, containing pointers, fundamental types @@ -8522,9 +8522,9 @@ void TTree::SetAutoSave(Long64_t autos) /// - if bname="xxx*", apply to all branches with name starting with xxx /// /// see TRegexp for wildcarding options -/// buffsize = branc basket size +/// bufsize = branch basket size -void TTree::SetBasketSize(const char* bname, Int_t buffsize) +void TTree::SetBasketSize(const char* bname, Int_t bufsize) { Int_t nleaves = fLeaves.GetEntriesFast(); TRegexp re(bname, true); @@ -8537,7 +8537,7 @@ void TTree::SetBasketSize(const char* bname, Int_t buffsize) continue; } nb++; - branch->SetBasketSize(buffsize); + branch->SetBasketSize(bufsize); } if (!nb) { Error("SetBasketSize", "unknown branch -> '%s'", bname); diff --git a/tree/tree/src/TTreeCache.cxx b/tree/tree/src/TTreeCache.cxx index 205b8e496c1a2..ae2490383a38a 100644 --- a/tree/tree/src/TTreeCache.cxx +++ b/tree/tree/src/TTreeCache.cxx @@ -317,8 +317,8 @@ TTreeCache::TTreeCache() : TFileCacheRead(), fPrefillType(GetConfiguredPrefillTy //////////////////////////////////////////////////////////////////////////////// /// Constructor. -TTreeCache::TTreeCache(TTree *tree, Int_t buffersize) - : TFileCacheRead(tree->GetCurrentFile(), buffersize, tree), fEntryMax(tree->GetEntriesFast()), fEntryNext(0), +TTreeCache::TTreeCache(TTree *tree, Int_t bufsize) + : TFileCacheRead(tree->GetCurrentFile(), bufsize, tree), fEntryMax(tree->GetEntriesFast()), fEntryNext(0), fBrNames(new TList), fTree(tree), fPrefillType(GetConfiguredPrefillType()) { fEntryNext = fEntryMin + fgLearnEntries; diff --git a/tree/tree/src/TTreeCacheUnzip.cxx b/tree/tree/src/TTreeCacheUnzip.cxx index d5ccf78604668..5d338e32b5198 100644 --- a/tree/tree/src/TTreeCacheUnzip.cxx +++ b/tree/tree/src/TTreeCacheUnzip.cxx @@ -175,7 +175,7 @@ TTreeCacheUnzip::TTreeCacheUnzip() : TTreeCache(), //////////////////////////////////////////////////////////////////////////////// /// Constructor. -TTreeCacheUnzip::TTreeCacheUnzip(TTree *tree, Int_t buffersize) : TTreeCache(tree,buffersize), +TTreeCacheUnzip::TTreeCacheUnzip(TTree *tree, Int_t bufsize) : TTreeCache(tree,bufsize), fAsyncReading(false), fEmpty(true), fCycle(0), From 247ca6cbab5f2d985ac41ecef3a36cbde8e1814a Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Aug 2025 20:18:06 +0200 Subject: [PATCH 2/7] [nfc] fix typo Co-authored-by: Philippe Canal --- core/base/src/TBuffer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/base/src/TBuffer.cxx b/core/base/src/TBuffer.cxx index daaf8d1d450d0..5c3b32036f84f 100644 --- a/core/base/src/TBuffer.cxx +++ b/core/base/src/TBuffer.cxx @@ -74,7 +74,7 @@ TBuffer::TBuffer(EMode mode, Int_t bufsize) { if (bufsize < 0) Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize); - if (bufsize < kMinimalSize) bufsiz = kMinimalSize; + if (bufsize < kMinimalSize) bufsize = kMinimalSize; fBufSize = bufsiz; fMode = mode; fVersion = 0; From a7fde9ed77669b8e37428259b83f0545865d235d Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Mon, 11 Aug 2025 13:33:44 -0500 Subject: [PATCH 3/7] Update core/base/src/TBuffer.cxx --- core/base/src/TBuffer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/base/src/TBuffer.cxx b/core/base/src/TBuffer.cxx index 5c3b32036f84f..6cb2bc3651b14 100644 --- a/core/base/src/TBuffer.cxx +++ b/core/base/src/TBuffer.cxx @@ -75,7 +75,7 @@ TBuffer::TBuffer(EMode mode, Int_t bufsize) if (bufsize < 0) Fatal("TBuffer","Request to create a buffer with a negative size, likely due to an integer overflow: 0x%x for a max of 0x%x.", bufsize, kMaxBufferSize); if (bufsize < kMinimalSize) bufsize = kMinimalSize; - fBufSize = bufsiz; + fBufSize = bufsize; fMode = mode; fVersion = 0; fParent = nullptr; From 822e00aa97142c6f1a513841c5f92aab0d02a1b4 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Aug 2025 20:58:11 +0200 Subject: [PATCH 4/7] Update TFile.cxx --- io/io/src/TFile.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/io/io/src/TFile.cxx b/io/io/src/TFile.cxx index b428ff031dd07..43e3818f4e311 100644 --- a/io/io/src/TFile.cxx +++ b/io/io/src/TFile.cxx @@ -4762,8 +4762,8 @@ Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t bufsize) Long64_t b1 = sfile->GetBytesRead() - b00; Long64_t readsize; - if (filesize - b1 > (Long64_t)buffersize) { - readsize = buffersize; + if (filesize - b1 > (Long64_t)bufsize) { + readsize = bufsize; } else { readsize = filesize - b1; } @@ -4817,7 +4817,7 @@ Bool_t TFile::Cp(const char *dst, Bool_t progressbar, UInt_t bufsize) /// kFALSE otherwise. Bool_t TFile::Cp(const char *src, const char *dst, Bool_t progressbar, - UInt_t buffsize) + UInt_t bufsize) { TUrl sURL(src, kTRUE); From 6cd0b8d31d29b39e0d2210cd0774f483c0e4290d Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Mon, 11 Aug 2025 20:59:32 +0200 Subject: [PATCH 5/7] Update TFileCacheRead.cxx --- io/io/src/TFileCacheRead.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/io/io/src/TFileCacheRead.cxx b/io/io/src/TFileCacheRead.cxx index 0395d2cff4d5e..670f1712c4611 100644 --- a/io/io/src/TFileCacheRead.cxx +++ b/io/io/src/TFileCacheRead.cxx @@ -708,25 +708,25 @@ void TFileCacheRead::WaitFinishPrefetch() /// - 1 if some or all blocks have been removed from the prefetch list /// - -1 on error -Int_t TFileCacheRead::SetBufferSize(Long64_t buffersize) +Int_t TFileCacheRead::SetBufferSize(Long64_t bufsize) { - if (buffersize <= 0) return -1; - if (buffersize <=10000) buffersize = 100000; - if (buffersize > std::numeric_limits::max()) buffersize = std::numeric_limits::max(); + if (bufsize <= 0) return -1; + if (bufsize <=10000) bufsize = 100000; + if (bufsize > std::numeric_limits::max()) bufsize = std::numeric_limits::max(); - if (buffersize == fBufferSize) { - fBufferSizeMin = buffersize; + if (bufsize == fBufferSize) { + fBufferSizeMin = bufsize; return 0; } Bool_t inval = kFALSE; // the cached data is too large to fit in the new buffer size mark data unavailable - if (fNtot > buffersize) { + if (fNtot > bufsize) { Prefetch(0, 0); inval = kTRUE; } - if (fBNtot > buffersize) { + if (fBNtot > bufsize) { SecondPrefetch(0, 0); inval = kTRUE; } From 241765ae4afac6bd6f743816dc39fec6c36020a4 Mon Sep 17 00:00:00 2001 From: Philippe Canal Date: Mon, 11 Aug 2025 14:16:30 -0500 Subject: [PATCH 6/7] Update hist/hist/src/TH1.cxx --- hist/hist/src/TH1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index d07d207b05653..c8a98c5d4395e 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -8498,7 +8498,7 @@ void TH1::SetBuffer(Int_t bufsize, Option_t * /*option*/) return; } if (bufsize < 100) bufsize = 100; - fBufferSize = 1 + buffersize*(fDimension+1); + bufsize = 1 + bufsize*(fDimension+1); fBuffer = new Double_t[fBufferSize]; memset(fBuffer, 0, sizeof(Double_t)*fBufferSize); } From cd3298f047aa98afd7cc46cb764d95b4d609c8b7 Mon Sep 17 00:00:00 2001 From: ferdymercury Date: Tue, 12 Aug 2025 08:33:33 +0200 Subject: [PATCH 7/7] Update hist/hist/src/TH1.cxx --- hist/hist/src/TH1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hist/hist/src/TH1.cxx b/hist/hist/src/TH1.cxx index c8a98c5d4395e..fd04afcbc589d 100644 --- a/hist/hist/src/TH1.cxx +++ b/hist/hist/src/TH1.cxx @@ -8498,7 +8498,7 @@ void TH1::SetBuffer(Int_t bufsize, Option_t * /*option*/) return; } if (bufsize < 100) bufsize = 100; - bufsize = 1 + bufsize*(fDimension+1); + fBufferSize = 1 + bufsize*(fDimension+1); fBuffer = new Double_t[fBufferSize]; memset(fBuffer, 0, sizeof(Double_t)*fBufferSize); }