From 7537d03c800b97ba602f589c1b7d8fa79bc3fc60 Mon Sep 17 00:00:00 2001 From: masera Date: Tue, 31 Oct 2006 18:10:01 +0000 Subject: [PATCH] changes to be compliant with Eff C++ rules --- ITS/AliITSBeamTestDigitizer.cxx | 102 ++++++++++++++++----------- ITS/AliITSDetTypeRec.cxx | 32 ++++++--- ITS/AliITSDetTypeSim.cxx | 34 ++++++--- ITS/AliITSDigitizer.cxx | 34 ++++----- ITS/AliITSFDigitizer.cxx | 18 ++--- ITS/AliITSMultReconstructor.cxx | 65 +++++++++++++++-- ITS/AliITSMultReconstructor.h | 2 +- ITS/AliITSPreprocessorSDD.cxx | 11 +-- ITS/AliITSPreprocessorSDD.h | 11 +-- ITS/AliITSTableSSD.cxx | 26 ++++--- ITS/AliITSTableSSD.h | 8 ++- ITS/AliITSTrigger.cxx | 39 +++++----- ITS/AliITSdcsSSD.cxx | 48 ++++++++----- ITS/AliITSetfSDD.cxx | 62 ++++++++-------- ITS/AliITShit.cxx | 92 ++++++++++++------------ ITS/AliITSmodule.cxx | 37 ++++++---- ITS/AliITSsDigitize.cxx | 26 +++++-- ITS/AliITSsDigitize.h | 14 +++- ITS/AliITSsimulation.cxx | 13 ++-- ITS/AliITSsimulationFastPoints.h | 3 +- ITS/AliITSsimulationFastPointsV0.cxx | 29 ++++---- ITS/AliITSsimulationFastPointsV0.h | 2 +- ITS/AliITSsimulationSDD.cxx | 36 ++++++++-- ITS/AliITSsimulationSDD.h | 2 +- ITS/AliITSsimulationSPD.cxx | 7 +- ITS/AliITSsimulationSSD.cxx | 12 +++- ITS/AliITSstatistics.cxx | 27 ++++--- ITS/AliITSstatistics.h | 12 ++-- ITS/AliITSvBeamTestITS04.cxx | 51 +++++++++----- ITS/AliITSvPPRcoarseasymm.cxx | 25 ++++--- ITS/AliITSvPPRcoarseasymm.h | 4 +- 31 files changed, 551 insertions(+), 333 deletions(-) diff --git a/ITS/AliITSBeamTestDigitizer.cxx b/ITS/AliITSBeamTestDigitizer.cxx index d0484fc365a..b1ac155df23 100644 --- a/ITS/AliITSBeamTestDigitizer.cxx +++ b/ITS/AliITSBeamTestDigitizer.cxx @@ -26,36 +26,46 @@ ClassImp(AliITSBeamTestDigitizer) //_____________________________________________________________ -AliITSBeamTestDigitizer::AliITSBeamTestDigitizer():TTask() -{ +AliITSBeamTestDigitizer::AliITSBeamTestDigitizer():TTask(), +fEvIn(0), +fEvFin(0), +fRunNumber(-1), +fDATEEvType(7), +fFlagHeader(kTRUE), +fFlagInit(kFALSE), +fOptDate(kFALSE), +fDigitsFileName(0), +fRawdataFileName(0), +fPeriod(kNov04), +fRunLoader(0), +fLoader(0), +fHeader(0){ // // Default constructor // - fRunLoader = 0; - fLoader =0; - fEvIn=0; - fEvFin=0; - fFlagHeader=kTRUE; - fDATEEvType=7; - fRunNumber=-1; SetFlagInit(); SetOptDate(); - fPeriod=kNov04; } //_____________________________________________________________ - AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const Text_t* name, const Text_t* title, Char_t* opt,const char* filename):TTask(name,title) +AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const Text_t* name, const Text_t* title, Char_t* opt,const char* filename):TTask(name,title), +fEvIn(0), +fEvFin(0), +fRunNumber(-1), +fDATEEvType(7), +fFlagHeader(kTRUE), +fFlagInit(kFALSE), +fOptDate(kFALSE), +fDigitsFileName(0), +fRawdataFileName(0), +fPeriod(kNov04), +fRunLoader(0), +fLoader(0), +fHeader(0) { // // Standard constructor // - fRunLoader=0; - fLoader=0; - fEvIn=0; - fEvFin=0; - fDATEEvType=7; - fFlagHeader=kTRUE; - fRunNumber=-1; SetOptDate(); TString choice(opt); @@ -67,19 +77,23 @@ AliITSBeamTestDigitizer::AliITSBeamTestDigitizer():TTask() } //_____________________________________________________________ - AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const Text_t* name, const Text_t* title, Int_t run, Char_t* opt,const char* filename):TTask(name,title) - -{ +AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const Text_t* name, const Text_t* title, Int_t run, Char_t* opt,const char* filename):TTask(name,title), +fEvIn(0), +fEvFin(0), +fRunNumber(run), +fDATEEvType(7), +fFlagHeader(kTRUE), +fFlagInit(kFALSE), +fOptDate(kFALSE), +fDigitsFileName(0), +fRawdataFileName(0), +fPeriod(kNov04), +fRunLoader(0), +fLoader(0), +fHeader(0){ // // Constructor // - fRunLoader=0; - fLoader=0; - fEvIn=0; - fEvFin=0; - fDATEEvType=7; - fFlagHeader=kTRUE; - fRunNumber=run; SetOptDate(); TString choice(opt); Bool_t aug04 = choice.Contains("Aug04"); @@ -125,24 +139,28 @@ void AliITSBeamTestDigitizer::Init(const char* filename){ //______________________________________________________________________ -AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const AliITSBeamTestDigitizer &bt):TTask(bt){ +AliITSBeamTestDigitizer::AliITSBeamTestDigitizer(const AliITSBeamTestDigitizer &bt):TTask(bt), +fEvIn(bt.fEvIn), +fEvFin(bt.fEvFin), +fRunNumber(bt.fRunNumber), +fDATEEvType(bt.fDATEEvType), +fFlagHeader(bt.fFlagHeader), +fFlagInit(bt.fFlagInit), +fOptDate(bt.fOptDate), +fDigitsFileName(bt.fDigitsFileName), +fRawdataFileName(bt.fRawdataFileName), +fPeriod(bt.fPeriod), +fRunLoader(bt.fRunLoader), +fLoader(bt.fLoader), +fHeader(bt.fHeader){ // Copy constructor. - //not allowed - if(this==&bt) return; - Error("Copy constructor", - "You are not allowed to make a copy of the AliITSBeamTestDigitizer"); - exit(1); - } //______________________________________________________________________ AliITSBeamTestDigitizer& AliITSBeamTestDigitizer::operator=(const AliITSBeamTestDigitizer &source){ - // Assignment operator. This is a function which is not allowed to be - // done to the ITS beam test digitizer. It exits with an error. - // Inputs: - if(this==&source) return *this; - Error("operator=","You are not allowed to make a copy of the AliITSBeamTestDigitizer"); - exit(1); - return *this; //fake return + // Assignment operator. + this->~AliITSBeamTestDigitizer(); + new(this) AliITSBeamTestDigitizer(source); + return *this; } diff --git a/ITS/AliITSDetTypeRec.cxx b/ITS/AliITSDetTypeRec.cxx index 2376dedc788..9038083ec67 100644 --- a/ITS/AliITSDetTypeRec.cxx +++ b/ITS/AliITSDetTypeRec.cxx @@ -142,23 +142,39 @@ fFirstcall(kTRUE){ SelectVertexer(" "); SetRunNumber(); } -/* + //______________________________________________________________________ -AliITSDetTypeRec::AliITSDetTypeRec(const AliITSDetTypeRec & rec):TObject(rec) +AliITSDetTypeRec::AliITSDetTypeRec(const AliITSDetTypeRec & rec):TObject(rec), +fNMod(rec.fNMod), +fReconstruction(rec.fReconstruction), +fSegmentation(rec.fSegmentation), +fCalibration(rec.fCalibration), +fPreProcess(rec.fPreProcess), +fPostProcess(rec.fPostProcess), +fDigits(rec.fDigits), +fNdtype(rec.fNdtype), +fCtype(rec.fCtype), +fNctype(rec.fNctype), +fRecPoints(rec.fRecPoints), +fNRecPoints(rec.fNRecPoints), +fSelectedVertexer(rec.fSelectedVertexer), +fLoader(rec.fLoader), +fRunNumber(rec.fRunNumber), +fFirstcall(rec.fFirstcall) { // Copy constructor. - Error("Copy constructor","Copy constructor not allowed"); + } //______________________________________________________________________ AliITSDetTypeRec& AliITSDetTypeRec::operator=(const AliITSDetTypeRec& source){ - // Assignment operator. This is a function which is not allowed to be - // done. - Error("operator=","Assignment operator not allowed\n"); - return *this; + // Assignment operator. + this->~AliITSDetTypeRec(); + new(this) AliITSDetTypeRec(source); + return *this; } -*/ + //_____________________________________________________________________ AliITSDetTypeRec::~AliITSDetTypeRec(){ //Destructor diff --git a/ITS/AliITSDetTypeSim.cxx b/ITS/AliITSDetTypeSim.cxx index 0f695a7bb99..600bf7eb8da 100644 --- a/ITS/AliITSDetTypeSim.cxx +++ b/ITS/AliITSDetTypeSim.cxx @@ -158,23 +158,35 @@ AliITSDetTypeSim::~AliITSDetTypeSim(){ fDigits=0; } //---------------------------------------------------------------------- -AliITSDetTypeSim::AliITSDetTypeSim(const AliITSDetTypeSim &source) : TObject(source){ +AliITSDetTypeSim::AliITSDetTypeSim(const AliITSDetTypeSim &source) : TObject(source), +fSimulation(source.fSimulation), // [NDet] +fSegmentation(source.fSegmentation), // [NDet] +fCalibration(source.fCalibration), // [NMod] +fPreProcess(source.fPreProcess), // [] e.g. Fill fHitModule with hits +fPostProcess(source.fPostProcess), // [] e.g. Wright Raw data +fNSDigits(source.fNSDigits), //! number of SDigits +fSDigits(source.fSDigits), //! [NMod][NSDigits] +fNDigits(source.fNDigits), //! number of Digits +fRunNumber(source.fRunNumber), //! Run number (to access DB) +fDigits(source.fDigits), //! [NMod][NDigits] +fHitClassName(source.fHitClassName), // String with Hit class name. +fSDigClassName(source.fSDigClassName),// String with SDigit class name. +fDigClassName(), // String with digit class name. +fLoader(source.fLoader), // local pointer to loader +fFirstcall(source.fFirstcall) +{ // Copy Constructor for object AliITSDetTypeSim not allowed - - if(this==&source) return; - Error("Copy constructor", - "You are not allowed to make a copy of the AliITSDetTypeSim"); - exit(1); + for(Int_t i=0;i~AliITSDetTypeSim(); + new(this) AliITSDetTypeSim(source); + return *this; } //______________________________________________________________________ diff --git a/ITS/AliITSDigitizer.cxx b/ITS/AliITSDigitizer.cxx index 96759dbcdf9..e2fab304752 100644 --- a/ITS/AliITSDigitizer.cxx +++ b/ITS/AliITSDigitizer.cxx @@ -42,7 +42,13 @@ ClassImp(AliITSDigitizer) //______________________________________________________________________ -AliITSDigitizer::AliITSDigitizer() : AliDigitizer(){ +AliITSDigitizer::AliITSDigitizer() : AliDigitizer(), +fITS(0), +fModActive(0), +fInit(kFALSE), +fRoif(-1), +fRoiifile(0), +fFlagFirstEv(kTRUE){ // Default constructor. Assign fITS since it is never written out from // here. // Inputs: @@ -52,15 +58,15 @@ AliITSDigitizer::AliITSDigitizer() : AliDigitizer(){ // Return: // A blank AliITSDigitizer class. - fITS = 0; - fModActive = 0; - fRoif = -1; - fRoiifile = 0; - fInit = kFALSE; - fFlagFirstEv =kTRUE; } //______________________________________________________________________ -AliITSDigitizer::AliITSDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){ +AliITSDigitizer::AliITSDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr), +fITS(0), +fModActive(0), +fInit(kFALSE), +fRoif(-1), +fRoiifile(0), +fFlagFirstEv(kTRUE){ // Standard constructor. Assign fITS since it is never written out from // here. // Inputs: @@ -70,21 +76,15 @@ AliITSDigitizer::AliITSDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){ // Return: // An AliItSDigitizer class. - fITS = 0; - fModActive = 0; - fRoif = -1; - fRoiifile = 0; - fInit = kFALSE; - fFlagFirstEv =kTRUE; } //______________________________________________________________________ -AliITSDigitizer::AliITSDigitizer(const AliITSDigitizer &/*rec*/):AliDigitizer(/*rec*/){ +//AliITSDigitizer::AliITSDigitizer(const AliITSDigitizer &/*rec*/):AliDigitizer(/*rec*/){ // Copy constructor. - Error("Copy constructor","Copy constructor not allowed"); +// Error("Copy constructor","Copy constructor not allowed"); -} +//} //______________________________________________________________________ AliITSDigitizer& AliITSDigitizer::operator=(const AliITSDigitizer& /*source*/){ // Assignment operator. This is a function which is not allowed to be diff --git a/ITS/AliITSFDigitizer.cxx b/ITS/AliITSFDigitizer.cxx index 47d376cf620..e67e5ce1da3 100644 --- a/ITS/AliITSFDigitizer.cxx +++ b/ITS/AliITSFDigitizer.cxx @@ -36,26 +36,26 @@ ClassImp(AliITSFDigitizer) //______________________________________________________________________ -AliITSFDigitizer::AliITSFDigitizer() : AliDigitizer(){ +AliITSFDigitizer::AliITSFDigitizer() : AliDigitizer(), +fITS(0), +fInit(kFALSE){ // // Default constructor. // - fITS = 0; - fInit = kFALSE; } //______________________________________________________________________ -AliITSFDigitizer::AliITSFDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr){ +AliITSFDigitizer::AliITSFDigitizer(AliRunDigitizer *mngr) : AliDigitizer(mngr), +fITS(0), +fInit(kFALSE){ // // Standard constructor. // - fITS = 0; - fInit = kFALSE; } //______________________________________________________________________ -AliITSFDigitizer::AliITSFDigitizer(const AliITSFDigitizer &/*rec*/):AliDigitizer(/*rec*/){ +AliITSFDigitizer::AliITSFDigitizer(const AliITSFDigitizer &rec):AliDigitizer(rec), +fITS(rec.fITS), +fInit(rec.fInit){ // Copy constructor. - - Error("Copy constructor","Copy constructor not allowed"); } //______________________________________________________________________ diff --git a/ITS/AliITSMultReconstructor.cxx b/ITS/AliITSMultReconstructor.cxx index bdf8937f97e..f84af41e480 100644 --- a/ITS/AliITSMultReconstructor.cxx +++ b/ITS/AliITSMultReconstructor.cxx @@ -39,7 +39,33 @@ ClassImp(AliITSMultReconstructor) //____________________________________________________________________ -AliITSMultReconstructor::AliITSMultReconstructor() { +AliITSMultReconstructor::AliITSMultReconstructor(): +fGeometry(0), +fClustersLay1(0), +fClustersLay2(0), +fTracklets(0), +fAssociationFlag(0), +fNClustersLay1(0), +fNClustersLay2(0), +fNTracklets(0), +fPhiWindow(0), +fZetaWindow(0), +fOnlyOneTrackletPerC2(0), +fHistOn(0), +fhClustersDPhiAcc(0), +fhClustersDThetaAcc(0), +fhClustersDZetaAcc(0), +fhClustersDPhiAll(0), +fhClustersDThetaAll(0), +fhClustersDZetaAll(0), +fhDPhiVsDThetaAll(0), +fhDPhiVsDThetaAcc(0), +fhDPhiVsDZetaAll(0), +fhDPhiVsDZetaAcc(0), +fhetaTracklets(0), +fhphiTracklets(0), +fhetaClustersLay1(0), +fhphiClustersLay1(0){ // Method to reconstruct the charged particles multiplicity with the // SPD (tracklets). @@ -95,17 +121,42 @@ AliITSMultReconstructor::AliITSMultReconstructor() { } //______________________________________________________________________ -AliITSMultReconstructor::AliITSMultReconstructor(const AliITSMultReconstructor &mr) : TObject(mr) { +AliITSMultReconstructor::AliITSMultReconstructor(const AliITSMultReconstructor &mr) : TObject(mr), +fGeometry(mr.fGeometry), +fClustersLay1(mr.fClustersLay1), +fClustersLay2(mr.fClustersLay2), +fTracklets(mr.fTracklets), +fAssociationFlag(mr.fAssociationFlag), +fNClustersLay1(mr.fNClustersLay1), +fNClustersLay2(mr.fNClustersLay2), +fNTracklets(mr.fNTracklets), +fPhiWindow(mr.fPhiWindow), +fZetaWindow(mr.fZetaWindow), +fOnlyOneTrackletPerC2(mr.fOnlyOneTrackletPerC2), +fHistOn(mr.fHistOn), +fhClustersDPhiAcc(mr.fhClustersDPhiAcc), +fhClustersDThetaAcc(mr.fhClustersDThetaAcc), +fhClustersDZetaAcc(mr.fhClustersDZetaAcc), +fhClustersDPhiAll(mr.fhClustersDPhiAll), +fhClustersDThetaAll(mr.fhClustersDThetaAll), +fhClustersDZetaAll(mr.fhClustersDZetaAll), +fhDPhiVsDThetaAll(mr.fhDPhiVsDThetaAll), +fhDPhiVsDThetaAcc(mr.fhDPhiVsDThetaAcc), +fhDPhiVsDZetaAll(mr.fhDPhiVsDZetaAll), +fhDPhiVsDZetaAcc(mr.fhDPhiVsDZetaAcc), +fhetaTracklets(mr.fhetaTracklets), +fhphiTracklets(mr.fhphiTracklets), +fhetaClustersLay1(mr.fhetaClustersLay1), +fhphiClustersLay1(mr.fhphiClustersLay1) { // Copy constructor - // Copies are not allowed. The method is protected to avoid misuse. - Error("AliITSMultReconstructor","Copy constructor not allowed\n"); + } //______________________________________________________________________ -AliITSMultReconstructor& AliITSMultReconstructor::operator=(const AliITSMultReconstructor& /* mr */){ +AliITSMultReconstructor& AliITSMultReconstructor::operator=(const AliITSMultReconstructor& mr){ // Assignment operator - // Assignment is not allowed. The method is protected to avoid misuse. - Error("= operator","Assignment operator not allowed\n"); + this->~AliITSMultReconstructor(); + new(this) AliITSMultReconstructor(mr); return *this; } diff --git a/ITS/AliITSMultReconstructor.h b/ITS/AliITSMultReconstructor.h index 563e6717472..0df91b08ab4 100644 --- a/ITS/AliITSMultReconstructor.h +++ b/ITS/AliITSMultReconstructor.h @@ -57,7 +57,7 @@ public: protected: AliITSMultReconstructor(const AliITSMultReconstructor& mr); - AliITSMultReconstructor& operator=(const AliITSMultReconstructor& /* mr */); + AliITSMultReconstructor& operator=(const AliITSMultReconstructor& mr); AliITSgeom* fGeometry; // ITS geometry diff --git a/ITS/AliITSPreprocessorSDD.cxx b/ITS/AliITSPreprocessorSDD.cxx index a0c6d7d808b..097b49b13c9 100644 --- a/ITS/AliITSPreprocessorSDD.cxx +++ b/ITS/AliITSPreprocessorSDD.cxx @@ -1,5 +1,7 @@ ///////////////////////////////////////// // Class for SDD digits preprocessing // +// // +// // //////////////////////////////////////// #include "AliITSPreprocessorSDD.h" @@ -13,9 +15,8 @@ const Int_t AliITSPreprocessorSDD::fgkNumberOfSDD = 260; const Int_t AliITSPreprocessorSDD::fgkNumberOfChannels = 512; -const char* AliITSPreprocessorSDD::fgkNameHistoPedestals ="hpedestal"; -const char* AliITSPreprocessorSDD::fgkNameHistoNoise="hnoise"; - +const TString AliITSPreprocessorSDD::fgkNameHistoPedestals = "hpedestal"; +const TString AliITSPreprocessorSDD::fgkNameHistoNoise = "hnoise"; ClassImp(AliITSPreprocessorSDD) @@ -74,8 +75,8 @@ UInt_t AliITSPreprocessorSDD::Process(TMap*/* dcsAliasMap*/){ for(Int_t ich=0;ichSetBadChannel(ich,badCh[imod][ich]); } - sprintf(namehisto,"%s_%d",fgkNameHistoPedestals,imod); - sprintf(namehisto2,"%s_%d",fgkNameHistoNoise,imod); + sprintf(namehisto,"%s_%d",fgkNameHistoPedestals.Data(),imod); + sprintf(namehisto2,"%s_%d",fgkNameHistoNoise.Data(),imod); TH1F* hbas = (TH1F*)f1->Get(namehisto); TH1F* hnoi = (TH1F*)f2->Get(namehisto2); for(Int_t ien=0;ien @@ -21,7 +27,7 @@ class AliITSTableSSD : public TObject{ virtual void Clear(Option_t*) {TObject::Clear();} private: - Int_t SearchValue(Int_t *arr, Int_t refer, Int_t max){ + Int_t SearchValue(Int_t *arr, Int_t refer, Int_t max) const{ for(Int_t i=0;iNpx()); @@ -72,22 +88,18 @@ AliITSdcsSSD::~AliITSdcsSSD() { delete fInvalidN; } //______________________________________________________________________ -AliITSdcsSSD::AliITSdcsSSD(const AliITSdcsSSD &source) : TObject(source){ +AliITSdcsSSD::AliITSdcsSSD(const AliITSdcsSSD &source) : TObject(source), +fCouplingPR(source.fCouplingPR), +fCouplingPL(source.fCouplingPL), +fCouplingNR(source.fCouplingNR), +fCouplingNL(source.fCouplingNL), +fNstrips(source.fNstrips), +fNInvalid(source.fNInvalid), +fISigma(source.fISigma), +fInvalidP(source.fInvalidP), +fInvalidN(source.fInvalidN){ // Copy Constructor - if(&source == this) return; - - this->fCouplingPR = source.fCouplingPR; - this->fCouplingPL = source.fCouplingPL; - this->fCouplingNR = source.fCouplingNR; - this->fCouplingNL = source.fCouplingNL; - this->fNstrips = source.fNstrips; - this->fNInvalid = source.fNInvalid; - this->fISigma = source.fISigma; - this->fInvalidP = source.fInvalidP; - this->fInvalidN = source.fInvalidN; - - return; } //_________________________________________________________________________ AliITSdcsSSD& AliITSdcsSSD::operator=(const AliITSdcsSSD &source) { diff --git a/ITS/AliITSetfSDD.cxx b/ITS/AliITSetfSDD.cxx index dd966286bd5..2daca2aeae6 100644 --- a/ITS/AliITSetfSDD.cxx +++ b/ITS/AliITSetfSDD.cxx @@ -39,25 +39,41 @@ Int_t ppower(Int_t b, Int_t e) { return power; } -AliITSetfSDD::AliITSetfSDD() { +AliITSetfSDD::AliITSetfSDD(): +fTimeDelay(0), +fSamplingTime(0), +fT0(0), +fDf(0.), +fA0(0.) , +fZeroM(0), +fZeroR(0), +fZeroI(0), +fPoleM(0), +fPoleR(0), +fPoleI(0), +fTfR(0), +fTfI(0), +fWR(0), +fWI(0){ // Default constructor - fTimeDelay = 0.; - fSamplingTime = 0.; - fT0 = 0.; - fDf = 0.; - fA0 = 0.; - fZeroM = 0; - fZeroR = 0; - fPoleM = 0; - fPoleR = 0; - fPoleI = 0; - fTfR = 0; - fTfI = 0; - fWR = 0; - fWI = 0; } -AliITSetfSDD::AliITSetfSDD(Double_t timestep, Int_t amplif) +AliITSetfSDD::AliITSetfSDD(Double_t timestep, Int_t amplif): +fTimeDelay(0), +fSamplingTime(0), +fT0(0), +fDf(0.), +fA0(0.) , +fZeroM(0), +fZeroR(0), +fZeroI(0), +fPoleM(0), +fPoleR(0), +fPoleI(0), +fTfR(0), +fTfI(0), +fWR(0), +fWI(0) { // Standard constructor. sampling time in ns @@ -190,20 +206,6 @@ AliITSetfSDD::AliITSetfSDD(Double_t timestep, Int_t amplif) } -//______________________________________________________________________ -AliITSetfSDD::AliITSetfSDD(const AliITSetfSDD &obj) : TObject(obj) { - // Copy constructor - // Copies are not allowed. The method is protected to avoid misuse. - Error("AliITSetfSDD","Copy constructor not allowed\n"); -} - -//______________________________________________________________________ -AliITSetfSDD& AliITSetfSDD::operator=(const AliITSetfSDD& /* obj */){ - // Assignment operator - // Assignment is not allowed. The method is protected to avoid misuse. - Error("= operator","Assignment operator not allowed\n"); - return *this; -} AliITSetfSDD::~AliITSetfSDD(){ // Destructor diff --git a/ITS/AliITShit.cxx b/ITS/AliITShit.cxx index a0b60505989..dcb73d141e8 100644 --- a/ITS/AliITShit.cxx +++ b/ITS/AliITShit.cxx @@ -189,7 +189,21 @@ ClassImp(AliITShit) // //////////////////////////////////////////////////////////////////////// //_____________________________________________________________________________ -AliITShit::AliITShit():AliHit(){ +AliITShit::AliITShit():AliHit(), +fStatus(0), +fLayer(0), +fLadder(0), +fDet(0), +fPx(0.0), +fPy(0.0), +fPz(0.0), +fDestep(0.0), +fTof(0.0), +fStatus0(0), +fx0(0.0), +fy0(0.0), +fz0(0.0), +ft0(0.0){ // Default Constructor // Zero data member just to be safe. // Intputs: @@ -199,24 +213,24 @@ AliITShit::AliITShit():AliHit(){ // Return: // A default created AliITShit class. - fStatus = 0; // Track Status - fLayer = 0; // Layer number - fLadder = 0; // Ladder number - fDet = 0; // Detector number - fPx = 0.0; // PX of particle at the point of the hit - fPy = 0.0; // PY of particle at the point of the hit - fPz = 0.0; // PZ of particle at the point of the hit - fDestep = 0.0; // Energy deposited in the current step - fTof = 0.0; // Time of flight at the point of the hit - fStatus0 = 0; // zero status bit by default. - fx0 = 0.0; // Starting point of this step - fy0 = 0.0; // Starting point of this step - fz0 = 0.0; // Starting point of this step - ft0 = 0.0; // Starting point of this step } AliITShit::AliITShit(Int_t shunt,Int_t track,Int_t *vol,Float_t edep, Float_t tof,TLorentzVector &x,TLorentzVector &x0, - TLorentzVector &p) : AliHit(shunt, track){ + TLorentzVector &p) : AliHit(shunt, track), +fStatus(vol[3]), +fLayer(vol[0]), +fLadder(vol[2]), +fDet(vol[1]), +fPx(p.Px()), +fPy(p.Py()), +fPz(p.Pz()), +fDestep(edep), +fTof(tof), +fStatus0(vol[4]), +fx0(x0.X()), +fy0(x0.Y()), +fz0(x0.Z()), +ft0(x0.T()){ //////////////////////////////////////////////////////////////////////// // Create ITS hit // The creator of the AliITShit class. The variables shunt and @@ -237,27 +251,29 @@ AliITShit::AliITShit(Int_t shunt,Int_t track,Int_t *vol,Float_t edep, // Return: // A default created AliITShit class. - fLayer = vol[0]; // Layer number - fLadder = vol[2]; // Ladder number - fDet = vol[1]; // Detector number - fStatus = vol[3]; // Track status flags - fStatus0 = vol[4]; // Track status flag for start position. + + fX = x.X(); // Track X global position fY = x.Y(); // Track Y global position fZ = x.Z(); // Track Z global position - fPx = p.Px(); // Track X Momentum - fPy = p.Py(); // Track Y Momentum - fPz = p.Pz(); // Track Z Momentum - fDestep = edep; // Track dE/dx for this step - fTof = tof ; // Track Time of Flight for this step - fx0 = x0.X(); // Track X global position - fy0 = x0.Y(); // Track Y global position - fz0 = x0.Z(); // Track Z global position - ft0 = x0.T(); // Starting point of this step } //______________________________________________________________________ AliITShit::AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): - AliHit(shunt, track){ + AliHit(shunt, track), +fStatus(vol[3]), +fLayer(vol[0]), +fLadder(vol[2]), +fDet(vol[1]), +fPx(hits[3]), +fPy(hits[4]), +fPz(hits[5]), +fDestep(hits[6]), +fTof(hits[7]), +fStatus0(0), +fx0(0.0), +fy0(0.0), +fz0(0.0), +ft0(0.0){ //////////////////////////////////////////////////////////////////////// // Create ITS hit // The creator of the AliITShit class. The variables shunt and @@ -289,23 +305,9 @@ AliITShit::AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits): // none. // Return: // A standard created AliITShit class. - fLayer = vol[0]; // Layer number - fLadder = vol[2]; // Ladder number - fDet = vol[1]; // Detector number - fStatus = vol[3]; // Track status flags fX = hits[0]; // Track X global position fY = hits[1]; // Track Y global position fZ = hits[2]; // Track Z global position - fPx = hits[3]; // Track X Momentum - fPy = hits[4]; // Track Y Momentum - fPz = hits[5]; // Track Z Momentum - fDestep = hits[6]; // Track dE/dx for this step - fTof = hits[7]; // Track Time of Flight for this step - fStatus0 = 0;// Track Status of Starting point - fx0 = 0.0; // Starting point of this step - fy0 = 0.0; // Starting point of this step - fz0 = 0.0; // Starting point of this step - ft0 = 0.0; // Starting point of this step } //______________________________________________________________________ void AliITShit::GetPositionL(Float_t &x,Float_t &y,Float_t &z){ diff --git a/ITS/AliITSmodule.cxx b/ITS/AliITSmodule.cxx index db7a2ceb5b4..b9e45cb0598 100644 --- a/ITS/AliITSmodule.cxx +++ b/ITS/AliITSmodule.cxx @@ -40,20 +40,24 @@ ClassImp(AliITSmodule) // Constructors and deconstructor //________________________________________________________________________ // -AliITSmodule::AliITSmodule() { +AliITSmodule::AliITSmodule(): +fITS(0), +fIndex(0), +fHitsM(0), +fTrackIndex(0), +fHitIndex(0) { // constructor - fHitsM = 0; - fTrackIndex = 0; - fHitIndex = 0; - fITS = 0; - } //_________________________________________________________________________ -AliITSmodule::AliITSmodule(Int_t index) { +AliITSmodule::AliITSmodule(Int_t index): +fITS(0), +fIndex(index), +fHitsM(0), +fTrackIndex(0), +fHitIndex(0) { // constructor - fIndex = index; fHitsM = new TObjArray(); fTrackIndex = new TArrayI(16); fHitIndex = new TArrayI(16); @@ -74,22 +78,25 @@ AliITSmodule::~AliITSmodule() { fITS = 0; // We don't delete this pointer since it is just a copy. } //____________________________________________________________________________ -AliITSmodule::AliITSmodule(const AliITSmodule &source):TObject(source){ +AliITSmodule::AliITSmodule(const AliITSmodule &source):TObject(source), +fITS(source.fITS), +fIndex(source.fIndex), +fHitsM(source.fHitsM), +fTrackIndex(source.fTrackIndex), +fHitIndex(source.fHitIndex){ //////////////////////////////////////////////////////////////////////// // Copy Constructor //////////////////////////////////////////////////////////////////////// - Error("AliITSmodule","AliITSmodule class has not to be copied! Exit."); - exit(1); + } //_____________________________________________________________________________ AliITSmodule& AliITSmodule::operator=(const AliITSmodule &source){ //////////////////////////////////////////////////////////////////////// // Assignment operator //////////////////////////////////////////////////////////////////////// - if(&source == this) return *this; - Error("AliITSmodule","AliITSmodule class has not to be copied! Exit."); - exit(1); - return *this; // fake return neded on Sun + this->~AliITSmodule(); + new(this) AliITSmodule(source); + return *this; } //_________________________________________________________________________ // diff --git a/ITS/AliITSsDigitize.cxx b/ITS/AliITSsDigitize.cxx index 0b7867123f9..cf5d5265798 100644 --- a/ITS/AliITSsDigitize.cxx +++ b/ITS/AliITSsDigitize.cxx @@ -29,10 +29,20 @@ #include "AliITS.h" #include "AliITSsDigitize.h" #include "AliITSgeom.h" - + +///////////////////////////////////////////////////////// +// // +// // +// // +///////////////////////////////////////////////////////// ClassImp(AliITSsDigitize) //______________________________________________________________________ -AliITSsDigitize::AliITSsDigitize(){ +AliITSsDigitize::AliITSsDigitize(): +fInit(kFALSE), +fEnt(0), +fEnt0(0), +fITS(0), +fRunLoader(0x0){ // Default constructor. // Inputs: // none. @@ -41,13 +51,15 @@ AliITSsDigitize::AliITSsDigitize(){ // Return: // A zero-ed constructed AliITSsDigitize class. - fRunLoader = 0x0; - fITS = 0; fDet[0] = fDet[1] = fDet[2] = kTRUE; - fInit = kFALSE; } //______________________________________________________________________ -AliITSsDigitize::AliITSsDigitize(const char* filename){ +AliITSsDigitize::AliITSsDigitize(const char* filename): +fInit(), +fEnt(0), +fEnt0(0), +fITS(0), +fRunLoader(0x0){ // Standard constructor. // Inputs: // const char* filename filename containing the digits to be @@ -130,7 +142,7 @@ Bool_t AliITSsDigitize::Init(){ return fInit; } //______________________________________________________________________ -Bool_t AliITSsDigitize::InitSDig(){ +Bool_t AliITSsDigitize::InitSDig() const { // Sets up SDigitization part of AliITSDetType.. // Inputs: // none. diff --git a/ITS/AliITSsDigitize.h b/ITS/AliITSsDigitize.h index cee86c7059d..09f1a60d697 100644 --- a/ITS/AliITSsDigitize.h +++ b/ITS/AliITSsDigitize.h @@ -1,11 +1,16 @@ -#ifndef ALIITSSDIGITIZATION_H -#define ALIITSSDIGITIATION_H +#ifndef ALIITSSDIGITIZE_H +#define ALIITSSDIGITIZE_H /* Copyright (c) 1998-2001, ALICE Experiment at CERN, All rights reserved * * See cxx source for full Copyright notice */ /* $Id$ */ +///////////////////////////////////////////////////////// +// // +// // +// // +///////////////////////////////////////////////////////// #include @@ -20,10 +25,13 @@ class AliITSsDigitize : public TTask{ virtual Bool_t Init(); virtual void Exec(const Option_t *opt="ALL"); private: - Bool_t InitSDig(); // Standard SDigitization initilization. + Bool_t InitSDig() const; // Standard SDigitization initilization. private: // TFile *fFile; //! pointer to the file contatining the hits and // // and will contain the SDigits + AliITSsDigitize(const AliITSsDigitize &source); // copy constructor + AliITSsDigitize& operator=(const AliITSsDigitize &source); // operator= + Bool_t fDet[3]; //! logical specifing which detectors to reconstruct. Bool_t fInit; //! True if Init was sucessfull, else false. diff --git a/ITS/AliITSsimulation.cxx b/ITS/AliITSsimulation.cxx index a66b2755dab..838cbd0fd92 100644 --- a/ITS/AliITSsimulation.cxx +++ b/ITS/AliITSsimulation.cxx @@ -27,6 +27,7 @@ ClassImp(AliITSsimulation) //______________________________________________________________________ AliITSsimulation::AliITSsimulation(): TObject(), +fDetType(0), fpList(0), fModule(0), fEvent(0), @@ -38,10 +39,10 @@ fDebug(0){ // none. // Return: // a default constructed AliITSsimulation class - fDetType = 0; } //______________________________________________________________________ AliITSsimulation::AliITSsimulation(AliITSDetTypeSim *dettyp): TObject(), +fDetType(dettyp), fpList(0), fModule(0), fEvent(0), @@ -53,7 +54,6 @@ fDebug(0){ // none. // Return: // a default constructed AliITSsimulation class - fDetType = dettyp; } //__________________________________________________________________________ AliITSsimulation::~AliITSsimulation(){ @@ -71,7 +71,12 @@ AliITSsimulation::~AliITSsimulation(){ } } //__________________________________________________________________________ -AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){ +AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s), +fDetType(s.fDetType), +fpList(s.fpList), +fModule(s.fModule), +fEvent(s.fEvent), +fDebug(s.fDebug){ // Copy Constructor // Inputs: // const AliITSsimulation &s simulation class to copy from @@ -81,8 +86,6 @@ AliITSsimulation::AliITSsimulation(const AliITSsimulation &s) : TObject(s){ // a standard constructed AliITSsimulation class with values the same // as that of s. - *this = s; - return; } //_________________________________________________________________________ diff --git a/ITS/AliITSsimulationFastPoints.h b/ITS/AliITSsimulationFastPoints.h index d10f90b8f04..5c97ffbc5e8 100644 --- a/ITS/AliITSsimulationFastPoints.h +++ b/ITS/AliITSsimulationFastPoints.h @@ -14,8 +14,9 @@ class AliITSsimulationFastPoints : public AliITSsimulation { public: - AliITSsimulationFastPoints(); // default constructor + AliITSsimulationFastPoints(); // default constructor virtual ~AliITSsimulationFastPoints() {;} + virtual AliITSsimulation& operator=(const AliITSsimulation&){return *this;} void CreateFastRecPoints(AliITSmodule *mod,Int_t module,TRandom *rndm, TClonesArray* recp); void CreateFastRecPoints(Int_t module,TClonesArray* recp); diff --git a/ITS/AliITSsimulationFastPointsV0.cxx b/ITS/AliITSsimulationFastPointsV0.cxx index 92dab6a66bf..114c788a262 100644 --- a/ITS/AliITSsimulationFastPointsV0.cxx +++ b/ITS/AliITSsimulationFastPointsV0.cxx @@ -29,31 +29,34 @@ ClassImp(AliITSsimulationFastPointsV0) -AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0() -{ +AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(): +fNrecp(0), +fSx(0), +fSz(0){ // default constructor - fSx = 0; - fSz = 0; } -AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const char *dataType){ +AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const char *dataType): +fNrecp(0), +fSx(0), +fSz(0){ //constructor Info("AliITSsimulationFastPointsV0","Standard constructor %s",dataType); fSx = new AliITSstatistics(2); fSz = new AliITSstatistics(2); } //______________________________________________________________________ -AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 &/*rec*/):AliITSsimulation(/*rec*/){ +AliITSsimulationFastPointsV0::AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 & rec):AliITSsimulation(rec), +fNrecp(rec.fNrecp), +fSx(rec.fSx), +fSz(rec.fSz){ // Copy constructor. - Error("Copy constructor","Copy constructor not allowed"); - } //______________________________________________________________________ -AliITSsimulationFastPointsV0& AliITSsimulationFastPointsV0::operator=(const AliITSsimulationFastPointsV0& /*source*/){ - // Assignment operator. This is a function which is not allowed to be - // done. - Error("operator=","Assignment operator not allowed\n"); - return *this; +AliITSsimulationFastPointsV0& AliITSsimulationFastPointsV0::operator=(const AliITSsimulationFastPointsV0& /*source*/){ + // Assignment operator + Error("operator=","Assignment operator not allowed"); + return *this; } //---------------------------------------------------------- diff --git a/ITS/AliITSsimulationFastPointsV0.h b/ITS/AliITSsimulationFastPointsV0.h index 694b8a5b14b..da09e1f9b5d 100644 --- a/ITS/AliITSsimulationFastPointsV0.h +++ b/ITS/AliITSsimulationFastPointsV0.h @@ -16,7 +16,7 @@ class AliITSsimulationFastPointsV0 : public AliITSsimulation public: AliITSsimulationFastPointsV0(); // default constructor AliITSsimulationFastPointsV0(const char *dataType); // standard constructor - AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 &); + AliITSsimulationFastPointsV0(const AliITSsimulationFastPointsV0 &rec); AliITSsimulationFastPointsV0 & operator=(const AliITSsimulationFastPointsV0 &); virtual AliITSsimulation& operator=(const AliITSsimulation &) {return *this;}; diff --git a/ITS/AliITSsimulationSDD.cxx b/ITS/AliITSsimulationSDD.cxx index d2146a21080..c777389d4b5 100644 --- a/ITS/AliITSsimulationSDD.cxx +++ b/ITS/AliITSsimulationSDD.cxx @@ -131,8 +131,10 @@ fAnodeFire(0), fHis(0), fD(), fT1(), +fT2(), fTol(), fTreeB(0), +fParam(0), fFileName(), fFlag(kFALSE), fCheckNoise(kFALSE), @@ -149,14 +151,36 @@ fScaleSize(0){ SetCheckNoise(); } //______________________________________________________________________ -AliITSsimulationSDD::AliITSsimulationSDD(AliITSsimulationSDD &source) : - AliITSsimulation(source){ +AliITSsimulationSDD::AliITSsimulationSDD(const AliITSsimulationSDD &source) : + AliITSsimulation(source), +fITS(source.fITS), +fHitMap2(source.fHitMap2), +fHitSigMap2(source.fHitSigMap2), +fHitNoiMap2(source.fHitNoiMap2), +fStream(source.fStream), +fElectronics(source.fElectronics), +fInZR(source.fInZR), +fInZI(source.fInZI), +fOutZR(source.fOutZR), +fOutZI(source.fOutZI), +fAnodeFire(source.fAnodeFire), +fHis(source.fHis), +fD(source.fD), +fT1(source.fT1), +fT2(source.fT2), +fTol(source.fTol), +fTreeB(source.fTreeB), +fParam(source.fParam), +fFileName(source.fFileName), +fFlag(source.fFlag), +fCheckNoise(source.fCheckNoise), +fCrosstalkFlag(source.fCrosstalkFlag), +fDoFFT(source.fDoFFT), +fNofMaps(source.fNofMaps), +fMaxNofSamples(source.fMaxNofSamples), +fScaleSize(source.fScaleSize){ // Copy constructor to satify Coding roules only. - if(this==&source) return; - Error("AliITSsimulationSDD","Not allowed to make a copy of " - "AliITSsimulationSDD Using default creater instead"); - AliITSsimulationSDD(); } //______________________________________________________________________ AliITSsimulationSDD& AliITSsimulationSDD::operator=(const AliITSsimulationSDD &src){ diff --git a/ITS/AliITSsimulationSDD.h b/ITS/AliITSsimulationSDD.h index f794499c696..653eea8ab1e 100644 --- a/ITS/AliITSsimulationSDD.h +++ b/ITS/AliITSsimulationSDD.h @@ -34,7 +34,7 @@ class AliITSsimulationSDD : public AliITSsimulation { //Standard Constructor AliITSsimulationSDD(AliITSDetTypeSim* dettyp); // Copy operator - AliITSsimulationSDD(AliITSsimulationSDD &source); + AliITSsimulationSDD(const AliITSsimulationSDD &source); virtual ~AliITSsimulationSDD(); // Destructor // = operator AliITSsimulationSDD& operator=(const AliITSsimulationSDD &source); diff --git a/ITS/AliITSsimulationSPD.cxx b/ITS/AliITSsimulationSPD.cxx index 35301a97906..c99a00cbcc7 100644 --- a/ITS/AliITSsimulationSPD.cxx +++ b/ITS/AliITSsimulationSPD.cxx @@ -142,7 +142,10 @@ AliITSsimulationSPD::~AliITSsimulationSPD(){ //______________________________________________________________________ AliITSsimulationSPD::AliITSsimulationSPD(const AliITSsimulationSPD - &s) : AliITSsimulation(s){ + &s) : AliITSsimulation(s), +fHis(s.fHis), +fSPDname(s.fSPDname), +fCoupling(s.fCoupling){ // Copy Constructor // Inputs: // AliITSsimulationSPD &s The original class for which @@ -151,8 +154,6 @@ AliITSsimulationSPD::AliITSsimulationSPD(const // none. // Return: - *this = s; - return; } //______________________________________________________________________ AliITSsimulationSPD& AliITSsimulationSPD::operator=(const diff --git a/ITS/AliITSsimulationSSD.cxx b/ITS/AliITSsimulationSSD.cxx index 31553f7c9c8..f6a6ee6aa6b 100644 --- a/ITS/AliITSsimulationSSD.cxx +++ b/ITS/AliITSsimulationSSD.cxx @@ -124,10 +124,16 @@ AliITSsimulation& AliITSsimulationSSD::operator=( } //______________________________________________________________________ AliITSsimulationSSD::AliITSsimulationSSD(const AliITSsimulationSSD &source): - AliITSsimulation(source){ + AliITSsimulation(source), +fMapA2(source.fMapA2), +fIonE(source.fIonE), +fDifConst(), +fDriftVel(){ // copy constructor - - *this = source; + fDifConst[0] = source.fDifConst[0]; + fDifConst[1] = source.fDifConst[1]; + fDriftVel[0] = source.fDriftVel[0]; + fDriftVel[1] = source.fDriftVel[1]; } //______________________________________________________________________ AliITSsimulationSSD::~AliITSsimulationSSD() { diff --git a/ITS/AliITSstatistics.cxx b/ITS/AliITSstatistics.cxx index 1d17da66252..90b4ef3e11d 100644 --- a/ITS/AliITSstatistics.cxx +++ b/ITS/AliITSstatistics.cxx @@ -15,27 +15,28 @@ ClassImp(AliITSstatistics) // -AliITSstatistics::AliITSstatistics() : TObject(){ +AliITSstatistics::AliITSstatistics() : TObject(), +fN(0), +fOrder(0), +fX(0), +fW(0){ // // default contructor // - fX = 0; - fW = 0; - fN = 0; - fOrder = 0; - return; } -AliITSstatistics::AliITSstatistics(Int_t order) : TObject(){ +AliITSstatistics::AliITSstatistics(Int_t order) : TObject(), +fN(0), +fOrder(order), +fX(0), +fW(0){ // // contructor to a specific order in the moments // - fOrder = order; fX = new Double_t[order]; fW = new Double_t[order]; for(Int_t i=0;i