Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TkrGamma.cxx

Go to the documentation of this file.
00001 #include "reconRootData/TkrGamma.h"
00002 
00003 ClassImp(TkrGamma)
00004 
00005 TkrGamma::TkrGamma() {
00006     // default constructor
00007     m_tracks = 0;
00008     m_locator = 0;
00009 }
00010 
00011 TkrGamma::TkrGamma(Int_t dummy) {
00012     m_tracks = 0;
00013     m_locator = 0;
00014     Create();
00015 }
00016 
00017 
00018 TkrGamma::~TkrGamma() {
00019     Clean();
00020 }
00021 
00022 void TkrGamma::Clean() {
00023     // Does not de-allocate the tracks, since
00024     // probably pointers into TkrRecon's list of
00025     // tracks
00026     // But do free the TObjArray
00027     if (m_tracks) m_tracks->Clear();
00028 
00029     // but we do free memory associated with 
00030     // TkrLocators for this gamma
00031     if (m_locator) {
00032         int nEntries = m_locator->GetEntries();
00033         for (int i=0; i<nEntries; i++)
00034             delete m_locator->At(i);
00035         m_locator->Clear();
00036         delete m_locator;
00037         m_locator = 0;
00038     }
00039 }
00040 
00041 void TkrGamma::Create() {
00042     m_locator = new TObjArray();
00043     m_tracks = new TObjArray();
00044 }

Generated at Wed Nov 21 12:20:18 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000