Review on transient/persistent data members
authorvicinanz <vicinanz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Apr 2002 11:30:32 +0000 (11:30 +0000)
committervicinanz <vicinanz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 22 Apr 2002 11:30:32 +0000 (11:30 +0000)
TOF/AliTOFPID.cxx
TOF/AliTOFPID.h
TOF/AliTOFReconstructioner.cxx
TOF/AliTOFReconstructioner.h
TOF/AliTOFT0.cxx

index 73e4156d9325a2232f0cf3ee54205c3dff5a4494..ff7e41f0580c60c72e368509a294bfc190df8ca3 100644 (file)
@@ -101,9 +101,15 @@ ClassImp(AliTOFPID)
 //____________________________________________________________________________ 
   AliTOFPID::AliTOFPID(char* headerFile, char *cutsFile, const Option_t* opt):TTask("AliTOFPID","") 
 {
+  felectron = 0;
+  fpion     = 0;
+  fkaon     = 0;
+  fproton   = 0;
   fhfile = TFile::Open(headerFile); // connect file with ntuple
   fcut = TFile::Open(cutsFile); // connect file for cuts
   foutfileName=headerFile;
+  fNtuple   = 0;
+  fgen      = 0;
 
   Init(opt);
   // add Task to //root/Tasks folder
index 98a0cf81499f767ee89b8bd6db2e0c07e9733f36..cb11c3538f34adc5aea441ae91202ef2786066b4 100644 (file)
@@ -49,7 +49,7 @@ private:
 
  protected:
 
-  ClassDef(AliTOFPID,1)  // Task class for TOF pid
+  ClassDef(AliTOFPID,0)  // Task class for TOF pid
 
 };
 
index db1c5d73f1d3c7442d12ba3f6123e48e1202b37f..ce2eb4766703ea986034c88069e7bb56069bf09b 100644 (file)
@@ -450,6 +450,12 @@ void AliTOFReconstructioner::Exec(const char* datafile, Option_t *option)
 
   }//event loop
 
+  // free used memory for ftail
+  if (ftail)
+    {
+      delete ftail;
+      ftail = 0;
+    }
 
   // writing ntuple on output file
   foutputfile->cd();
@@ -1600,6 +1606,9 @@ void AliTOFReconstructioner::ReadTOFHits(Int_t ntracks, TTree* treehits, TClones
     }
   }
 
+  // speed-up the code
+  treehits->SetBranchStatus("*",0); // switch off all branches
+  treehits->SetBranchStatus("TOF*",1); // switch on only TOF
 
   for (Int_t track=0; track<ntracks;track++) { // starting loop on primary tracks for the current event
 
@@ -2098,6 +2107,10 @@ void AliTOFReconstructioner::ReadTPCHits(Int_t ntracks, TTree* treehits, TClones
 
   itrack=0; // itrack: total number of selected TPC tracks
 
+  // speed-up the code
+  treehits->SetBranchStatus("*",0); // switch off all branches
+  treehits->SetBranchStatus("TPC*",1); // switch on only TPC
+
   for (Int_t track=0; track<ntracks;track++) {
     gAlice->ResetHits();
     nbytes += treehits->GetEvent(track);
index 6f82a2c651c31905ca22a0d35d0f2166fea480ba..1b5bdfb12de22568a8ae6bea395009b1683ec31e 100644 (file)
@@ -169,9 +169,9 @@ public:
   Bool_t   operator == (const AliTOFReconstructioner & tofrec) const ;
 
 private:
-  TGeant3 *fg3;             // pointer to GEANT geometry
-  TFile   *foutputfile;     // pointer to output file
-  TNtuple *foutputntuple;   // pointer to output ntuple
+  TGeant3 *fg3;             //! pointer to GEANT geometry
+  TFile   *foutputfile;     //! pointer to output file
+  TNtuple *foutputntuple;   //! pointer to output ntuple
   TF1     *fZnoise;         // pointer to formula giving the noise along z direction
   TF1     *ftail;           // pointer to formula for time with tail
   Int_t   fdbg;             // Flag for debug, 0 no debug, 1 debug
index c87306faf63d012c2196b94126581742e4173a0b..3f88b51edbd76758fbfbf8eddd3024131f0461ca 100644 (file)
@@ -234,6 +234,10 @@ void AliTOFT0::Exec(Option_t *option)
 
     Int_t lasttrack=-1;
     Int_t nset=0;
+
+    TH->SetBranchStatus("*",0); // switch off all branches
+    TH->SetBranchStatus("TOF*",1); // switch on only TOF
+
     // Start loop on primary tracks in the hits containers
 
     Int_t ntracks = static_cast<Int_t>(TH->GetEntries());