From 2b2d5b0eeabf16e066afc74977bcdf2d0555ca59 Mon Sep 17 00:00:00 2001 From: Rene Brun <Rene.Brun@cern.ch> Date: Fri, 26 May 2006 09:27:12 +0000 Subject: [PATCH] Fix coding conventions violations git-svn-id: http://root.cern.ch/svn/root/trunk@15176 27541ba8-7e3a-0410-8455-c3a389f83636 --- auth/src/rsafun.cxx | 2 +- base/src/TApplication.cxx | 40 ++++++----- base/src/TBenchmark.cxx | 24 ++++--- base/src/TBrowser.cxx | 24 ++++--- base/src/TContextMenu.cxx | 30 ++++---- base/src/TFileInfo.cxx | 32 +++++---- base/src/TKey.cxx | 44 ++++++------ base/src/TPluginManager.cxx | 34 +++++---- base/src/TROOT.cxx | 120 ++++++++++++++++--------------- base/src/TRandom.cxx | 101 +++++++++++++------------- base/src/TSystem.cxx | 99 +++++++++++++------------ base/src/TSystemDirectory.cxx | 18 +++-- base/src/TTask.cxx | 22 +++--- base/src/TTimer.cxx | 30 ++++---- base/src/TView.cxx | 99 ++++++++++++------------- base/src/TVirtualFitter.cxx | 44 ++++++------ base/src/TVirtualGL.cxx | 8 +-- cont/src/TList.cxx | 22 +++--- eg/inc/TGenerator.h | 24 ++++--- eg/src/TGenerator.cxx | 7 +- g3d/src/TGeometry.cxx | 17 ++--- geom/src/TGeoCache.cxx | 34 +++++---- geom/src/TGeoMaterial.cxx | 22 +++--- geom/src/TGeoMatrix.cxx | 12 ++-- geom/src/TGeoTube.cxx | 8 +-- gl/src/TGLBoundingBox.cxx | 3 +- gl/src/TGLHistPainter.cxx | 26 +++---- graf/src/TSpline.cxx | 6 +- gui/src/TG3DLine.cxx | 6 +- gui/src/TGButton.cxx | 4 +- gui/src/TGProgressBar.cxx | 4 +- gui/src/TGString.cxx | 4 +- gui/src/TGuiBuilder.cxx | 10 +-- gui/src/TRootBrowser.cxx | 8 +-- gui/src/TRootHelpDialog.cxx | 22 +++--- guibuilder/src/TGuiBldEditor.cxx | 4 +- hist/src/TMultiDimFit.cxx | 4 +- hist/src/TSpectrum.cxx | 6 +- io/src/TKey.cxx | 44 ++++++------ math/src/TRandom.cxx | 101 +++++++++++++------------- matrix/src/TDecompLU.cxx | 4 +- meta/src/TDataMember.cxx | 26 ++++--- net/src/TNetFile.cxx | 4 +- qtgsi/src/TQRootGuiFactory.cxx | 4 +- tmva/src/MethodBDT.cxx | 3 +- tree/src/TSelector.cxx | 24 ++++--- treeplayer/src/TFormLeafInfo.cxx | 4 +- treeviewer/src/TTreeViewer.cxx | 4 +- 48 files changed, 656 insertions(+), 586 deletions(-) diff --git a/auth/src/rsafun.cxx b/auth/src/rsafun.cxx index a85aa00070a..9a0a5eb7557 100644 --- a/auth/src/rsafun.cxx +++ b/auth/src/rsafun.cxx @@ -65,7 +65,7 @@ TRSA_fun::TRSA_fun(RSA_genprim_t genprim, RSA_genrsa_t genrsa, RSA_encode_t enco RSA_num_sget_t num_sget, RSA_num_fget_t num_fget, RSA_assign_t assign, RSA_cmp_t cmp) { - // ctor + // constructor fg_rsa_genprim = genprim; fg_rsa_genrsa = genrsa; diff --git a/base/src/TApplication.cxx b/base/src/TApplication.cxx index c2a6865b16c..88516158fd3 100644 --- a/base/src/TApplication.cxx +++ b/base/src/TApplication.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TApplication.cxx,v 1.73 2006/03/06 14:30:00 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TApplication.cxx,v 1.74 2006/05/23 04:47:35 brun Exp $ // Author: Fons Rademakers 22/12/95 /************************************************************************* @@ -234,27 +234,31 @@ TApplication::TApplication(const TApplication& ap) : fIdleCommand(ap.fIdleCommand), fIdleTimer(ap.fIdleTimer), fSigHandler(ap.fSigHandler) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TApplication& TApplication::operator=(const TApplication& ap) { - if(this!=&ap) { - TObject::operator=(ap); - TQObject::operator=(ap); - fArgc=ap.fArgc; - fArgv=ap.fArgv; - fAppImp=ap.fAppImp; - fIsRunning=ap.fIsRunning; - fReturnFromRun=ap.fReturnFromRun; - fNoLog=ap.fNoLog; - fNoLogo=ap.fNoLogo; - fQuit=ap.fQuit; - fFiles=ap.fFiles; - fIdleCommand=ap.fIdleCommand; - fIdleTimer=ap.fIdleTimer; - fSigHandler=ap.fSigHandler; - } return *this; + //equal operator + if(this!=&ap) { + TObject::operator=(ap); + TQObject::operator=(ap); + fArgc=ap.fArgc; + fArgv=ap.fArgv; + fAppImp=ap.fAppImp; + fIsRunning=ap.fIsRunning; + fReturnFromRun=ap.fReturnFromRun; + fNoLog=ap.fNoLog; + fNoLogo=ap.fNoLogo; + fQuit=ap.fQuit; + fFiles=ap.fFiles; + fIdleCommand=ap.fIdleCommand; + fIdleTimer=ap.fIdleTimer; + fSigHandler=ap.fSigHandler; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TBenchmark.cxx b/base/src/TBenchmark.cxx index 7726e9b96a3..ebec4cd1cf3 100644 --- a/base/src/TBenchmark.cxx +++ b/base/src/TBenchmark.cxx @@ -49,20 +49,24 @@ TBenchmark::TBenchmark(const TBenchmark& bm) : fRealTime(bm.fRealTime), fCpuTime(bm.fCpuTime), fTimer(bm.fTimer) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TBenchmark& TBenchmark::operator=(const TBenchmark& bm) { - if(this!=&bm) { - TNamed::operator=(bm); - fNbench=bm.fNbench; - fNmax=bm.fNmax; - fNames=bm.fNames; - fRealTime=bm.fRealTime; - fCpuTime=bm.fCpuTime; - fTimer=bm.fTimer; - } return *this; + //equal operator + if(this!=&bm) { + TNamed::operator=(bm); + fNbench=bm.fNbench; + fNmax=bm.fNmax; + fNames=bm.fNames; + fRealTime=bm.fRealTime; + fCpuTime=bm.fCpuTime; + fTimer=bm.fTimer; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TBrowser.cxx b/base/src/TBrowser.cxx index 54c0fc7182d..2a8c65e4f78 100644 --- a/base/src/TBrowser.cxx +++ b/base/src/TBrowser.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TBrowser.cxx,v 1.17 2006/03/20 21:43:41 pcanal Exp $ +// @(#)root/base:$Name: $:$Id: TBrowser.cxx,v 1.18 2006/05/23 04:47:35 brun Exp $ // Author: Fons Rademakers 25/10/95 /************************************************************************* @@ -219,19 +219,23 @@ TBrowser::TBrowser(const TBrowser& br) : fTimer(br.fTimer), fContextMenu(br.fContextMenu), fNeedRefresh(br.fNeedRefresh) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TBrowser& TBrowser::operator=(const TBrowser& br) { - if(this!=&br) { - TNamed::operator=(br); - fLastSelectedObject=br.fLastSelectedObject; - fImp=br.fImp; - fTimer=br.fTimer; - fContextMenu=br.fContextMenu; - fNeedRefresh=br.fNeedRefresh; - } return *this; + //equal operator + if(this!=&br) { + TNamed::operator=(br); + fLastSelectedObject=br.fLastSelectedObject; + fImp=br.fImp; + fTimer=br.fTimer; + fContextMenu=br.fContextMenu; + fNeedRefresh=br.fNeedRefresh; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TContextMenu.cxx b/base/src/TContextMenu.cxx index b11fd0ef967..fe08f7dcb4d 100644 --- a/base/src/TContextMenu.cxx +++ b/base/src/TContextMenu.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TContextMenu.cxx,v 1.13 2006/03/20 21:43:41 pcanal Exp $ +// @(#)root/base:$Name: $:$Id: TContextMenu.cxx,v 1.14 2006/05/23 04:47:35 brun Exp $ // Author: Nenad Buncic 08/02/96 /************************************************************************* @@ -75,22 +75,26 @@ TContextMenu::TContextMenu(const TContextMenu& cm) : fSelectedCanvas(cm.fSelectedCanvas), fSelectedPad(cm.fSelectedPad), fBrowser(cm.fBrowser) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TContextMenu& TContextMenu::operator=(const TContextMenu& cm) { - if(this!=&cm) { - TNamed::operator=(cm); - fContextMenuImp=cm.fContextMenuImp; - fSelectedMethod=cm.fSelectedMethod; - fSelectedObject=cm.fSelectedObject; - fCalledObject=cm.fCalledObject; - fSelectedMenuItem=cm.fSelectedMenuItem; - fSelectedCanvas=cm.fSelectedCanvas; - fSelectedPad=cm.fSelectedPad; - fBrowser=cm.fBrowser; - } return *this; + //equal operator + if(this!=&cm) { + TNamed::operator=(cm); + fContextMenuImp=cm.fContextMenuImp; + fSelectedMethod=cm.fSelectedMethod; + fSelectedObject=cm.fSelectedObject; + fCalledObject=cm.fCalledObject; + fSelectedMenuItem=cm.fSelectedMenuItem; + fSelectedCanvas=cm.fSelectedCanvas; + fSelectedPad=cm.fSelectedPad; + fBrowser=cm.fBrowser; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TFileInfo.cxx b/base/src/TFileInfo.cxx index 22ddc5b2f3b..c3763410ae2 100644 --- a/base/src/TFileInfo.cxx +++ b/base/src/TFileInfo.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TFileInfo.cxx,v 1.6 2006/03/21 14:53:11 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TFileInfo.cxx,v 1.7 2006/05/23 04:47:35 brun Exp $ // Author: Andreas-Joachim Peters 20/9/2005 /************************************************************************* @@ -66,23 +66,27 @@ TFileInfo::TFileInfo(const TFileInfo& fi) : fFirst(fi.fFirst), fLast(fi.fLast), fMetaDataObject(fi.fMetaDataObject) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TFileInfo& TFileInfo::operator=(const TFileInfo& fi) { - if(this!=&fi) { - TNamed::operator=(fi); - fCurrentUrl=fi.fCurrentUrl; - fUrlList=fi.fUrlList; - fSize=fi.fSize; - fUUID=fi.fUUID; - fMD5=fi.fMD5; - fEntries=fi.fEntries; - fFirst=fi.fFirst; - fLast=fi.fLast; - fMetaDataObject=fi.fMetaDataObject; - } return *this; + //equal operator + if(this!=&fi) { + TNamed::operator=(fi); + fCurrentUrl=fi.fCurrentUrl; + fUrlList=fi.fUrlList; + fSize=fi.fSize; + fUUID=fi.fUUID; + fMD5=fi.fMD5; + fEntries=fi.fEntries; + fFirst=fi.fFirst; + fLast=fi.fLast; + fMetaDataObject=fi.fMetaDataObject; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TKey.cxx b/base/src/TKey.cxx index 8cd87f1e731..29f13fd4a5b 100644 --- a/base/src/TKey.cxx +++ b/base/src/TKey.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TKey.cxx,v 1.56 2006/04/19 08:22:22 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TKey.cxx,v 1.57 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun 28/12/94 /************************************************************************* @@ -97,34 +97,32 @@ TKey::TKey(const TKey& tk) : fSeekPdir(tk.fSeekPdir), fClassName(tk.fClassName), fLeft(tk.fLeft), fBuffer(tk.fBuffer), fBufferRef(tk.fBufferRef), fPidOffset(tk.fPidOffset), fMotherDir(tk.fMotherDir) { - - // Standard constructor + // copy constructor } //______________________________________________________________________________ TKey& TKey::operator=(const TKey& tk) { - - // equal operator + // equal operator - if(this!=&tk) { - TNamed::operator=(tk); - fVersion=tk.fVersion; - fNbytes=tk.fNbytes; - fObjlen=tk.fObjlen; - fDatime=tk.fDatime; - fKeylen=tk.fKeylen; - fCycle=tk.fCycle; - fSeekKey=tk.fSeekKey; - fSeekPdir=tk.fSeekPdir; - fClassName=tk.fClassName; - fLeft=tk.fLeft; - fBuffer=tk.fBuffer; - fBufferRef=tk.fBufferRef; - fPidOffset=tk.fPidOffset; - fMotherDir=tk.fMotherDir; - } - return *this; + if(this!=&tk) { + TNamed::operator=(tk); + fVersion=tk.fVersion; + fNbytes=tk.fNbytes; + fObjlen=tk.fObjlen; + fDatime=tk.fDatime; + fKeylen=tk.fKeylen; + fCycle=tk.fCycle; + fSeekKey=tk.fSeekKey; + fSeekPdir=tk.fSeekPdir; + fClassName=tk.fClassName; + fLeft=tk.fLeft; + fBuffer=tk.fBuffer; + fBufferRef=tk.fBufferRef; + fPidOffset=tk.fPidOffset; + fMotherDir=tk.fMotherDir; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TPluginManager.cxx b/base/src/TPluginManager.cxx index 17702404276..b715bb1b79c 100644 --- a/base/src/TPluginManager.cxx +++ b/base/src/TPluginManager.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TPluginManager.cxx,v 1.27 2006/01/30 09:01:11 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TPluginManager.cxx,v 1.28 2006/05/23 04:47:35 brun Exp $ // Author: Fons Rademakers 26/1/2002 /************************************************************************* @@ -114,24 +114,28 @@ TPluginHandler::TPluginHandler(const TPluginHandler& ph) : fCanCall(ph.fCanCall), fIsMacro(ph.fIsMacro), fIsGlobal(ph.fIsGlobal) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TPluginHandler& TPluginHandler::operator=(const TPluginHandler& ph) { - if(this!=&ph) { - TObject::operator=(ph); - fBase=ph.fBase; - fRegexp=ph.fRegexp; - fClass=ph.fClass; - fPlugin=ph.fPlugin; - fCtor=ph.fCtor; - fCallEnv=ph.fCallEnv; - fMethod=ph.fMethod; - fCanCall=ph.fCanCall; - fIsMacro=ph.fIsMacro; - fIsGlobal=ph.fIsGlobal; - } return *this; + //equal operator + if(this!=&ph) { + TObject::operator=(ph); + fBase=ph.fBase; + fRegexp=ph.fRegexp; + fClass=ph.fClass; + fPlugin=ph.fPlugin; + fCtor=ph.fCtor; + fCallEnv=ph.fCallEnv; + fMethod=ph.fMethod; + fCanCall=ph.fCanCall; + fIsMacro=ph.fIsMacro; + fIsGlobal=ph.fIsGlobal; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TROOT.cxx b/base/src/TROOT.cxx index 0bf6cad1be9..3957455359a 100644 --- a/base/src/TROOT.cxx +++ b/base/src/TROOT.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TROOT.cxx,v 1.180 2006/05/18 07:34:25 brun Exp $ +// @(#)root/base:$Name: $:$Id: TROOT.cxx,v 1.181 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun 08/12/94 /************************************************************************* @@ -552,67 +552,71 @@ TROOT::TROOT(const TROOT& r) : fPluginManager(r.fPluginManager), fCutClassName(r.fCutClassName), fDefCanvasName(r.fDefCanvasName) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TROOT& TROOT::operator=(const TROOT& r) { - if(this!=&r) { - TDirectory::operator=(r); - fLineIsProcessing=r.fLineIsProcessing; - fConfigOptions=r.fConfigOptions; - fVersion=r.fVersion; - fVersionInt=r.fVersionInt; - fVersionDate=r.fVersionDate; - fVersionTime=r.fVersionTime; - fBuiltDate=r.fBuiltDate; - fBuiltTime=r.fBuiltTime; - fTimer=r.fTimer; - fApplication=r.fApplication; - fInterpreter=r.fInterpreter; - fBatch=r.fBatch; - fEditHistograms=r.fEditHistograms; - fFromPopUp=r.fFromPopUp; - fMustClean=r.fMustClean; - fReadingObject=r.fReadingObject; - fForceStyle=r.fForceStyle; - fInterrupt=r.fInterrupt; - fEscape=r.fEscape; - fExecutingMacro=r.fExecutingMacro; - fEditorMode=r.fEditorMode; - fPrimitive=r.fPrimitive; - fSelectPad=r.fSelectPad; - fClasses=r.fClasses; - fIdMap=r.fIdMap; - fTypes=r.fTypes; - fGlobals=r.fGlobals; - fGlobalFunctions=r.fGlobalFunctions; - fFiles=r.fFiles; - fMappedFiles=r.fMappedFiles; - fSockets=r.fSockets; - fCanvases=r.fCanvases; - fStyles=r.fStyles; - fFunctions=r.fFunctions; - fTasks=r.fTasks; - fColors=r.fColors; - fGeometries=r.fGeometries; - fBrowsers=r.fBrowsers; - fSpecials=r.fSpecials; - fCleanups=r.fCleanups; - fMessageHandlers=r.fMessageHandlers; - fStreamerInfo=r.fStreamerInfo; - fClassGenerators=r.fClassGenerators; - fSecContexts=r.fSecContexts; - fProofs=r.fProofs; - fClipboard=r.fClipboard; - fDataSets=r.fDataSets; - fUUIDs=r.fUUIDs; - fRootFolder=r.fRootFolder; - fBrowsables=r.fBrowsables; - fPluginManager=r.fPluginManager; - fCutClassName=r.fCutClassName; - fDefCanvasName=r.fDefCanvasName; - } return *this; + //equal operator + if(this!=&r) { + TDirectory::operator=(r); + fLineIsProcessing=r.fLineIsProcessing; + fConfigOptions=r.fConfigOptions; + fVersion=r.fVersion; + fVersionInt=r.fVersionInt; + fVersionDate=r.fVersionDate; + fVersionTime=r.fVersionTime; + fBuiltDate=r.fBuiltDate; + fBuiltTime=r.fBuiltTime; + fTimer=r.fTimer; + fApplication=r.fApplication; + fInterpreter=r.fInterpreter; + fBatch=r.fBatch; + fEditHistograms=r.fEditHistograms; + fFromPopUp=r.fFromPopUp; + fMustClean=r.fMustClean; + fReadingObject=r.fReadingObject; + fForceStyle=r.fForceStyle; + fInterrupt=r.fInterrupt; + fEscape=r.fEscape; + fExecutingMacro=r.fExecutingMacro; + fEditorMode=r.fEditorMode; + fPrimitive=r.fPrimitive; + fSelectPad=r.fSelectPad; + fClasses=r.fClasses; + fIdMap=r.fIdMap; + fTypes=r.fTypes; + fGlobals=r.fGlobals; + fGlobalFunctions=r.fGlobalFunctions; + fFiles=r.fFiles; + fMappedFiles=r.fMappedFiles; + fSockets=r.fSockets; + fCanvases=r.fCanvases; + fStyles=r.fStyles; + fFunctions=r.fFunctions; + fTasks=r.fTasks; + fColors=r.fColors; + fGeometries=r.fGeometries; + fBrowsers=r.fBrowsers; + fSpecials=r.fSpecials; + fCleanups=r.fCleanups; + fMessageHandlers=r.fMessageHandlers; + fStreamerInfo=r.fStreamerInfo; + fClassGenerators=r.fClassGenerators; + fSecContexts=r.fSecContexts; + fProofs=r.fProofs; + fClipboard=r.fClipboard; + fDataSets=r.fDataSets; + fUUIDs=r.fUUIDs; + fRootFolder=r.fRootFolder; + fBrowsables=r.fBrowsables; + fPluginManager=r.fPluginManager; + fCutClassName=r.fCutClassName; + fDefCanvasName=r.fDefCanvasName; + } + return *this; } #endif //______________________________________________________________________________ diff --git a/base/src/TRandom.cxx b/base/src/TRandom.cxx index 18cd9f99fcb..5082872400c 100644 --- a/base/src/TRandom.cxx +++ b/base/src/TRandom.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TRandom.cxx,v 1.28 2006/05/23 10:12:17 brun Exp $ +// @(#)root/base:$Name: $:$Id: TRandom.cxx,v 1.29 2006/05/24 15:34:51 brun Exp $ // Author: Rene Brun, Lorenzo Moneta 15/12/95 /************************************************************************* @@ -526,41 +526,41 @@ Int_t TRandom::Poisson(Double_t mean) Int_t n; if (mean <= 0) return 0; if (mean < 25) { - Double_t expmean = TMath::Exp(-mean); - Double_t pir = 1; - n = -1; - while(1) { - n++; - pir *= Rndm(); - if (pir <= expmean) break; - } - return n; + Double_t expmean = TMath::Exp(-mean); + Double_t pir = 1; + n = -1; + while(1) { + n++; + pir *= Rndm(); + if (pir <= expmean) break; + } + return n; } // for large value we use inversion method else if (mean < 1E9) { - Double_t em, t, y; - Double_t sq, alxm, g; - Double_t pi = TMath::Pi(); + Double_t em, t, y; + Double_t sq, alxm, g; + Double_t pi = TMath::Pi(); - sq = TMath::Sqrt(2.0*mean); - alxm = TMath::Log(mean); - g = mean*alxm - TMath::LnGamma(mean + 1.0); + sq = TMath::Sqrt(2.0*mean); + alxm = TMath::Log(mean); + g = mean*alxm - TMath::LnGamma(mean + 1.0); - do { do { - y = TMath::Tan(pi*Rndm()); - em = sq*y + mean; - } while( em < 0.0 ); + do { + y = TMath::Tan(pi*Rndm()); + em = sq*y + mean; + } while( em < 0.0 ); - em = TMath::Floor(em); - t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); - } while( Rndm() > t ); + em = TMath::Floor(em); + t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); + } while( Rndm() > t ); - return static_cast<Int_t> (em); + return static_cast<Int_t> (em); } else { - // use Gaussian approximation vor very large values + // use Gaussian approximation vor very large values n = Int_t(Gaus(0,1)*TMath::Sqrt(mean) + mean +0.5); return n; } @@ -578,41 +578,40 @@ Double_t TRandom::PoissonD(Double_t mean) Int_t n; if (mean <= 0) return 0; if (mean < 25) { - Double_t expmean = TMath::Exp(-mean); - Double_t pir = 1; - n = -1; - while(1) { - n++; - pir *= Rndm(); - if (pir <= expmean) break; - } - return static_cast<Double_t>(n); + Double_t expmean = TMath::Exp(-mean); + Double_t pir = 1; + n = -1; + while(1) { + n++; + pir *= Rndm(); + if (pir <= expmean) break; + } + return static_cast<Double_t>(n); } // for large value we use inversion method else if (mean < 1E9) { - Double_t em, t, y; - Double_t sq, alxm, g; - Double_t pi = TMath::Pi(); + Double_t em, t, y; + Double_t sq, alxm, g; + Double_t pi = TMath::Pi(); - sq = TMath::Sqrt(2.0*mean); - alxm = TMath::Log(mean); - g = mean*alxm - TMath::LnGamma(mean + 1.0); + sq = TMath::Sqrt(2.0*mean); + alxm = TMath::Log(mean); + g = mean*alxm - TMath::LnGamma(mean + 1.0); - do { do { - y = TMath::Tan(pi*Rndm()); - em = sq*y + mean; - } while( em < 0.0 ); + do { + y = TMath::Tan(pi*Rndm()); + em = sq*y + mean; + } while( em < 0.0 ); - em = TMath::Floor(em); - t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); - } while( Rndm() > t ); + em = TMath::Floor(em); + t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); + } while( Rndm() > t ); - return em; + return em; - } - else { - // use Gaussian approximation vor very large values + } else { + // use Gaussian approximation vor very large values return Gaus(0,1)*TMath::Sqrt(mean) + mean +0.5; } } diff --git a/base/src/TSystem.cxx b/base/src/TSystem.cxx index 67e2223fbbf..d0bc056acaf 100644 --- a/base/src/TSystem.cxx +++ b/base/src/TSystem.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TSystem.cxx,v 1.139 2006/03/29 10:29:32 brun Exp $ +// @(#)root/base:$Name: $:$Id: TSystem.cxx,v 1.140 2006/05/23 04:47:35 brun Exp $ // Author: Fons Rademakers 15/09/95 /************************************************************************* @@ -103,56 +103,61 @@ TSystem::TSystem(const TSystem& ts): TNamed(ts), fFlagsOpt(ts.fFlagsOpt), fListPaths(ts.fListPaths), fIncludePath(ts.fIncludePath), fLinkedLibs(ts.fLinkedLibs), fSoExt(ts.fSoExt), fObjExt(ts.fObjExt), fAclicMode(ts.fAclicMode), fMakeSharedLib(ts.fMakeSharedLib), fMakeExe(ts.fMakeExe), fLinkdefSuffix(ts.fLinkdefSuffix), fCompiled(ts.fCompiled), fHelpers(ts.fHelpers) -{ } - -//______________________________________________________________________________ -TSystem& TSystem::operator=(const TSystem& ts) { - if(this!=&ts) { - TNamed::operator=(ts); - fReadmask=ts.fReadmask; - fWritemask=ts.fWritemask; - fReadready=ts.fReadready; - fWriteready=ts.fWriteready; - fSignals=ts.fSignals; - fNfd=ts.fNfd; - fMaxrfd=ts.fMaxrfd; - fMaxwfd=ts.fMaxwfd; - fSigcnt=ts.fSigcnt; - fWdpath=ts.fWdpath; - fHostname=ts.fHostname; - fInsideNotify=ts.fInsideNotify; - fBeepFreq=ts.fBeepFreq; - fBeepDuration=ts.fBeepDuration; +{ + //copy constructor +} + +//______________________________________________________________________________ +TSystem& TSystem::operator=(const TSystem& ts) +{ + //equal operator + if(this!=&ts) { + TNamed::operator=(ts); + fReadmask=ts.fReadmask; + fWritemask=ts.fWritemask; + fReadready=ts.fReadready; + fWriteready=ts.fWriteready; + fSignals=ts.fSignals; + fNfd=ts.fNfd; + fMaxrfd=ts.fMaxrfd; + fMaxwfd=ts.fMaxwfd; + fSigcnt=ts.fSigcnt; + fWdpath=ts.fWdpath; + fHostname=ts.fHostname; + fInsideNotify=ts.fInsideNotify; + fBeepFreq=ts.fBeepFreq; + fBeepDuration=ts.fBeepDuration; - fInControl=ts.fInControl; - fDone=ts.fDone; - fLevel=ts.fLevel; - fLastErrorString=ts.fLastErrorString; + fInControl=ts.fInControl; + fDone=ts.fDone; + fLevel=ts.fLevel; + fLastErrorString=ts.fLastErrorString; - fTimers=ts.fTimers; - fSignalHandler=ts.fSignalHandler; - fFileHandler=ts.fFileHandler; - fOnExitList=ts.fOnExitList; + fTimers=ts.fTimers; + fSignalHandler=ts.fSignalHandler; + fFileHandler=ts.fFileHandler; + fOnExitList=ts.fOnExitList; - fListLibs=ts.fListLibs; + fListLibs=ts.fListLibs; - fBuildArch=ts.fBuildArch; - fBuildNode=ts.fBuildNode; - fBuildDir=ts.fBuildDir; - fFlagsDebug=ts.fFlagsDebug; - fFlagsOpt=ts.fFlagsOpt; - fListPaths=ts.fListPaths; - fIncludePath=ts.fIncludePath; - fLinkedLibs=ts.fLinkedLibs; - fSoExt=ts.fSoExt; - fObjExt=ts.fObjExt; - fAclicMode=ts.fAclicMode; - fMakeSharedLib=ts.fMakeSharedLib; - fMakeExe=ts.fMakeExe; - fLinkdefSuffix=ts.fLinkdefSuffix; - fCompiled=ts.fCompiled; - fHelpers=ts.fHelpers; - } return *this; + fBuildArch=ts.fBuildArch; + fBuildNode=ts.fBuildNode; + fBuildDir=ts.fBuildDir; + fFlagsDebug=ts.fFlagsDebug; + fFlagsOpt=ts.fFlagsOpt; + fListPaths=ts.fListPaths; + fIncludePath=ts.fIncludePath; + fLinkedLibs=ts.fLinkedLibs; + fSoExt=ts.fSoExt; + fObjExt=ts.fObjExt; + fAclicMode=ts.fAclicMode; + fMakeSharedLib=ts.fMakeSharedLib; + fMakeExe=ts.fMakeExe; + fLinkdefSuffix=ts.fLinkdefSuffix; + fCompiled=ts.fCompiled; + fHelpers=ts.fHelpers; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TSystemDirectory.cxx b/base/src/TSystemDirectory.cxx index b5d8a34e2a6..f4eac2206a0 100644 --- a/base/src/TSystemDirectory.cxx +++ b/base/src/TSystemDirectory.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TSystemDirectory.cxx,v 1.9 2005/11/16 20:04:11 pcanal Exp $ +// @(#)root/base:$Name: $:$Id: TSystemDirectory.cxx,v 1.10 2006/05/23 04:47:35 brun Exp $ // Author: Christian Bormann 13/10/97 /************************************************************************* @@ -53,16 +53,20 @@ TSystemDirectory::TSystemDirectory(const TSystemDirectory& sd) : TSystemFile(sd), fDirsInBrowser(sd.fDirsInBrowser), fFilesInBrowser(sd.fFilesInBrowser) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TSystemDirectory& TSystemDirectory::operator=(const TSystemDirectory& sd) { - if(this!=&sd) { - TSystemFile::operator=(sd); - fDirsInBrowser=sd.fDirsInBrowser; - fFilesInBrowser=sd.fFilesInBrowser; - } return *this; + //equal operator + if(this!=&sd) { + TSystemFile::operator=(sd); + fDirsInBrowser=sd.fDirsInBrowser; + fFilesInBrowser=sd.fFilesInBrowser; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TTask.cxx b/base/src/TTask.cxx index b505484e3e3..fdbd9ea871e 100644 --- a/base/src/TTask.cxx +++ b/base/src/TTask.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TTask.cxx,v 1.12 2005/11/16 20:04:11 pcanal Exp $ +// @(#)root/base:$Name: $:$Id: TTask.cxx,v 1.13 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun 02/09/2000 /************************************************************************* @@ -117,15 +117,17 @@ TTask::TTask(const char* name, const char *title) //______________________________________________________________________________ TTask& TTask::operator=(const TTask& tt) { - if(this!=&tt) { - TNamed::operator=(tt); - fTasks=tt.fTasks; - fOption=tt.fOption; - fBreakin=tt.fBreakin; - fBreakout=tt.fBreakout; - fHasExecuted=tt.fHasExecuted; - fActive=tt.fActive; - } return *this; + //equal operator + if(this!=&tt) { + TNamed::operator=(tt); + fTasks=tt.fTasks; + fOption=tt.fOption; + fBreakin=tt.fBreakin; + fBreakout=tt.fBreakout; + fHasExecuted=tt.fHasExecuted; + fActive=tt.fActive; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TTimer.cxx b/base/src/TTimer.cxx index 845dea030fc..0dc82cd96b5 100644 --- a/base/src/TTimer.cxx +++ b/base/src/TTimer.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TTimer.cxx,v 1.11 2004/05/26 10:38:55 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TTimer.cxx,v 1.12 2006/05/23 04:47:35 brun Exp $ // Author: Fons Rademakers 28/11/96 /************************************************************************* @@ -130,22 +130,26 @@ TTimer::TTimer(const TTimer &ti) : fTimeID(ti.fTimeID), fObject(ti.fObject), fCommand(ti.fCommand) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TTimer& TTimer::operator=(const TTimer &ti) { - if(this!=&ti) { - TSysEvtHandler::operator=(ti); - fTime=ti.fTime; - fAbsTime=ti.fAbsTime; - fTimeout=ti.fTimeout; - fSync=ti.fSync; - fIntSyscalls=ti.fIntSyscalls; - fTimeID=ti.fTimeID; - fObject=ti.fObject; - fCommand=ti.fCommand; - } return *this; + //equal operator + if(this!=&ti) { + TSysEvtHandler::operator=(ti); + fTime=ti.fTime; + fAbsTime=ti.fAbsTime; + fTimeout=ti.fTimeout; + fSync=ti.fSync; + fIntSyscalls=ti.fIntSyscalls; + fTimeID=ti.fTimeID; + fObject=ti.fObject; + fCommand=ti.fCommand; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TView.cxx b/base/src/TView.cxx index be3a8671914..4e67c804518 100644 --- a/base/src/TView.cxx +++ b/base/src/TView.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TView.cxx,v 1.37 2006/05/18 07:34:25 brun Exp $ +// @(#)root/base:$Name: $:$Id: TView.cxx,v 1.38 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun, Nenad Buncic, Evgueni Tcherniaev, Olivier Couet 18/08/95 /************************************************************************* @@ -79,52 +79,14 @@ TView::TView(const TView& tv) : fAutoRange(tv.fAutoRange), fChanged(tv.fChanged) { - for(Int_t i=0; i<16; i++) { - fTN[i]=tv.fTN[i]; - fTB[i]=tv.fTB[i]; - fTnorm[i]=tv.fTnorm[i]; - fTback[i]=tv.fTback[i]; - } - for(Int_t i=0; i<3; i++) { - fRmax[i]=tv.fRmax[i]; - fRmin[i]=tv.fRmin[i]; - fUVcoord[4]=tv.fUVcoord[4]; - fX1[i]=tv.fX1[i]; - fX2[i]=tv.fX2[i]; - fY1[i]=tv.fY1[i]; - fY2[i]=tv.fY2[i]; - fZ1[i]=tv.fZ1[i]; - fZ2[i]=tv.fZ2[i]; - } - for(Int_t i=0; i<4; i++) - fUVcoord[i]=tv.fUVcoord[i]; -} - -//____________________________________________________________________________ -TView& TView::operator=(const TView& tv) -{ - if(this!=&tv) { - TObject::operator=(tv); - TAttLine::operator=(tv); - fLatitude=tv.fLatitude; - fLongitude=tv.fLongitude; - fPsi=tv.fPsi; - fDview=tv.fDview; - fDproj=tv.fDproj; - fUpix=tv.fUpix; - fVpix=tv.fVpix; - fSystem=tv.fSystem; - fOutline=tv.fOutline; - fDefaultOutline=tv.fDefaultOutline; - fAutoRange=tv.fAutoRange; - fChanged=tv.fChanged; - for(Int_t i=0; i<16; i++) { + //copy constructor + for(Int_t i=0; i<16; i++) { fTN[i]=tv.fTN[i]; fTB[i]=tv.fTB[i]; fTnorm[i]=tv.fTnorm[i]; fTback[i]=tv.fTback[i]; - } - for(Int_t i=0; i<3; i++) { + } + for(Int_t i=0; i<3; i++) { fRmax[i]=tv.fRmax[i]; fRmin[i]=tv.fRmin[i]; fUVcoord[4]=tv.fUVcoord[4]; @@ -134,10 +96,51 @@ TView& TView::operator=(const TView& tv) fY2[i]=tv.fY2[i]; fZ1[i]=tv.fZ1[i]; fZ2[i]=tv.fZ2[i]; - } - for(Int_t i=0; i<4; i++) + } + for(Int_t i=0; i<4; i++) fUVcoord[i]=tv.fUVcoord[i]; - } return *this; +} + +//____________________________________________________________________________ +TView& TView::operator=(const TView& tv) +{ + //equal operator + if(this!=&tv) { + TObject::operator=(tv); + TAttLine::operator=(tv); + fLatitude=tv.fLatitude; + fLongitude=tv.fLongitude; + fPsi=tv.fPsi; + fDview=tv.fDview; + fDproj=tv.fDproj; + fUpix=tv.fUpix; + fVpix=tv.fVpix; + fSystem=tv.fSystem; + fOutline=tv.fOutline; + fDefaultOutline=tv.fDefaultOutline; + fAutoRange=tv.fAutoRange; + fChanged=tv.fChanged; + for(Int_t i=0; i<16; i++) { + fTN[i]=tv.fTN[i]; + fTB[i]=tv.fTB[i]; + fTnorm[i]=tv.fTnorm[i]; + fTback[i]=tv.fTback[i]; + } + for(Int_t i=0; i<3; i++) { + fRmax[i]=tv.fRmax[i]; + fRmin[i]=tv.fRmin[i]; + fUVcoord[4]=tv.fUVcoord[4]; + fX1[i]=tv.fX1[i]; + fX2[i]=tv.fX2[i]; + fY1[i]=tv.fY1[i]; + fY2[i]=tv.fY2[i]; + fZ1[i]=tv.fZ1[i]; + fZ2[i]=tv.fZ2[i]; + } + for(Int_t i=0; i<4; i++) + fUVcoord[i]=tv.fUVcoord[i]; + } + return *this; } //____________________________________________________________________________ @@ -1850,10 +1853,10 @@ void TView::MoveFocus(Double_t *cov, Double_t dx, Double_t dy, Double_t dz, Int_ //_______________________________________________________________________________________ void TView::MoveViewCommand(Char_t option, Int_t count) { - //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + // //*-* 'a' //*-* increase scale factor (clip cube borders) //*-* 's' //*-* decrease scale factor (clip cube borders) - //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + // if (count <= 0) count = 1; switch (option) { case '+': diff --git a/base/src/TVirtualFitter.cxx b/base/src/TVirtualFitter.cxx index 64c8ebea25b..89a85f6e44f 100644 --- a/base/src/TVirtualFitter.cxx +++ b/base/src/TVirtualFitter.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TVirtualFitter.cxx,v 1.14 2005/11/29 19:02:58 brun Exp $ +// @(#)root/base:$Name: $:$Id: TVirtualFitter.cxx,v 1.15 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun 31/08/99 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * @@ -55,29 +55,33 @@ TVirtualFitter::TVirtualFitter(const TVirtualFitter& tvf) : fUserFunc(tvf.fUserFunc), fMethodCall(tvf.fMethodCall), fFCN(tvf.fFCN) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TVirtualFitter& TVirtualFitter::operator=(const TVirtualFitter& tvf) { - if(this!=&tvf) { - TNamed::operator=(tvf); - fOption=tvf.fOption; - fXfirst=tvf.fXfirst; - fXlast=tvf.fXlast; - fYfirst=tvf.fYfirst; - fYlast=tvf.fYlast; - fZfirst=tvf.fZfirst; - fZlast=tvf.fZlast; - fNpoints=tvf.fNpoints; - fPointSize=tvf.fPointSize; - fCacheSize=tvf.fCacheSize; - fCache=tvf.fCache; - fObjectFit=tvf.fObjectFit; - fUserFunc=tvf.fUserFunc; - fMethodCall=tvf.fMethodCall; - fFCN=tvf.fFCN; - } return *this; + //equal operator + if(this!=&tvf) { + TNamed::operator=(tvf); + fOption=tvf.fOption; + fXfirst=tvf.fXfirst; + fXlast=tvf.fXlast; + fYfirst=tvf.fYfirst; + fYlast=tvf.fYlast; + fZfirst=tvf.fZfirst; + fZlast=tvf.fZlast; + fNpoints=tvf.fNpoints; + fPointSize=tvf.fPointSize; + fCacheSize=tvf.fCacheSize; + fCache=tvf.fCache; + fObjectFit=tvf.fObjectFit; + fUserFunc=tvf.fUserFunc; + fMethodCall=tvf.fMethodCall; + fFCN=tvf.fFCN; + } + return *this; } //______________________________________________________________________________ diff --git a/base/src/TVirtualGL.cxx b/base/src/TVirtualGL.cxx index f4e205bc494..3c61b05a624 100644 --- a/base/src/TVirtualGL.cxx +++ b/base/src/TVirtualGL.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TVirtualGL.cxx,v 1.6 2005/11/17 14:43:17 couet Exp $ +// @(#)root/base:$Name: $:$Id: TVirtualGL.cxx,v 1.7 2006/03/08 21:09:42 brun Exp $ // Author: Valery Fine(fine@vxcern.cern.ch) 05/03/97 ////////////////////////////////////////////////////////////////////////// @@ -25,7 +25,7 @@ TVirtualGL * (*gPtr2VirtualGL)() = 0; //____________________________________________________________________________ TVirtualGL::TVirtualGL(TVirtualGLImp *imp) : TNamed("gVirtualGL", "") { - // ctor + // constructor fImp = imp; } @@ -33,7 +33,7 @@ TVirtualGL::TVirtualGL(TVirtualGLImp *imp) : TNamed("gVirtualGL", "") //____________________________________________________________________________ TVirtualGL::TVirtualGL(const char *name) : TNamed("gVirtualGL", name) { - // ctor. + // constructor. TString cmd = "new "; cmd += name; @@ -43,7 +43,7 @@ TVirtualGL::TVirtualGL(const char *name) : TNamed("gVirtualGL", name) //____________________________________________________________________________ TVirtualGL *& TVirtualGL::Instance() { - // + // return an instance static TVirtualGL * instance = 0; diff --git a/cont/src/TList.cxx b/cont/src/TList.cxx index 9495a5c56da..b18a935b1d4 100644 --- a/cont/src/TList.cxx +++ b/cont/src/TList.cxx @@ -1,4 +1,4 @@ -// @(#)root/cont:$Name: v5-11-02 $:$Id: TList.cxx,v 1.18 2006/04/19 08:22:22 rdm Exp $ +// @(#)root/cont:$Name: $:$Id: TList.cxx,v 1.19 2006/05/23 04:47:36 brun Exp $ // Author: Fons Rademakers 10/08/95 /************************************************************************* @@ -65,18 +65,22 @@ TList::TList(const TList& ls) : fLast(ls.fLast), fCache(ls.fCache), fAscending(ls.fAscending) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TList& TList::operator=(const TList& ls) { - if(this!=&ls) { - TSeqCollection::operator=(ls); - fFirst=ls.fFirst; - fLast=ls.fLast; - fCache=ls.fCache; - fAscending=ls.fAscending; - } return *this; + //equal operator + if(this!=&ls) { + TSeqCollection::operator=(ls); + fFirst=ls.fFirst; + fLast=ls.fLast; + fCache=ls.fCache; + fAscending=ls.fAscending; + } + return *this; } //______________________________________________________________________________ diff --git a/eg/inc/TGenerator.h b/eg/inc/TGenerator.h index 8be03865cc6..23520535c20 100644 --- a/eg/inc/TGenerator.h +++ b/eg/inc/TGenerator.h @@ -1,4 +1,4 @@ -// @(#)root/eg:$Name: $:$Id: TGenerator.h,v 1.7 2006/05/15 07:27:03 brun Exp $ +// @(#)root/eg:$Name: $:$Id: TGenerator.h,v 1.8 2006/05/23 04:47:36 brun Exp $ // -*- mode: C++ -*- // Author: Ola Nordmann 21/09/95 @@ -148,15 +148,19 @@ class TParticle; class TGenerator : public TNamed { protected: - Float_t fPtCut; //!Pt cut. Do not show primaries below - Bool_t fShowNeutrons; //!display neutrons if true - TObjArray *fParticles; //->static container of the primary particles - TGenerator(const TGenerator& tg) : - TNamed(tg), fPtCut(tg.fPtCut), fShowNeutrons(tg.fShowNeutrons), - fParticles(tg.fParticles) { } - TGenerator& operator=(const TGenerator& tg) - {if(this!=&tg) {TNamed::operator=(tg); fPtCut=tg.fPtCut; fShowNeutrons=tg.fShowNeutrons; - fParticles=tg.fParticles;} return *this;} + Float_t fPtCut; //!Pt cut. Do not show primaries below + Bool_t fShowNeutrons; //!display neutrons if true + TObjArray *fParticles; //->static container of the primary particles + + TGenerator(const TGenerator& tg) : + TNamed(tg), fPtCut(tg.fPtCut), fShowNeutrons(tg.fShowNeutrons),fParticles(tg.fParticles) { } + TGenerator& operator=(const TGenerator& tg) { + if(this!=&tg) { + TNamed::operator=(tg); fPtCut=tg.fPtCut; fShowNeutrons=tg.fShowNeutrons; + fParticles=tg.fParticles; + } + return *this; + } public: diff --git a/eg/src/TGenerator.cxx b/eg/src/TGenerator.cxx index f406acbf71a..858c585b74c 100644 --- a/eg/src/TGenerator.cxx +++ b/eg/src/TGenerator.cxx @@ -1,4 +1,4 @@ -// @(#)root/eg:$Name: $:$Id: TGenerator.cxx,v 1.10 2006/05/15 07:27:03 brun Exp $ +// @(#)root/eg:$Name: $:$Id: TGenerator.cxx,v 1.11 2006/05/16 06:18:27 brun Exp $ // Author: Ola Nordmann 21/09/95 /************************************************************************* @@ -150,12 +150,10 @@ ClassImp(TGenerator) //______________________________________________________________________________ TGenerator::TGenerator(const char *name,const char *title): TNamed(name,title) { -// // Event generator default constructor // - - // Initialize particles table + // Initialize particles table TDatabasePDG::Instance(); //TDatabasePDG *pdg = TDatabasePDG::Instance(); //if (!pdg->ParticleList()) pdg->Init(); @@ -168,7 +166,6 @@ TGenerator::TGenerator(const char *name,const char *title): TNamed(name,title) //______________________________________________________________________________ TGenerator::~TGenerator() { -// // Event generator default destructor // diff --git a/g3d/src/TGeometry.cxx b/g3d/src/TGeometry.cxx index 4392c7ff48c..17e824b41db 100644 --- a/g3d/src/TGeometry.cxx +++ b/g3d/src/TGeometry.cxx @@ -1,4 +1,4 @@ -// @(#)root/g3d:$Name: $:$Id: TGeometry.cxx,v 1.10 2006/05/23 04:47:36 brun Exp $ +// @(#)root/g3d:$Name: $:$Id: TGeometry.cxx,v 1.11 2006/05/24 15:31:40 brun Exp $ // Author: Rene Brun 22/09/95 /************************************************************************* @@ -142,13 +142,14 @@ TGeometry::TGeometry(const TGeometry& geo) : fY(geo.fY), fZ(geo.fZ) { - for(Int_t i=0; i<kMAXLEVELS; i++) { - for(Int_t j=0; j<kVectorSize; j++) - fTranslation[i][j]=geo.fTranslation[i][j]; - for(Int_t j=0; j<kMatrixSize; j++) - fRotMatrix[i][j]=geo.fRotMatrix[i][j]; - fIsReflection[i]=geo.fIsReflection[i]; - } + //copy constructor + for(Int_t i=0; i<kMAXLEVELS; i++) { + for(Int_t j=0; j<kVectorSize; j++) + fTranslation[i][j]=geo.fTranslation[i][j]; + for(Int_t j=0; j<kMatrixSize; j++) + fRotMatrix[i][j]=geo.fRotMatrix[i][j]; + fIsReflection[i]=geo.fIsReflection[i]; + } } //______________________________________________________________________________ diff --git a/geom/src/TGeoCache.cxx b/geom/src/TGeoCache.cxx index 3067f47ec8d..52eabed49e2 100644 --- a/geom/src/TGeoCache.cxx +++ b/geom/src/TGeoCache.cxx @@ -1,4 +1,4 @@ -// @(#)root/geom:$Name: $:$Id: TGeoCache.cxx,v 1.42 2006/05/23 04:47:37 brun Exp $ +// @(#)root/geom:$Name: $:$Id: TGeoCache.cxx,v 1.43 2006/05/24 17:11:54 brun Exp $ // Author: Andrei Gheata 18/03/02 /************************************************************************* @@ -235,7 +235,7 @@ TGeoNodeCache& TGeoNodeCache::operator=(const TGeoNodeCache& gnc) //_____________________________________________________________________________ TGeoNodeCache::~TGeoNodeCache() { -// dtor +// destructor if (fCache) { DeleteCaches(); delete [] fBranch; @@ -936,23 +936,27 @@ TGeoNodeArray::TGeoNodeArray(const TGeoNodeArray& gna) : fNused(gna.fNused), fBitsArray(gna.fBitsArray), fArray(gna.fArray) -{ } +{ + //copy constructor +} //_____________________________________________________________________________ TGeoNodeArray& TGeoNodeArray::operator=(const TGeoNodeArray& gna) { - if(this!=&gna) { - TObject::operator=(gna); - fNodeSize=gna.fNodeSize; - fNdaughters=gna.fNdaughters; - fOffset=gna.fOffset; - fSize=gna.fSize; - fFirstFree=gna.fFirstFree; - fCurrent=gna.fCurrent; - fNused=gna.fNused; - fBitsArray=gna.fBitsArray; - fArray=gna.fArray; - } return *this; + //equal operator + if(this!=&gna) { + TObject::operator=(gna); + fNodeSize=gna.fNodeSize; + fNdaughters=gna.fNdaughters; + fOffset=gna.fOffset; + fSize=gna.fSize; + fFirstFree=gna.fFirstFree; + fCurrent=gna.fCurrent; + fNused=gna.fNused; + fBitsArray=gna.fBitsArray; + fArray=gna.fArray; + } + return *this; } //_____________________________________________________________________________ diff --git a/geom/src/TGeoMaterial.cxx b/geom/src/TGeoMaterial.cxx index cf9ef5d4c82..4f1c3eeb8c7 100644 --- a/geom/src/TGeoMaterial.cxx +++ b/geom/src/TGeoMaterial.cxx @@ -1,4 +1,4 @@ -// @(#)root/geom:$Name: $:$Id: TGeoMaterial.cxx,v 1.28 2006/05/23 04:47:37 brun Exp $ +// @(#)root/geom:$Name: $:$Id: TGeoMaterial.cxx,v 1.29 2006/05/24 17:11:54 brun Exp $ // Author: Andrei Gheata 25/10/01 /************************************************************************* @@ -308,17 +308,21 @@ TGeoMixture::TGeoMixture(const TGeoMixture& gm) : fZmixture(gm.fZmixture), fAmixture(gm.fAmixture), fWeights(gm.fWeights) -{ } +{ + //copy constructor +} //----------------------------------------------------------------------------- TGeoMixture& TGeoMixture::operator=(const TGeoMixture& gm) { - if(this!=&gm) { - TGeoMaterial::operator=(gm); - fNelements=gm.fNelements; - fZmixture=gm.fZmixture; - fAmixture=gm.fAmixture; - fWeights=gm.fWeights; - } return *this; + //equal operator + if(this!=&gm) { + TGeoMaterial::operator=(gm); + fNelements=gm.fNelements; + fZmixture=gm.fZmixture; + fAmixture=gm.fAmixture; + fWeights=gm.fWeights; + } + return *this; } //----------------------------------------------------------------------------- TGeoMixture::~TGeoMixture() diff --git a/geom/src/TGeoMatrix.cxx b/geom/src/TGeoMatrix.cxx index 3c9806db6bd..4cc61e51fcf 100644 --- a/geom/src/TGeoMatrix.cxx +++ b/geom/src/TGeoMatrix.cxx @@ -1,4 +1,4 @@ -// @(#)root/geom:$Name: $:$Id: TGeoMatrix.cxx,v 1.54 2006/04/25 09:38:27 brun Exp $ +// @(#)root/geom:$Name: $:$Id: TGeoMatrix.cxx,v 1.55 2006/04/27 07:46:30 brun Exp $ // Author: Andrei Gheata 25/10/01 /************************************************************************* @@ -1683,7 +1683,7 @@ TGeoGenTrans::TGeoGenTrans() TGeoGenTrans::TGeoGenTrans(const char *name) :TGeoCombiTrans(name) { -// ctor +// constructor SetBit(kGeoGenTrans); for (Int_t i=0; i<3; i++) fTranslation[i] = 0.0; for (Int_t j=0; j<3; j++) fScale[j] = 1.0; @@ -1695,7 +1695,7 @@ TGeoGenTrans::TGeoGenTrans(Double_t dx, Double_t dy, Double_t dz, Double_t sx, Double_t sy, Double_t sz, TGeoRotation *rot) :TGeoCombiTrans("") { -// ctor +// constructor SetBit(kGeoGenTrans); SetTranslation(dx, dy, dz); SetScale(sx, sy, sz); @@ -1707,7 +1707,7 @@ TGeoGenTrans::TGeoGenTrans(const char *name, Double_t dx, Double_t dy, Double_t Double_t sx, Double_t sy, Double_t sz, TGeoRotation *rot) :TGeoCombiTrans(name) { -// ctor +// constructor SetBit(kGeoGenTrans); SetTranslation(dx, dy, dz); SetScale(sx, sy, sz); @@ -1778,7 +1778,7 @@ TGeoIdentity::TGeoIdentity() TGeoIdentity::TGeoIdentity(const char *name) :TGeoMatrix(name) { -// ctor +// constructor if (!gGeoIdentity) gGeoIdentity = this; RegisterYourself(); } @@ -1814,7 +1814,7 @@ TGeoHMatrix::TGeoHMatrix() TGeoHMatrix::TGeoHMatrix(const char* name) :TGeoMatrix(name) { -// ctor +// constructor memset(&fTranslation[0], 0, kN3); memcpy(fRotationMatrix,kIdentityMatrix,kN9); memcpy(fScale,kUnitScale,kN3); diff --git a/geom/src/TGeoTube.cxx b/geom/src/TGeoTube.cxx index f9d1183e493..f9bffcff313 100644 --- a/geom/src/TGeoTube.cxx +++ b/geom/src/TGeoTube.cxx @@ -1,4 +1,4 @@ -// @(#)root/geom:$Name: $:$Id: TGeoTube.cxx,v 1.65 2005/11/17 13:17:55 brun Exp $ +// @(#)root/geom:$Name: $:$Id: TGeoTube.cxx,v 1.66 2005/11/18 16:07:59 brun Exp $ // Author: Andrei Gheata 24/10/01 // TGeoTube::Contains() and DistFromInside/In() implemented by Mihaela Gheata @@ -2125,7 +2125,7 @@ TGeoCtub::TGeoCtub(Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Dou Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz) :TGeoTubeSeg(rmin, rmax, dz, phi1, phi2) { -// ctor +// constructor fNlow[0] = lx; fNlow[1] = ly; fNlow[2] = lz; @@ -2141,7 +2141,7 @@ TGeoCtub::TGeoCtub(const char *name, Double_t rmin, Double_t rmax, Double_t dz, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz) :TGeoTubeSeg(name, rmin, rmax, dz, phi1, phi2) { -// ctor +// constructor fNlow[0] = lx; fNlow[1] = ly; fNlow[2] = lz; @@ -2165,7 +2165,7 @@ TGeoCtub::TGeoCtub(Double_t *params) //_____________________________________________________________________________ TGeoCtub::~TGeoCtub() { -// dtor +// destructor } //_____________________________________________________________________________ diff --git a/gl/src/TGLBoundingBox.cxx b/gl/src/TGLBoundingBox.cxx index e849472d327..2ceb2f1464c 100644 --- a/gl/src/TGLBoundingBox.cxx +++ b/gl/src/TGLBoundingBox.cxx @@ -1,4 +1,4 @@ -// @(#)root/gl:$Name: $:$Id: TGLBoundingBox.cxx,v 1.17 2005/12/01 11:04:04 brun Exp $ +// @(#)root/gl:$Name: $:$Id: TGLBoundingBox.cxx,v 1.18 2006/01/18 16:57:59 brun Exp $ // Author: Richard Maunder 25/05/2005 /************************************************************************* @@ -309,6 +309,7 @@ void TGLBoundingBox::Transform(const TGLMatrix & matrix) //______________________________________________________________________________ const std::vector<UInt_t> & TGLBoundingBox::FaceVertices(EFace face) const { + //return a vector of face vertices // y // | // | diff --git a/gl/src/TGLHistPainter.cxx b/gl/src/TGLHistPainter.cxx index 6c6284ca2f3..115fe033288 100644 --- a/gl/src/TGLHistPainter.cxx +++ b/gl/src/TGLHistPainter.cxx @@ -103,7 +103,7 @@ Int_t TGLHistPainter::DistancetoPrimitive(Int_t px, Int_t py) //______________________________________________________________________________ void TGLHistPainter::DrawPanel() { - //FIX + //Interface to DrawPanel if (fLastOption == kUnsupported && fDefaultPainter) fDefaultPainter->DrawPanel(); } @@ -189,7 +189,7 @@ void TGLHistPainter::ExecuteEvent(Int_t event, Int_t px, Int_t py) //______________________________________________________________________________ void TGLHistPainter::FitPanel() { - //FIX + //to be FIXed if (fLastOption == kUnsupported && fDefaultPainter) fDefaultPainter->FitPanel(); } @@ -197,28 +197,28 @@ void TGLHistPainter::FitPanel() //______________________________________________________________________________ TList *TGLHistPainter::GetContourList(Double_t contour)const { - //FIX + //to be FIXed return fDefaultPainter->GetContourList(contour); } //______________________________________________________________________________ char *TGLHistPainter::GetObjectInfo(Int_t px, Int_t py)const { - //FIX + //to be FIXed return fDefaultPainter->GetObjectInfo(px, py); } //______________________________________________________________________________ TList *TGLHistPainter::GetStack()const { - //FIX + //to be FIXed return fDefaultPainter->GetStack(); } //______________________________________________________________________________ Bool_t TGLHistPainter::IsInside(Int_t x, Int_t y) { - //FIX + //to be FIXed if (fLastOption == kUnsupported && fDefaultPainter) return fDefaultPainter->IsInside(x, y); @@ -228,7 +228,7 @@ Bool_t TGLHistPainter::IsInside(Int_t x, Int_t y) //______________________________________________________________________________ Bool_t TGLHistPainter::IsInside(Double_t x, Double_t y) { - //FIX + //to be FIXed if (fLastOption == kUnsupported && fDefaultPainter) return fDefaultPainter->IsInside(x, y); @@ -238,7 +238,7 @@ Bool_t TGLHistPainter::IsInside(Double_t x, Double_t y) //______________________________________________________________________________ void TGLHistPainter::PaintStat(Int_t dostat, TF1 *fit) { - //FIX + //to be FIXed if (fDefaultPainter) fDefaultPainter->PaintStat(dostat, fit); } @@ -246,7 +246,7 @@ void TGLHistPainter::PaintStat(Int_t dostat, TF1 *fit) //______________________________________________________________________________ void TGLHistPainter::ProcessMessage(const char *mess, const TObject *obj) { - //FIX + //to be FIXed static const TString tf3String("SetF3"); if (tf3String == mess) { @@ -259,7 +259,7 @@ void TGLHistPainter::ProcessMessage(const char *mess, const TObject *obj) //______________________________________________________________________________ void TGLHistPainter::SetHistogram(TH1 *hist) { - //FIX + //to be FIXed fHist = hist; if(fDefaultPainter) @@ -269,7 +269,7 @@ void TGLHistPainter::SetHistogram(TH1 *hist) //______________________________________________________________________________ void TGLHistPainter::SetStack(TList *stack) { - //FIX + //to be FIXed if (fLastOption == kUnsupported && fDefaultPainter) fDefaultPainter->SetStack(stack); } @@ -277,7 +277,7 @@ void TGLHistPainter::SetStack(TList *stack) //______________________________________________________________________________ Int_t TGLHistPainter::MakeCuts(char *cutsOpt) { - //FIX + //to be FIXed return fDefaultPainter ? fDefaultPainter->MakeCuts(cutsOpt) : 0; } @@ -1945,7 +1945,7 @@ namespace { void TGLHistPainter::Pan(Int_t x, Int_t y) { - // Pan + // Panning Double_t mvMatrix[16] = {0.}; glGetDoublev(GL_MODELVIEW_MATRIX, mvMatrix); diff --git a/graf/src/TSpline.cxx b/graf/src/TSpline.cxx index 85f03a25044..add05b8dc46 100644 --- a/graf/src/TSpline.cxx +++ b/graf/src/TSpline.cxx @@ -1,4 +1,4 @@ -// @(#)root/graf:$Name: $:$Id: TSpline.cxx,v 1.14 2006/05/23 04:47:38 brun Exp $ +// @(#)root/graf:$Name: $:$Id: TSpline.cxx,v 1.15 2006/05/24 16:44:33 brun Exp $ // Author: Federico Carminati 28/02/2000 /************************************************************************* @@ -637,7 +637,7 @@ Int_t TSpline3::FindX(Double_t x) const //____________________________________________________________________________ Double_t TSpline3::Eval(Double_t x) const { - // Eval + // Eval this spline at x Int_t klow=FindX(x); return fPoly[klow].Eval(x); @@ -1330,7 +1330,7 @@ Int_t TSpline5::FindX(Double_t x) const //___________________________________________________________________________ Double_t TSpline5::Eval(Double_t x) const { - // Eval + // Eval this spline at x Int_t klow=FindX(x); return fPoly[klow].Eval(x); diff --git a/gui/src/TG3DLine.cxx b/gui/src/TG3DLine.cxx index 8b52eb35246..afa94812f29 100644 --- a/gui/src/TG3DLine.cxx +++ b/gui/src/TG3DLine.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TG3DLine.cxx,v 1.3 2005/11/17 19:09:28 rdm Exp $ +// @(#)root/gui:$Name: $:$Id: TG3DLine.cxx,v 1.4 2006/04/24 13:50:29 antcheva Exp $ // Author: Fons Rademakers 6/09/2000 /************************************************************************* @@ -32,7 +32,7 @@ TGHorizontal3DLine::TGHorizontal3DLine(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, Pixel_t back) : TGFrame(p, w, h, options, back) { - // ctor + // constructor SetWindowName(); fEditDisabled = kEditDisableHeight; @@ -47,7 +47,7 @@ TGVertical3DLine::TGVertical3DLine(const TGWindow *p, UInt_t w, UInt_t h, UInt_t options, Pixel_t back) : TGFrame(p, w, h, options, back) { - // ctor + // constructor SetWindowName(); fEditDisabled = kEditDisableWidth; diff --git a/gui/src/TGButton.cxx b/gui/src/TGButton.cxx index fa6c65d88a1..f8bda037704 100644 --- a/gui/src/TGButton.cxx +++ b/gui/src/TGButton.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TGButton.cxx,v 1.66 2006/05/23 04:47:38 brun Exp $ +// @(#)root/gui:$Name: $:$Id: TGButton.cxx,v 1.67 2006/05/24 18:20:11 brun Exp $ // Author: Fons Rademakers 06/01/98 /************************************************************************* @@ -753,7 +753,7 @@ TGPictureButton::TGPictureButton(const TGWindow *p, const char *pic, //______________________________________________________________________________ TGPictureButton::~TGPictureButton() { - // dtor + // destructor if (fOwnDisabledPic) fClient->FreePicture(fPicD); } diff --git a/gui/src/TGProgressBar.cxx b/gui/src/TGProgressBar.cxx index e9595608dd7..7b2433483e8 100644 --- a/gui/src/TGProgressBar.cxx +++ b/gui/src/TGProgressBar.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TGProgressBar.cxx,v 1.12 2005/11/17 19:09:28 rdm Exp $ +// @(#)root/gui:$Name: $:$Id: TGProgressBar.cxx,v 1.13 2006/04/24 13:52:12 antcheva Exp $ // Author: Fons Rademakers 10/10/2000 /************************************************************************* @@ -337,7 +337,7 @@ TGVProgressBar::TGVProgressBar(const TGWindow *p, UInt_t w, UInt_t h, FontStruct_t font,UInt_t options) : TGProgressBar(p, w, h, back, barcolor, norm, font, options) { - // ctor + // cconstructor fBarWidth = w; fEditDisabled = kEditDisableWidth; diff --git a/gui/src/TGString.cxx b/gui/src/TGString.cxx index 50d8ff683d0..1cbbbf78d8b 100644 --- a/gui/src/TGString.cxx +++ b/gui/src/TGString.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TGString.cxx,v 1.4 2004/07/23 16:51:01 brun Exp $ +// @(#)root/gui:$Name: $:$Id: TGString.cxx,v 1.5 2004/07/25 07:21:45 brun Exp $ // Author: Fons Rademakers 05/01/98 /************************************************************************* @@ -41,7 +41,7 @@ ClassImp(TGHotString) //______________________________________________________________________________ TGString::TGString(const TGString *s) : TString(s->Data()) { - // ctor + // cconstructor } //______________________________________________________________________________ diff --git a/gui/src/TGuiBuilder.cxx b/gui/src/TGuiBuilder.cxx index c181fecb696..099e65020e7 100644 --- a/gui/src/TGuiBuilder.cxx +++ b/gui/src/TGuiBuilder.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TGuiBuilder.cxx,v 1.5 2006/03/20 21:43:42 pcanal Exp $ +// @(#)root/gui:$Name: $:$Id: TGuiBuilder.cxx,v 1.6 2006/03/28 16:19:37 antcheva Exp $ // Author: Valeriy Onuchin 12/08/04 /************************************************************************* @@ -100,19 +100,19 @@ TGuiBldAction::TGuiBldAction(const char *name, const char *title, Int_t type, TGLayoutHints *hints) : TNamed(name, title), fType(type), fHints(hints) { - // ctor + // cconstructor } //______________________________________________________________________________ TGuiBldAction::~TGuiBldAction() { - // dtor + // destructor } //______________________________________________________________________________ TGuiBuilder::TGuiBuilder() { - // ctor + // constructor // load plugin if (!gGuiBuilder) { @@ -131,7 +131,7 @@ TGuiBuilder::TGuiBuilder() //______________________________________________________________________________ TGuiBuilder::~TGuiBuilder() { - // dtor + // destructor } //______________________________________________________________________________ diff --git a/gui/src/TRootBrowser.cxx b/gui/src/TRootBrowser.cxx index 46660d25b8d..4f3afef6893 100644 --- a/gui/src/TRootBrowser.cxx +++ b/gui/src/TRootBrowser.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TRootBrowser.cxx,v 1.95 2006/04/14 17:54:11 brun Exp $ +// @(#)root/gui:$Name: $:$Id: TRootBrowser.cxx,v 1.96 2006/05/04 17:08:54 rdm Exp $ // Author: Fons Rademakers 27/02/98 /************************************************************************* @@ -298,7 +298,7 @@ public: //______________________________________________________________________________ TRootIconList::TRootIconList(TRootIconBox* box) { - // ctor + // constructor fPic = gClient->GetPicture("listview.xpm"); fIconBox = box; @@ -308,7 +308,7 @@ TRootIconList::TRootIconList(TRootIconBox* box) //______________________________________________________________________________ TRootIconList::~TRootIconList() { - // dtor + // destructor gClient->FreePicture(fPic); } @@ -408,7 +408,7 @@ TRootIconBox::TRootIconBox(TGListView *lv, UInt_t options, ULong_t back) : //______________________________________________________________________________ TRootIconBox::~TRootIconBox() { - // dtor + // destructor RemoveAll(); RemoveGarbage(); diff --git a/gui/src/TRootHelpDialog.cxx b/gui/src/TRootHelpDialog.cxx index 0f6ab2a257f..b4100fe1720 100644 --- a/gui/src/TRootHelpDialog.cxx +++ b/gui/src/TRootHelpDialog.cxx @@ -1,4 +1,4 @@ -// @(#)root/gui:$Name: $:$Id: TRootHelpDialog.cxx,v 1.7 2004/09/13 09:10:56 rdm Exp $ +// @(#)root/gui:$Name: $:$Id: TRootHelpDialog.cxx,v 1.8 2006/05/23 04:47:38 brun Exp $ // Author: Fons Rademakers 24/02/98 /************************************************************************* @@ -58,18 +58,22 @@ TRootHelpDialog::TRootHelpDialog(const TRootHelpDialog& rd) : fOK(rd.fOK), fL1(rd.fL1), fL2(rd.fL2) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TRootHelpDialog& TRootHelpDialog::operator=(const TRootHelpDialog& rd) { - if(this!=&rd) { - TGTransientFrame::operator=(rd); - fView=rd.fView; - fOK=rd.fOK; - fL1=rd.fL1; - fL2=rd.fL2; - } return *this; + //equal operator + if(this!=&rd) { + TGTransientFrame::operator=(rd); + fView=rd.fView; + fOK=rd.fOK; + fL1=rd.fL1; + fL2=rd.fL2; + } + return *this; } //______________________________________________________________________________ diff --git a/guibuilder/src/TGuiBldEditor.cxx b/guibuilder/src/TGuiBldEditor.cxx index 0f256b90499..26928fbc7f2 100644 --- a/guibuilder/src/TGuiBldEditor.cxx +++ b/guibuilder/src/TGuiBldEditor.cxx @@ -1,4 +1,4 @@ -// @(#)root/guibuilder:$Name: $:$Id: TGuiBldEditor.cxx,v 1.10 2006/03/30 09:58:48 antcheva Exp $ +// @(#)root/guibuilder:$Name: $:$Id: TGuiBldEditor.cxx,v 1.11 2006/04/07 10:05:09 antcheva Exp $ // Author: Valeriy Onuchin 12/09/04 /************************************************************************* @@ -252,7 +252,7 @@ TGuiBldEditor::TGuiBldEditor(const TGWindow *p) : TGCompositeFrame(p, 1, 1) //______________________________________________________________________________ TGuiBldEditor::~TGuiBldEditor() { - // dtor + // destructor } diff --git a/hist/src/TMultiDimFit.cxx b/hist/src/TMultiDimFit.cxx index dce66de1e20..56466b76e13 100644 --- a/hist/src/TMultiDimFit.cxx +++ b/hist/src/TMultiDimFit.cxx @@ -1,4 +1,4 @@ -// @(#)root/hist:$Name: $:$Id: TMultiDimFit.cxx,v 1.24 2006/02/03 21:55:39 pcanal Exp $ +// @(#)root/hist:$Name: $:$Id: TMultiDimFit.cxx,v 1.25 2006/05/17 09:37:20 couet Exp $ // Author: Christian Holm Christensen 07/11/2000 //____________________________________________________________________ @@ -1896,7 +1896,7 @@ TMultiDimFit::TMultiDimFit(Int_t dimension, //____________________________________________________________________ TMultiDimFit::~TMultiDimFit() { - // DTOR + // Destructor delete [] fPowers; delete [] fMaxPowers; delete [] fMaxPowersFinal; diff --git a/hist/src/TSpectrum.cxx b/hist/src/TSpectrum.cxx index 37d6df0b4ee..b839b2522cc 100644 --- a/hist/src/TSpectrum.cxx +++ b/hist/src/TSpectrum.cxx @@ -1,4 +1,4 @@ -// @(#)root/hist:$Name: $:$Id: TSpectrum.cxx,v 1.41 2006/05/17 09:37:21 couet Exp $ +// @(#)root/hist:$Name: $:$Id: TSpectrum.cxx,v 1.42 2006/05/17 16:37:26 couet Exp $ // Author: Miroslav Morhac 27/05/99 //__________________________________________________________________________ @@ -138,7 +138,7 @@ const char *TSpectrum::Background(const TH1 * h, int numberIterations, // Function parameters: // // spectrum: pointer to the vector of source spectrum // // size: length of spectrum and working space vectors // -// numberIterations, for details we refer to manual // +// numberIterations, for details we refer to manual // // // ///////////////////////////////////////////////////////////////////////////// Error("Background","function not yet implemented: h=%s, iter=%d, option=%sn" @@ -272,7 +272,7 @@ const char *TSpectrum::Background(float *spectrum, int ssize, // ONE-DIMENSIONAL BACKGROUND ESTIMATION FUNCTION - GENERAL FUNCTION // // This function calculates background spectrum from source spectrum. -// The result is placed in the vector pointed by spectrum pointer. +// The result is placed in the vector pointed by spe1945ctrum pointer. // // Function parameters: // spectrum-pointer to the vector of source spectrum diff --git a/io/src/TKey.cxx b/io/src/TKey.cxx index 8cd87f1e731..29f13fd4a5b 100644 --- a/io/src/TKey.cxx +++ b/io/src/TKey.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: v5-11-02 $:$Id: TKey.cxx,v 1.56 2006/04/19 08:22:22 rdm Exp $ +// @(#)root/base:$Name: $:$Id: TKey.cxx,v 1.57 2006/05/23 04:47:35 brun Exp $ // Author: Rene Brun 28/12/94 /************************************************************************* @@ -97,34 +97,32 @@ TKey::TKey(const TKey& tk) : fSeekPdir(tk.fSeekPdir), fClassName(tk.fClassName), fLeft(tk.fLeft), fBuffer(tk.fBuffer), fBufferRef(tk.fBufferRef), fPidOffset(tk.fPidOffset), fMotherDir(tk.fMotherDir) { - - // Standard constructor + // copy constructor } //______________________________________________________________________________ TKey& TKey::operator=(const TKey& tk) { - - // equal operator + // equal operator - if(this!=&tk) { - TNamed::operator=(tk); - fVersion=tk.fVersion; - fNbytes=tk.fNbytes; - fObjlen=tk.fObjlen; - fDatime=tk.fDatime; - fKeylen=tk.fKeylen; - fCycle=tk.fCycle; - fSeekKey=tk.fSeekKey; - fSeekPdir=tk.fSeekPdir; - fClassName=tk.fClassName; - fLeft=tk.fLeft; - fBuffer=tk.fBuffer; - fBufferRef=tk.fBufferRef; - fPidOffset=tk.fPidOffset; - fMotherDir=tk.fMotherDir; - } - return *this; + if(this!=&tk) { + TNamed::operator=(tk); + fVersion=tk.fVersion; + fNbytes=tk.fNbytes; + fObjlen=tk.fObjlen; + fDatime=tk.fDatime; + fKeylen=tk.fKeylen; + fCycle=tk.fCycle; + fSeekKey=tk.fSeekKey; + fSeekPdir=tk.fSeekPdir; + fClassName=tk.fClassName; + fLeft=tk.fLeft; + fBuffer=tk.fBuffer; + fBufferRef=tk.fBufferRef; + fPidOffset=tk.fPidOffset; + fMotherDir=tk.fMotherDir; + } + return *this; } //______________________________________________________________________________ diff --git a/math/src/TRandom.cxx b/math/src/TRandom.cxx index 18cd9f99fcb..5082872400c 100644 --- a/math/src/TRandom.cxx +++ b/math/src/TRandom.cxx @@ -1,4 +1,4 @@ -// @(#)root/base:$Name: $:$Id: TRandom.cxx,v 1.28 2006/05/23 10:12:17 brun Exp $ +// @(#)root/base:$Name: $:$Id: TRandom.cxx,v 1.29 2006/05/24 15:34:51 brun Exp $ // Author: Rene Brun, Lorenzo Moneta 15/12/95 /************************************************************************* @@ -526,41 +526,41 @@ Int_t TRandom::Poisson(Double_t mean) Int_t n; if (mean <= 0) return 0; if (mean < 25) { - Double_t expmean = TMath::Exp(-mean); - Double_t pir = 1; - n = -1; - while(1) { - n++; - pir *= Rndm(); - if (pir <= expmean) break; - } - return n; + Double_t expmean = TMath::Exp(-mean); + Double_t pir = 1; + n = -1; + while(1) { + n++; + pir *= Rndm(); + if (pir <= expmean) break; + } + return n; } // for large value we use inversion method else if (mean < 1E9) { - Double_t em, t, y; - Double_t sq, alxm, g; - Double_t pi = TMath::Pi(); + Double_t em, t, y; + Double_t sq, alxm, g; + Double_t pi = TMath::Pi(); - sq = TMath::Sqrt(2.0*mean); - alxm = TMath::Log(mean); - g = mean*alxm - TMath::LnGamma(mean + 1.0); + sq = TMath::Sqrt(2.0*mean); + alxm = TMath::Log(mean); + g = mean*alxm - TMath::LnGamma(mean + 1.0); - do { do { - y = TMath::Tan(pi*Rndm()); - em = sq*y + mean; - } while( em < 0.0 ); + do { + y = TMath::Tan(pi*Rndm()); + em = sq*y + mean; + } while( em < 0.0 ); - em = TMath::Floor(em); - t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); - } while( Rndm() > t ); + em = TMath::Floor(em); + t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); + } while( Rndm() > t ); - return static_cast<Int_t> (em); + return static_cast<Int_t> (em); } else { - // use Gaussian approximation vor very large values + // use Gaussian approximation vor very large values n = Int_t(Gaus(0,1)*TMath::Sqrt(mean) + mean +0.5); return n; } @@ -578,41 +578,40 @@ Double_t TRandom::PoissonD(Double_t mean) Int_t n; if (mean <= 0) return 0; if (mean < 25) { - Double_t expmean = TMath::Exp(-mean); - Double_t pir = 1; - n = -1; - while(1) { - n++; - pir *= Rndm(); - if (pir <= expmean) break; - } - return static_cast<Double_t>(n); + Double_t expmean = TMath::Exp(-mean); + Double_t pir = 1; + n = -1; + while(1) { + n++; + pir *= Rndm(); + if (pir <= expmean) break; + } + return static_cast<Double_t>(n); } // for large value we use inversion method else if (mean < 1E9) { - Double_t em, t, y; - Double_t sq, alxm, g; - Double_t pi = TMath::Pi(); + Double_t em, t, y; + Double_t sq, alxm, g; + Double_t pi = TMath::Pi(); - sq = TMath::Sqrt(2.0*mean); - alxm = TMath::Log(mean); - g = mean*alxm - TMath::LnGamma(mean + 1.0); + sq = TMath::Sqrt(2.0*mean); + alxm = TMath::Log(mean); + g = mean*alxm - TMath::LnGamma(mean + 1.0); - do { do { - y = TMath::Tan(pi*Rndm()); - em = sq*y + mean; - } while( em < 0.0 ); + do { + y = TMath::Tan(pi*Rndm()); + em = sq*y + mean; + } while( em < 0.0 ); - em = TMath::Floor(em); - t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); - } while( Rndm() > t ); + em = TMath::Floor(em); + t = 0.9*(1.0 + y*y)* TMath::Exp(em*alxm - TMath::LnGamma(em + 1.0) - g); + } while( Rndm() > t ); - return em; + return em; - } - else { - // use Gaussian approximation vor very large values + } else { + // use Gaussian approximation vor very large values return Gaus(0,1)*TMath::Sqrt(mean) + mean +0.5; } } diff --git a/matrix/src/TDecompLU.cxx b/matrix/src/TDecompLU.cxx index 464dede6842..0e0afbc1403 100644 --- a/matrix/src/TDecompLU.cxx +++ b/matrix/src/TDecompLU.cxx @@ -1,4 +1,4 @@ -// @(#)root/matrix:$Name: $:$Id: TDecompLU.cxx,v 1.24 2006/04/19 08:22:24 rdm Exp $ +// @(#)root/matrix:$Name: $:$Id: TDecompLU.cxx,v 1.25 2006/05/24 20:07:45 brun Exp $ // Authors: Fons Rademakers, Eddy Offermann Dec 2003 /************************************************************************* @@ -482,7 +482,7 @@ Bool_t TDecompLU::TransSolve(TMatrixDColumn &cb) r -= pLU[off_j+i]*cb(j+lwb); } } else if (r != 0.0) - nonzero = i; + nonzero = i; const Int_t iperm = fIndex[i]; cb(i+lwb) = cb(iperm+lwb); cb(iperm+lwb) = r; diff --git a/meta/src/TDataMember.cxx b/meta/src/TDataMember.cxx index 66869db2838..ba2bcbc710d 100644 --- a/meta/src/TDataMember.cxx +++ b/meta/src/TDataMember.cxx @@ -1,4 +1,4 @@ -// @(#)root/meta:$Name: $:$Id: TDataMember.cxx,v 1.29 2006/05/23 04:47:40 brun Exp $ +// @(#)root/meta:$Name: $:$Id: TDataMember.cxx,v 1.30 2006/05/24 15:09:22 brun Exp $ // Author: Fons Rademakers 04/02/95 /************************************************************************* @@ -787,20 +787,24 @@ TOptionListItem::TOptionListItem(const TOptionListItem& oli) : fToggleMaskBit(oli.fToggleMaskBit), fOptName(oli.fOptName), fOptLabel(oli.fOptLabel) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TOptionListItem& TOptionListItem::operator=(const TOptionListItem& oli) { - if(this!=&oli) { - TObject::operator=(oli); - fDataMember=oli.fDataMember; - fValue=oli.fValue; - fValueMaskBit=oli.fValueMaskBit; - fToggleMaskBit=oli.fToggleMaskBit; - fOptName=oli.fOptName; - fOptLabel=oli.fOptLabel; - } return *this; + //equal operator + if(this!=&oli) { + TObject::operator=(oli); + fDataMember=oli.fDataMember; + fValue=oli.fValue; + fValueMaskBit=oli.fValueMaskBit; + fToggleMaskBit=oli.fToggleMaskBit; + fOptName=oli.fOptName; + fOptLabel=oli.fOptLabel; + } + return *this; } //______________________________________________________________________________ diff --git a/net/src/TNetFile.cxx b/net/src/TNetFile.cxx index 712f9baddac..0637f3bd3c8 100644 --- a/net/src/TNetFile.cxx +++ b/net/src/TNetFile.cxx @@ -1,4 +1,4 @@ -// @(#)root/net:$Name: $:$Id: TNetFile.cxx,v 1.69 2006/05/23 04:47:40 brun Exp $ +// @(#)root/net:$Name: $:$Id: TNetFile.cxx,v 1.70 2006/05/24 15:10:46 brun Exp $ // Author: Fons Rademakers 14/08/97 /************************************************************************* @@ -859,7 +859,7 @@ void TNetSystem::Create(const char *url, TSocket *sock) //______________________________________________________________________________ TNetSystem::~TNetSystem() { - // Dtor + // Destructor // Close FTP connection if (fFTPOwner) { diff --git a/qtgsi/src/TQRootGuiFactory.cxx b/qtgsi/src/TQRootGuiFactory.cxx index 556f55fdb56..563202e818b 100644 --- a/qtgsi/src/TQRootGuiFactory.cxx +++ b/qtgsi/src/TQRootGuiFactory.cxx @@ -1,4 +1,4 @@ -// @(#)root/qtgsi:$Name: $:$Id: TQRootGuiFactory.cxx,v 1.1 2006/04/11 16:33:46 rdm Exp $ +// @(#)root/qtgsi:$Name: $:$Id: TQRootGuiFactory.cxx,v 1.2 2006/04/12 10:07:21 brun Exp $ // Author: Denis Bertini, M. Al-Turany 01/11/2000 /************************************************************************* @@ -39,7 +39,7 @@ TQRootGuiFactory::TQRootGuiFactory(const char *name, const char *title) //______________________________________________________________________________ TQRootGuiFactory::~TQRootGuiFactory() { - //dtor + //destructor } //______________________________________________________________________________ diff --git a/tmva/src/MethodBDT.cxx b/tmva/src/MethodBDT.cxx index 82a10bdf275..9d3c086e20f 100644 --- a/tmva/src/MethodBDT.cxx +++ b/tmva/src/MethodBDT.cxx @@ -1,4 +1,4 @@ -// @(#)root/tmva $Id: MethodBDT.cxx,v 1.12 2006/05/23 09:53:10 stelzer Exp $ +// @(#)root/tmva $Id: MethodBDT.cxx,v 1.3 2006/05/23 19:35:06 brun Exp $ // Author: Andreas Hoecker, Joerg Stelzer, Helge Voss, Kai Voss /********************************************************************************** @@ -252,6 +252,7 @@ void TMVA::MethodBDT::InitBDT( void ) //_______________________________________________________________________ TMVA::MethodBDT::~MethodBDT( void ) { + //destructor for (UInt_t i=0; i<fEventSample.size(); i++) delete fEventSample[i]; for (UInt_t i=0; i<fForest.size(); i++) delete fForest[i]; } diff --git a/tree/src/TSelector.cxx b/tree/src/TSelector.cxx index 6c438bfde25..88127a0195a 100644 --- a/tree/src/TSelector.cxx +++ b/tree/src/TSelector.cxx @@ -1,4 +1,4 @@ -// @(#)root/tree:$Name: v5-11-02 $:$Id: TSelector.cxx,v 1.21 2006/03/20 21:43:44 pcanal Exp $ +// @(#)root/tree:$Name: $:$Id: TSelector.cxx,v 1.22 2006/05/23 04:47:42 brun Exp $ // Author: Rene Brun 05/02/97 /************************************************************************* @@ -61,19 +61,23 @@ TSelector::TSelector(const TSelector& sel) : fObject(sel.fObject), fInput(sel.fInput), fOutput(sel.fOutput) -{ } +{ + //copy constructor +} //______________________________________________________________________________ TSelector& TSelector::operator=(const TSelector& sel) { - if(this!=&sel) { - TObject::operator=(sel); - fStatus=sel.fStatus; - fOption=sel.fOption; - fObject=sel.fObject; - fInput=sel.fInput; - fOutput=sel.fOutput; - } return *this; + //equal operator + if(this!=&sel) { + TObject::operator=(sel); + fStatus=sel.fStatus; + fOption=sel.fOption; + fObject=sel.fObject; + fInput=sel.fInput; + fOutput=sel.fOutput; + } + return *this; } //______________________________________________________________________________ diff --git a/treeplayer/src/TFormLeafInfo.cxx b/treeplayer/src/TFormLeafInfo.cxx index 6a9f6b7a174..bf97a069999 100644 --- a/treeplayer/src/TFormLeafInfo.cxx +++ b/treeplayer/src/TFormLeafInfo.cxx @@ -1,4 +1,4 @@ -// @(#)root/treeplayer:$Name: $:$Id: TFormLeafInfo.cxx,v 1.28 2006/02/22 06:59:15 pcanal Exp $ +// @(#)root/treeplayer:$Name: $:$Id: TFormLeafInfo.cxx,v 1.29 2006/04/19 08:22:26 rdm Exp $ // Author: Philippe Canal 01/06/2004 /************************************************************************* @@ -474,8 +474,6 @@ Bool_t TFormLeafInfo::Update() //______________________________________________________________________________ Int_t TFormLeafInfo::GetCounterValue(TLeaf* leaf) { -//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -//*-* // Return the size of the underlying array for the current entry in the TTree. if (!fCounter) { diff --git a/treeviewer/src/TTreeViewer.cxx b/treeviewer/src/TTreeViewer.cxx index 1c2f9878c2b..d51cdd5f22f 100644 --- a/treeviewer/src/TTreeViewer.cxx +++ b/treeviewer/src/TTreeViewer.cxx @@ -1,4 +1,4 @@ -// @(#)root/treeviewer:$Name: $:$Id: TTreeViewer.cxx,v 1.50 2005/11/09 16:56:27 brun Exp $ +// @(#)root/treeviewer:$Name: $:$Id: TTreeViewer.cxx,v 1.51 2005/11/11 16:10:02 brun Exp $ //Author : Andrei Gheata 16/08/00 /************************************************************************* @@ -1181,7 +1181,7 @@ void TTreeViewer::ActivateButtons(Bool_t first, Bool_t previous, //______________________________________________________________________________ const char* TTreeViewer::Cut() { - // Cut + // Apply Cut return fLVContainer->Cut(); } -- GitLab