/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkLevel2.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkLevel2.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by pam-fi, Wed Jun 14 10:01:44 2006 UTC revision 1.5 by pam-fi, Fri Jun 30 09:48:15 2006 UTC
# Line 333  void TrkLevel2::FillCommonVar(cTrkLevel2 Line 333  void TrkLevel2::FillCommonVar(cTrkLevel2
333          new(sy[i]) TrkSinglet(*t_singlet);          new(sy[i]) TrkSinglet(*t_singlet);
334          t_singlet->Clear();          t_singlet->Clear();
335          };          };
336            
337            delete t_track;
338            delete t_singlet;
339  }  }
340  //--------------------------------------  //--------------------------------------
341  //  //
# Line 343  void TrkLevel2::Clear(){ Line 346  void TrkLevel2::Clear(){
346      for(Int_t i=0; i<12 ; i++){      for(Int_t i=0; i<12 ; i++){
347          crc[i] = -1;          crc[i] = -1;
348      };      };
349      Track->RemoveAll();  /*    Track->RemoveAll();
350      SingletX->RemoveAll();      SingletX->RemoveAll();
351      SingletY->RemoveAll();      SingletY->RemoveAll();*/
352            // modify to avoid memory leakage
353            Track->Clear();
354            SingletX->Clear();
355            SingletY->Clear();
356  }  }
357  //--------------------------------------  //--------------------------------------
358  //  //
# Line 359  TClonesArray *TrkLevel2::GetTracks(){ Line 366  TClonesArray *TrkLevel2::GetTracks(){
366      TClonesArray *sorted = GetTracks_NFitSorted();      TClonesArray *sorted = GetTracks_NFitSorted();
367      return sorted;      return sorted;
368  };  };
369    
370  TClonesArray *TrkLevel2::GetTracks_Chi2Sorted(){  TClonesArray *TrkLevel2::GetTracks_Chi2Sorted(){
371    
372      TClonesArray *sorted = new TClonesArray("TrkTrack");      TClonesArray *sorted = new TClonesArray("TrkTrack");
# Line 470  TrkTrack *TrkLevel2::GetTrack(int it){ Line 478  TrkTrack *TrkLevel2::GetTrack(int it){
478          return 0;          return 0;
479      }      }
480      TrkTrack *track = (TrkTrack*)(*(this->GetTracks()))[it];      TrkTrack *track = (TrkTrack*)(*(this->GetTracks()))[it];
481            GetTracks()->Delete();////TEMPORANEO
482      return track;      return track;
483  }  }
484    Int_t TrkLevel2::GetNTracks(){
485            Int_t ntot=0;
486            ntot = GetTracks()->GetEntries();
487            GetTracks()->Delete();////TEMPORANEO
488            return ntot;
489    };
490  //--------------------------------------  //--------------------------------------
491  //  //
492  //  //

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23