]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes for memory problems
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Aug 2009 12:51:03 +0000 (12:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 13 Aug 2009 12:51:03 +0000 (12:51 +0000)
HMPID/AliHMPIDQADataMakerRec.cxx
HMPID/AliHMPIDRawStream.cxx
STEER/AliESDTagCreator.cxx
ZDC/AliZDCQADataMakerRec.cxx

index be0da001a12a6ca5cfb176a9892fd3c4ed8d2f04..c890e4011bc9b77d2a98aac220188a36fdc58f58 100644 (file)
@@ -229,7 +229,7 @@ void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader)
        }      
      }
 
        }      
      }
 
-   stream.Delete();
+    //   stream.Delete();
    
 }
 
    
 }
 
index 1b01269dbfda94e4d9648d8994138e701c25e57b..b4b05c56befa108a384a015746c3770851a21ed8 100644 (file)
@@ -119,10 +119,11 @@ AliHMPIDRawStream::~AliHMPIDRawStream()
   fWord=0;
   fZeroSup=0;
   fTurbo=0;
   fWord=0;
   fZeroSup=0;
   fTurbo=0;
-  for(Int_t i=0;i<kSumErr;i++) delete [] fNumOfErr[i]; 
+  for(Int_t i=0;i<kNDDL;i++) delete [] fNumOfErr[i]; 
   delete [] fNumOfErr; 
 
   delete [] fNumOfErr; 
 
-  if(fnDDLInStream) { delete [] fnDDLInStream; fnDDLInStream = 0x0; }
+  delete [] fnDDLInStream;
+  delete [] fnDDLOutStream;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDRawStream::Reset()
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDRawStream::Reset()
index cf088e1c276909a75ffe459c4bae8232a21f14ba..8e5541bc6b705487f9063a9b20b678ede200573c 100644 (file)
@@ -280,8 +280,8 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
-  TTree ttag("T","A Tree with event tags");
-  TBranch * btag = ttag.Branch("AliTAG", &tag);
+  TTree * ttag = new TTree("T","A Tree with event tags");
+  TBranch * btag = ttag->Branch("AliTAG", &tag);
   btag->SetCompressionLevel(9);
 
   for(Int_t iEventNumber = 0; iEventNumber < chain->GetEntries(); iEventNumber++) {
   btag->SetCompressionLevel(9);
 
   for(Int_t iEventNumber = 0; iEventNumber < chain->GetEntries(); iEventNumber++) {
@@ -525,13 +525,13 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
 
     if(fguid != fTempGuid) {
       fTempGuid = fguid;
 
     if(fguid != fTempGuid) {
       fTempGuid = fguid;
-      ttag.Fill();
+      ttag->Fill();
       tag->Clear("");
     }
     tag->AddEventTag(*evTag);
     if(iEventNumber+1 == chain->GetEntries()) {
       //AliInfo(Form("File: %s",fturl.Data()));
       tag->Clear("");
     }
     tag->AddEventTag(*evTag);
     if(iEventNumber+1 == chain->GetEntries()) {
       //AliInfo(Form("File: %s",fturl.Data()));
-      ttag.Fill();
+      ttag->Fill();
       tag->Clear("");
     }      
   }//event loop
       tag->Clear("");
     }      
   }//event loop
@@ -549,7 +549,7 @@ void AliESDTagCreator::CreateTag(TChain* chain, const char *type) {
 
   ftag->cd();
   tag->Clear();
 
   ftag->cd();
   tag->Clear();
-  ttag.Write();
+  ttag->Write();
   ftag->Close();
 
   //gSystem->GetMemInfo(meminfo);
   ftag->Close();
 
   //gSystem->GetMemInfo(meminfo);
@@ -607,8 +607,8 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
-  TTree ttag("T","A Tree with event tags");
-  TBranch * btag = ttag.Branch("AliTAG", &tag);
+  TTree * ttag = new TTree("T","A Tree with event tags");
+  TBranch * btag = ttag->Branch("AliTAG", &tag);
   btag->SetCompressionLevel(9);
   gSystem->GetMemInfo(meminfo);
   AliInfo(Form("After the tag initialization - Memory used: %d MB",meminfo->fMemUsed));
   btag->SetCompressionLevel(9);
   gSystem->GetMemInfo(meminfo);
   AliInfo(Form("After the tag initialization - Memory used: %d MB",meminfo->fMemUsed));
@@ -904,9 +904,9 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *guid, const char *md5,
 
   TFile* ftag = TFile::Open(fileName, "recreate");
   ftag->cd();
 
   TFile* ftag = TFile::Open(fileName, "recreate");
   ftag->cd();
-  ttag.Fill();
+  ttag->Fill();
   tag->Clear();
   tag->Clear();
-  ttag.Write();
+  ttag->Write();
   ftag->Close();
 
   gSystem->GetMemInfo(meminfo);
   ftag->Close();
 
   gSystem->GetMemInfo(meminfo);
@@ -962,8 +962,8 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
 
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
-  TTree ttag("T","A Tree with event tags");
-  TBranch * btag = ttag.Branch("AliTAG", &tag);
+  TTree * ttag = new TTree("T","A Tree with event tags");
+  TBranch * btag = ttag->Branch("AliTAG", &tag);
   btag->SetCompressionLevel(9);
   
   AliInfo(Form("Creating the ESD tags......."));       
   btag->SetCompressionLevel(9);
   
   AliInfo(Form("Creating the ESD tags......."));       
@@ -1243,9 +1243,9 @@ void AliESDTagCreator::CreateTag(TFile* file, const char *filepath, Int_t Counte
 
   TFile* ftag = TFile::Open(fileName, "recreate");
   ftag->cd();
 
   TFile* ftag = TFile::Open(fileName, "recreate");
   ftag->cd();
-  ttag.Fill();
+  ttag->Fill();
   tag->Clear();
   tag->Clear();
-  ttag.Write();
+  ttag->Write();
   ftag->Close();
 
   delete ftag;
   ftag->Close();
 
   delete ftag;
@@ -1336,8 +1336,8 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
  
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
  
   AliRunTag *tag = new AliRunTag();
   AliEventTag *evTag = new AliEventTag();
-  TTree ttag("T","A Tree with event tags");
-  TBranch * btag = ttag.Branch("AliTAG", &tag);
+  TTree * ttag = new TTree("T","A Tree with event tags");
+  TBranch * btag = ttag->Branch("AliTAG", &tag);
   btag->SetCompressionLevel(9);
 
   if(fLastEvent != -1) iNumberOfEvents = fLastEvent + 1;
   btag->SetCompressionLevel(9);
 
   if(fLastEvent != -1) iNumberOfEvents = fLastEvent + 1;
@@ -1589,9 +1589,9 @@ void AliESDTagCreator::CreateESDTags(Int_t fFirstEvent, Int_t fLastEvent, AliGRP
   }
        
   ftag->cd();
   }
        
   ftag->cd();
-  ttag.Fill();
+  ttag->Fill();
   tag->Clear();
   tag->Clear();
-  ttag.Write();
+  ttag->Write();
   ftag->Close();
   file->cd();
   delete tag;
   ftag->Close();
   file->cd();
   delete tag;
index 622134c551e9d4ba172c63c5c336c68dbbe25205..1f9b2a35fcff93347edefc464293301a331d5d42 100644 (file)
@@ -361,7 +361,7 @@ void AliZDCQADataMakerRec::MakeRaws(AliRawReader *rawReader)
   GetRawsData(18)->Fill(sumQ_ZPC_lg);
   GetRawsData(19)->Fill(sumQ_ZPA_lg);
   //
   GetRawsData(18)->Fill(sumQ_ZPC_lg);
   GetRawsData(19)->Fill(sumQ_ZPA_lg);
   //
-  stream.Delete();
+//   stream.Delete();
 }
 
 //___________________________________________________________________________
 }
 
 //___________________________________________________________________________