ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataCont/interface/Array.h
(Generate patch)

Comparing UserCode/MitAna/DataCont/interface/Array.h (file contents):
Revision 1.9 by loizides, Thu Dec 18 13:34:16 2008 UTC vs.
Revision 1.10 by bendavid, Thu Feb 26 17:05:18 2009 UTC

# Line 30 | Line 30 | namespace mithep
30        ArrayElement        *At(UInt_t idx);
31        const ArrayElement  *At(UInt_t idx)                       const;
32        void                 Clear(Option_t */*opt*/="")                { fArray.~TClonesArray(); }
33 +      void                 Delete();
34        UInt_t               Entries()                            const { return fNumEntries; }
35        UInt_t               GetEntries()                         const { return fNumEntries; }
36        const char          *GetName()                            const { return fArray.GetName(); }
# Line 209 | Line 210 | inline void mithep::Array<ArrayElement>:
210  
211    fNumEntries = 0;
212   }
213 +
214 + //--------------------------------------------------------------------------------------------------
215 + template<class ArrayElement>
216 + inline void mithep::Array<ArrayElement>::Delete()
217 + {
218 +  // ROOT implementation for clearing the array, deleting all objects inside
219 +
220 +  fArray.Delete();   //will call destructor for every element
221 +
222 +  fNumEntries = 0;
223 + }
224  
225   //--------------------------------------------------------------------------------------------------
226   template<class ArrayElement>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines