From: alibrary Date: Thu, 29 Apr 2004 20:50:31 +0000 (+0000) Subject: Coding violations X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=0742d588b78b013ee7a733f4cd4131805bf32822;hp=a8e8915c74cc2c51217db86b07ae141dbf351582;p=u%2Fmrichter%2FAliRoot.git Coding violations --- diff --git a/STEER/AliCluster.h b/STEER/AliCluster.h index 54cb37c1517..4320266542c 100644 --- a/STEER/AliCluster.h +++ b/STEER/AliCluster.h @@ -7,7 +7,7 @@ //------------------------------------------------------------------------- // Class AliCluster -// +// Generic class for clusters // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch //------------------------------------------------------------------------- diff --git a/STEER/AliDebugVolume.h b/STEER/AliDebugVolume.h index 22f0c90e9bc..f3f82e0d398 100644 --- a/STEER/AliDebugVolume.h +++ b/STEER/AliDebugVolume.h @@ -5,6 +5,12 @@ /* $Id$ */ +//----------------------------------------------------------------------- +// Class to debug entry and exit from a volume +// Used by AliLego class +// Author: A.Morsch +//----------------------------------------------------------------------- + #include "TNamed.h" class AliDebugVolume : public TNamed { diff --git a/STEER/AliDigit.h b/STEER/AliDigit.h index 9c33568b80e..5839821622e 100644 --- a/STEER/AliDigit.h +++ b/STEER/AliDigit.h @@ -17,7 +17,7 @@ public: AliDigit(); AliDigit(Int_t *track); virtual ~AliDigit() {} - virtual Int_t *GetTracks() {return &fTracks[0];} + virtual Int_t *GetTracks() {return fTracks;} virtual Int_t GetTrack(Int_t i) const {assert(0<=i&&i<=2); return fTracks[i];} diff --git a/STEER/AliESDCaloTrack.h b/STEER/AliESDCaloTrack.h index 32a034939bf..dfa0375d7fa 100644 --- a/STEER/AliESDCaloTrack.h +++ b/STEER/AliESDCaloTrack.h @@ -19,17 +19,21 @@ class AliESDCaloTrack : public TObject { public: AliESDCaloTrack(): TObject(), fRecParticle(0) {} + AliESDCaloTrack(const AliESDCaloTrack &act): TObject(act) + {fRecParticle = act.fRecParticle;} virtual ~AliESDCaloTrack() { //PH delete fRecParticle; } AliESDCaloTrack(TParticle* recpart); - Float_t Px() { return fRecParticle->Px(); } - Float_t Py() { return fRecParticle->Py(); } - Float_t Pz() { return fRecParticle->Pz(); } + Float_t Px() const { return fRecParticle->Px(); } + Float_t Py() const { return fRecParticle->Py(); } + Float_t Pz() const { return fRecParticle->Pz(); } - TParticle * GetRecParticle() {return fRecParticle;} + TParticle * GetRecParticle() const {return fRecParticle;} private: + AliESDCaloTrack & operator=(const AliESDCaloTrack &) + {Fatal("= operator","Not implemented\n"); return *this;} TParticle *fRecParticle; // reconstructed particle from PHOS or EMCAL ClassDef(AliESDCaloTrack,2) //ESD calorimeter track class diff --git a/STEER/AliESDPmdTrack.cxx b/STEER/AliESDPmdTrack.cxx index e93a8e54fb6..45dadc8ff14 100644 --- a/STEER/AliESDPmdTrack.cxx +++ b/STEER/AliESDPmdTrack.cxx @@ -1,5 +1,28 @@ +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + #include "AliESDPmdTrack.h" +// Event Data Summary Class +// For pmd tracks +// This is part of the reconstructed +// ESD events +// for the PMD detector + ClassImp(AliESDPmdTrack) AliESDPmdTrack::AliESDPmdTrack (const AliESDPmdTrack& PMDTrack):TObject(PMDTrack) diff --git a/STEER/AliESDPmdTrack.h b/STEER/AliESDPmdTrack.h index 4982b86f797..e2b7b84b11e 100644 --- a/STEER/AliESDPmdTrack.h +++ b/STEER/AliESDPmdTrack.h @@ -1,6 +1,15 @@ #ifndef ALIESDPMDTRACK_H #define ALIESDPMDTRACK_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +// Event Data Summary Class for pmd tracks +// This is part of the reconstructed ESD events +// for the PMD detector + #include "TObject.h" class AliESDPmdTrack : public TObject { diff --git a/STEER/AliFieldMap.h b/STEER/AliFieldMap.h index 76a913df96f..d42ab3ebdd9 100644 --- a/STEER/AliFieldMap.h +++ b/STEER/AliFieldMap.h @@ -9,7 +9,7 @@ // Author: Andreas Morsch // #include -class TVector; +#include class AliFieldMap : public TNamed { diff --git a/STEER/AliGausCorr.h b/STEER/AliGausCorr.h index 31d9cca054f..4c25128b2e0 100644 --- a/STEER/AliGausCorr.h +++ b/STEER/AliGausCorr.h @@ -5,6 +5,12 @@ /* $Id$ */ +//////////////////////////////////////////////////////////////////////// +// Class used to generate correlated gaussian numbers with mean +// zero and known covariance matrix. +// M.Masera 15.03.2001 9:30 - modified on 26.02.2002 17:40 +//////////////////////////////////////////////////////////////////////// + #include class TArrayD; diff --git a/STEER/AliGenEventHeader.h b/STEER/AliGenEventHeader.h index 33345d1e173..c40ef93a1d1 100644 --- a/STEER/AliGenEventHeader.h +++ b/STEER/AliGenEventHeader.h @@ -6,6 +6,12 @@ /* $Id$ */ +//--------------------------------------------------------------------- +// Event header base class for generator. +// Stores generated event information +// Author: andreas.morsch@cern.ch +//--------------------------------------------------------------------- + #include #include diff --git a/STEER/AliHeader.h b/STEER/AliHeader.h index 114838eced7..68d2447ff45 100644 --- a/STEER/AliHeader.h +++ b/STEER/AliHeader.h @@ -5,6 +5,12 @@ /* $Id$ */ +//----------------------------------------------------------------------- +// Simulation event header class +// Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes +// Many other classes depend on it +//----------------------------------------------------------------------- + #include class AliStack; diff --git a/STEER/AliHit.h b/STEER/AliHit.h index 3985ab4eeb8..b0e1886e28c 100644 --- a/STEER/AliHit.h +++ b/STEER/AliHit.h @@ -5,6 +5,10 @@ /* $Id$ */ +// Base class for hits +// This class is used as a base class for +// hits in the different detectors + #include "TObject.h" class AliHit : public TObject { diff --git a/STEER/AliLego.cxx b/STEER/AliLego.cxx index 4a4bff9bf6a..81e9ccd70c8 100644 --- a/STEER/AliLego.cxx +++ b/STEER/AliLego.cxx @@ -51,12 +51,11 @@ #include "TString.h" #include "TVirtualMC.h" -#include "AliConst.h" #include "AliDebugVolume.h" #include "AliLego.h" #include "AliLegoGenerator.h" -#include "AliRun.h" #include "AliMC.h" +#include "AliRun.h" ClassImp(AliLego) diff --git a/STEER/AliMCQA.cxx b/STEER/AliMCQA.cxx index 735e43d5316..a3e1b805774 100644 --- a/STEER/AliMCQA.cxx +++ b/STEER/AliMCQA.cxx @@ -34,15 +34,14 @@ #include #include #include -#include #include #include #include +#include "AliMC.h" #include "AliMCQA.h" #include "AliModule.h" #include "AliRun.h" -#include "AliMC.h" ClassImp(AliMCQA) diff --git a/STEER/AliMagF.h b/STEER/AliMagF.h index 7b54cdfca5a..6bf3de6bc2f 100644 --- a/STEER/AliMagF.h +++ b/STEER/AliMagF.h @@ -5,6 +5,12 @@ /* $Id$ */ +//---------------------------------------------------------------------- +// Basic magnetic field class +// Used in all the detectors, and also in the traking classes +// Author: +//---------------------------------------------------------------------- + #include "TNamed.h" enum Field_t {kUndef=1, kConst=1, kConMesh=2, kDipoMap=3}; diff --git a/STEER/AliMagFC.h b/STEER/AliMagFC.h index f8418cb974c..3d50bcea736 100644 --- a/STEER/AliMagFC.h +++ b/STEER/AliMagFC.h @@ -5,6 +5,12 @@ /* $Id$ */ +//------------------------------------------------------------------------- +// Constant magnetic field class +// Used by AliRun class +// Author: +//------------------------------------------------------------------------- + #include "AliMagF.h" class AliMagFC : public AliMagF diff --git a/STEER/AliMagFCM.cxx b/STEER/AliMagFCM.cxx index c5742e05531..4b0a1fdc5c6 100644 --- a/STEER/AliMagFCM.cxx +++ b/STEER/AliMagFCM.cxx @@ -20,6 +20,7 @@ // Used in the configuration macros (macros/Config.C, etc.) // Author: //----------------------------------------------------------------------- + #include "TSystem.h" #include "TVector.h" diff --git a/STEER/AliMagFCM.h b/STEER/AliMagFCM.h index e2bdc19060f..18ea9594bf8 100644 --- a/STEER/AliMagFCM.h +++ b/STEER/AliMagFCM.h @@ -5,6 +5,12 @@ /* $Id$ */ +//----------------------------------------------------------------------- +// Class for Alice magnetic field with constant mesh +// Used in the configuration macros (macros/Config.C, etc.) +// Author: +//----------------------------------------------------------------------- + #include "AliMagFC.h" class TVector; diff --git a/STEER/AliMagFDM.cxx b/STEER/AliMagFDM.cxx index 5604727cbac..7e9bfa2f825 100644 --- a/STEER/AliMagFDM.cxx +++ b/STEER/AliMagFDM.cxx @@ -21,8 +21,6 @@ // Author: //------------------------------------------------------------------------- -#include - #include "TSystem.h" #include "AliMagFDM.h" @@ -375,10 +373,10 @@ Double_t AliMagFDM::Ba(Int_t kaai,Double_t zaa1, Double_t zaa2, // // Calculation of field componet for case (keps #include -#include #include "AliFieldMap.h" #include "AliMagFMaps.h" diff --git a/STEER/AliMagFMaps.h b/STEER/AliMagFMaps.h index 1b36b1272bf..5546c0cfe99 100644 --- a/STEER/AliMagFMaps.h +++ b/STEER/AliMagFMaps.h @@ -6,6 +6,8 @@ /* $Id$ */ // +// Magnetic field composed by 3 maps: the L3 magnet, extended region, and +// dipole magnet // Author: Andreas Morsch // diff --git a/STEER/AliMemoryWatcher.h b/STEER/AliMemoryWatcher.h index 090ef0d8193..6b529f75d0f 100644 --- a/STEER/AliMemoryWatcher.h +++ b/STEER/AliMemoryWatcher.h @@ -2,40 +2,44 @@ #define ALIMEMORYWATCHER_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ + /* $Id$ */ + //_________________________________________________________________________ -/*Basic Memory Leak utility. - - You can use this tiny class to *see* if your program is leaking. - Usage: - AliMemoryWatcher memwatcher; - some program loop on events here { - if ( nevents % x == 0 ) - { - // take a sample every x events - memwatcher.watch(nevents); - } - } - TFile f("out.root","RECREATE"); - memwatcher.write(); - f.Close(); - In the output root file you'll get 3 graphs representing - the evolAliPHOSon, as a function of the number of events, of : - - VSIZE is the virtual size (in KBytes) of your program, that is sort of - the total memory used - - RSSIZE is the resident size (in KBytes), that is, the part of your - program which is really in physical memory. - - TIME is an estimate of time per event (really it's the time elasped - between two calls to watch method) - WARNING: this is far from a bulletproof memory report (it's basically - using UNIX command ps -h -p [PID] -o vsize,rssize to do its job). - It has only been tested on Linux so far. - - But by fitting the VSIZE by a pol1 under ROOT, you'll see right away - by how much your program is leaking. -*/ +//Basic Memory Leak utility. +// +// You can use this tiny class to *see* if your program is leaking. +// Usage: +// AliMemoryWatcher memwatcher; +// some program loop on events here { +// if ( nevents % x == 0 ) +// { +// // take a sample every x events +// memwatcher.watch(nevents); +// } +// } +// TFile f("out.root","RECREATE"); +// memwatcher.write(); +// f.Close(); +// In the output root file you'll get 3 graphs representing +// the evolAliPHOSon, as a function of the number of events, of : +// - VSIZE is the virtual size (in KBytes) of your program, that is sort of +// the total memory used +// - RSSIZE is the resident size (in KBytes), that is, the part of your +// program which is really in physical memory. +// - TIME is an estimate of time per event (really it's the time elasped +// between two calls to watch method) +// WARNING: this is far from a bulletproof memory report (it's basically +// using UNIX command ps -h -p [PID] -o vsize,rssize to do its job). +// It has only been tested on Linux so far. +// +// But by fitting the VSIZE by a pol1 under ROOT, you'll see right away +// by how much your program is leaking. +// //*-- Author: Laurent Aphecetche(SUBATECH) + // --- ROOT system --- + #include "TObject.h" class TH2; class TGraph; diff --git a/STEER/AliMergeCombi.h b/STEER/AliMergeCombi.h index c9980a55d8f..782d804f0f6 100644 --- a/STEER/AliMergeCombi.h +++ b/STEER/AliMergeCombi.h @@ -8,7 +8,7 @@ //////////////////////////////////////////////////////////////////////// // // Class to make combination for merging -// +// Returns combination of input event numbers // Author: Jiri Chudoba (CERN), 2001 // //////////////////////////////////////////////////////////////////////// diff --git a/STEER/AliPDG.h b/STEER/AliPDG.h index b4cbd84f23d..b5f62d00395 100644 --- a/STEER/AliPDG.h +++ b/STEER/AliPDG.h @@ -7,6 +7,10 @@ #include "TObject.h" +// Class to encapsulate the ALICE updates to TDatabasePDG.h +// Can be used by TGeant3 and TGeant4 +// Comments to: andreas.morsch@cern.ch + class AliPDG : public TObject { public: static void AddParticlesToPdgDataBase(); diff --git a/STEER/AliPoints.cxx b/STEER/AliPoints.cxx index 15d535ddf2d..8e7e9ffc7cb 100644 --- a/STEER/AliPoints.cxx +++ b/STEER/AliPoints.cxx @@ -33,9 +33,9 @@ #include "TView.h" #include "AliDetector.h" +#include "AliMC.h" #include "AliPoints.h" #include "AliRun.h" -#include "AliMC.h" ClassImp(AliPoints) diff --git a/STEER/AliPoints.h b/STEER/AliPoints.h index 5dbd214a156..90a15d5785e 100644 --- a/STEER/AliPoints.h +++ b/STEER/AliPoints.h @@ -5,6 +5,10 @@ /* $Id$ */ +// This class contains the points +// that are used for the ALICE +// event display + #include "TPolyMarker3D.h" class AliDetector; class TParticle; diff --git a/STEER/AliReconstructor.h b/STEER/AliReconstructor.h index afcffdc5cc3..6419dd4bf51 100644 --- a/STEER/AliReconstructor.h +++ b/STEER/AliReconstructor.h @@ -5,6 +5,12 @@ /* $Id$ */ +// +// base class for reconstruction algorithm +// Derived classes should implement a default constructor and +// the virtual methods +// + #include class AliRunLoader; diff --git a/STEER/AliTrackMapper.cxx b/STEER/AliTrackMapper.cxx index cf2c2fb12fd..f644ff01722 100644 --- a/STEER/AliTrackMapper.cxx +++ b/STEER/AliTrackMapper.cxx @@ -27,18 +27,18 @@ #include -#include "TTree.h" +#include "TError.h" #include "TFile.h" #include "TStopwatch.h" -#include "TError.h" +#include "TTree.h" #include "AliDetector.h" -#include "AliTrackMapper.h" -#include "AliTrackMap.h" +#include "AliHit.h" +#include "AliLoader.h" #include "AliRun.h" #include "AliRunLoader.h" -#include "AliLoader.h" -#include "AliHit.h" +#include "AliTrackMap.h" +#include "AliTrackMapper.h" ClassImp(AliTrackMapper) diff --git a/STEER/AliTrackReference.cxx b/STEER/AliTrackReference.cxx index 7c3fb26a5d6..504960186d1 100644 --- a/STEER/AliTrackReference.cxx +++ b/STEER/AliTrackReference.cxx @@ -13,12 +13,13 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ +/* $Id$ */ -#include "AliTrackReference.h" +#include "TLorentzVector.h" #include "TVirtualMC.h" -#include "TParticle.h" + #include "AliRun.h" -#include "TLorentzVector.h" +#include "AliTrackReference.h" // // Track Reference object is created every time particle is diff --git a/STEER/AliTrackReference.h b/STEER/AliTrackReference.h index fc8117b14ab..4ab594004f7 100644 --- a/STEER/AliTrackReference.h +++ b/STEER/AliTrackReference.h @@ -5,6 +5,12 @@ /* $Id$ */ +// +// Track Reference object is created every time particle is +// crossing detector bounds. +// The object is created by Step Manager +// + #include "TObject.h" #include "TMath.h" diff --git a/STEER/AliVertexer.cxx b/STEER/AliVertexer.cxx index 1125ff7787c..c4c9d48409e 100644 --- a/STEER/AliVertexer.cxx +++ b/STEER/AliVertexer.cxx @@ -1,4 +1,20 @@ -#include +/************************************************************************** + * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * * + * Author: The ALICE Off-line Project. * + * Contributors are mentioned in the code where appropriate. * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/* $Id$ */ + #include ClassImp(AliVertexer)