From e460afec1cd3718b8cc05b3d266b1c17cf150dda Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 17 Jan 2001 10:50:50 +0000 Subject: [PATCH] Corrections to destructors --- STEER/AliDetector.cxx | 17 ++++++++++++++--- STEER/AliMCQA.cxx | 28 ++++++++++++++++++++++++++++ STEER/AliMCQA.h | 2 +- STEER/AliRun.cxx | 7 +++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/STEER/AliDetector.cxx b/STEER/AliDetector.cxx index ae61b101e4e..ba4b297af72 100644 --- a/STEER/AliDetector.cxx +++ b/STEER/AliDetector.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.9 2000/12/12 18:19:06 alibrary +Introduce consistency check when loading points + Revision 1.8 2000/11/30 07:12:48 alibrary Introducing new Rndm and QA classes @@ -106,9 +109,17 @@ AliDetector::~AliDetector() fNdigits = 0; // // Delete space point structure - if (fPoints) fPoints->Delete(); - delete fPoints; - fPoints = 0; + if (fPoints) { + fPoints->Delete(); + delete fPoints; + fPoints = 0; + } + // Delete digits structure + if (fDigits) { + fDigits->Delete(); + delete fDigits; + fDigits = 0; + } } //_____________________________________________________________________________ diff --git a/STEER/AliMCQA.cxx b/STEER/AliMCQA.cxx index adadcf5488a..bc19013e456 100644 --- a/STEER/AliMCQA.cxx +++ b/STEER/AliMCQA.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2000/12/18 14:16:31 alibrary +HP compatibility fix + Revision 1.2 2000/12/18 11:33:48 alibrary New call frequence histograms per module and volume @@ -147,6 +150,31 @@ AliMCQA::AliMCQA(Int_t ndets) : fMPaveLabel(0),fVPaveLabel(0) new TNamed(((AliModule *)(*gAlice->Modules())[i])->GetName(),""); } +//_____________________________________________________________________________ + +AliMCQA::~AliMCQA() { + if (fQAList) { + fQAList->Delete(); + delete fQAList; + fQAList=0; + } + if (fQAHist) { + fQAHist->Delete(); + delete fQAHist; + fQAHist=0; + } + if (fVolNames) { + fVolNames->Delete(); + delete fVolNames; + fVolNames=0; + } + if (fModNames) { + fModNames->Delete(); + delete fModNames; + fModNames=0; + } +} + //_____________________________________________________________________________ void AliMCQA::Browse(TBrowser *b) { diff --git a/STEER/AliMCQA.h b/STEER/AliMCQA.h index 53e9f959745..8621998f128 100644 --- a/STEER/AliMCQA.h +++ b/STEER/AliMCQA.h @@ -21,7 +21,7 @@ class AliMCQA : public TObject public: AliMCQA(); AliMCQA(Int_t ndets); - virtual ~AliMCQA() {delete fQAList;fQAList=0;} + virtual ~AliMCQA(); Bool_t IsFolder() const {return kTRUE;} virtual void Browse(TBrowser *b); virtual void PreTrack(); diff --git a/STEER/AliRun.cxx b/STEER/AliRun.cxx index 2e2863ecbf7..3ad03baf5fe 100644 --- a/STEER/AliRun.cxx +++ b/STEER/AliRun.cxx @@ -15,6 +15,12 @@ /* $Log$ +Revision 1.47 2000/12/18 10:44:01 morsch +Possibility to set field map by passing pointer to objet of type AliMagF via +SetField(). +Example: +gAlice->SetField(new AliMagFCM("Map2", "$(ALICE_ROOT)/data/field01.dat",2,1.,10.)); + Revision 1.46 2000/12/14 19:29:27 fca galice.cuts was not read any more @@ -297,6 +303,7 @@ AliRun::~AliRun() } delete fHitLists; delete fPDGDB; + delete fMCQA; } //_____________________________________________________________________________ -- 2.43.0