coverity fix
authormorsch <andreas.morsch@cern.ch>
Tue, 24 Jun 2014 06:15:23 +0000 (08:15 +0200)
committermorsch <andreas.morsch@cern.ch>
Tue, 24 Jun 2014 06:15:23 +0000 (08:15 +0200)
pachmay <Yvonne.Chiara.Pachmayer@cern.ch>

STEER/STEERBase/AliTRDNDFast.cxx

index a3a6fc4..26eab98 100644 (file)
@@ -116,9 +116,10 @@ AliTRDNDFast &AliTRDNDFast::operator=(const AliTRDNDFast &ref){
        fNDim=ref.fNDim;
        fTitle=ref.fTitle;
        fFunc = ref.fFunc;
-       fHistos=ref.fHistos;
        for(Int_t idim=0;idim<fNDim;idim++){
-           for(Int_t ipar=0;ipar<kNpar;ipar++)fPars[idim][ipar]=ref.fPars[idim][ipar];
+         fHistos[idim]=(TH1F*)ref.fHistos[idim]->Clone(Form("%s_axis_%d",GetName(),idim));
+         fHistos[idim]->SetDirectory(0);
+         for(Int_t ipar=0;ipar<kNpar;ipar++)fPars[idim][ipar]=ref.fPars[idim][ipar];
        }
     }
     return *this;