From 60fecfb6cc9693328adb93534c24875211bb4eb7 Mon Sep 17 00:00:00 2001 From: gustavo Date: Sat, 17 Nov 2007 16:38:24 +0000 Subject: [PATCH] streaming of AliAnaGamma and its data members (removed ! in .h) (MG) --- PWG4/AliAnaGamma.cxx | 30 ++++++++++++++++++------------ PWG4/AliAnaGamma.h | 15 +++++++++------ 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/PWG4/AliAnaGamma.cxx b/PWG4/AliAnaGamma.cxx index ba18027de7d..eb0f690c4c2 100644 --- a/PWG4/AliAnaGamma.cxx +++ b/PWG4/AliAnaGamma.cxx @@ -17,6 +17,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.4 2007/10/29 13:48:42 gustavo + * Corrected coding violations + * * Revision 1.2 2007/08/17 12:40:04 schutz * New analysis classes by Gustavo Conesa * @@ -123,18 +126,21 @@ AliAnaGamma & AliAnaGamma::operator = (const AliAnaGamma & source) //____________________________________________________________________________ AliAnaGamma::~AliAnaGamma() { - // Remove all pointers - - fOutputContainer->Clear() ; - delete fOutputContainer ; - - delete fData ; - delete fKine ; - delete fReader ; - delete fGammaDirect ; - delete fGammaCorrelation ; - delete fGammaSelection ; - delete fNeutralMesonSelection ; + // Remove all pointers. + + // Protection added in case of NULL pointers (MG) + if (fOutputContainer) { + fOutputContainer->Clear(); + delete fOutputContainer ; + } + + if (fData) delete fData ; + if (fKine) delete fKine ; + if (fReader) delete fReader ; + if (fGammaDirect) delete fGammaDirect ; + if (fGammaCorrelation) delete fGammaCorrelation ; + if (fGammaSelection) delete fGammaSelection ; + if (fNeutralMesonSelection) delete fNeutralMesonSelection ; } diff --git a/PWG4/AliAnaGamma.h b/PWG4/AliAnaGamma.h index cd6e3038250..68931731082 100644 --- a/PWG4/AliAnaGamma.h +++ b/PWG4/AliAnaGamma.h @@ -7,6 +7,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.4 2007/10/29 13:48:42 gustavo + * Corrected coding violations + * * Revision 1.2 2007/08/17 12:40:04 schutz * New analysis classes by Gustavo Conesa * @@ -101,16 +104,16 @@ public: private: //General Data members - TList *fOutputContainer ; //! output data container + TList *fOutputContainer ; // output data container Int_t fAnaType; //Analysis type to be done TString fCalorimeter; //Prompt photon detector TObject * fData ; //! ESD TObject * fKine ; //! Stack - AliGammaReader * fReader ; //! Pointer to reader - AliAnaGammaDirect * fGammaDirect ; //! Pointer to prompt gamma algorithm - AliAnaGammaCorrelation * fGammaCorrelation ; //! Pointer to gamma correlation algorithm - AliAnaGammaSelection * fGammaSelection ; //! Pointer to gamma selection algorithm - AliNeutralMesonSelection * fNeutralMesonSelection ; //! Pointer to pair selection for pi0 identification. + AliGammaReader * fReader ; // Pointer to reader + AliAnaGammaDirect * fGammaDirect ; // Pointer to prompt gamma algorithm + AliAnaGammaCorrelation * fGammaCorrelation ; // Pointer to gamma correlation algorithm + AliAnaGammaSelection * fGammaSelection ; // Pointer to gamma selection algorithm + AliNeutralMesonSelection * fNeutralMesonSelection ; // Pointer to pair selection for pi0 identification. TClonesArray* fAODclusters; //! reconstructed jets Int_t fNAODclusters; //! number of reconstructed jets -- 2.39.3