StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSvtWaferHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StSvtWaferHitCollection.cxx,v 2.3 2001/04/05 04:00:56 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, Sep 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StSvtWaferHitCollection.cxx,v $
13  * Revision 2.3 2001/04/05 04:00:56 ullrich
14  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
15  *
16  * Revision 2.2 1999/11/11 21:19:35 ullrich
17  * Delete hits explicitly in destructor
18  *
19  * Revision 2.1 1999/10/13 19:45:22 ullrich
20  * Initial Revision
21  *
22  **************************************************************************/
23 #include "StSvtWaferHitCollection.h"
24 #include "StSvtHit.h"
25 
26 static const char rcsid[] = "$Id: StSvtWaferHitCollection.cxx,v 2.3 2001/04/05 04:00:56 ullrich Exp $";
27 
29 
31 
32 StSvtWaferHitCollection::~StSvtWaferHitCollection()
33 {
34  //
35  // Usually this wouldn't be necessary but mHits
36  // is a polymorphic container and StTpcHit
37  // provides its own new/delete operator.
38  //
39  for (unsigned int i=0; i<mHits.size(); i++) {
40  delete mHits[i];
41  mHits[i] = 0;
42  }
43 }
44 
45 
46 const StSPtrVecSvtHit&
47 StSvtWaferHitCollection::hits() const { return mHits; }
48 
49 StSPtrVecSvtHit&
50 StSvtWaferHitCollection::hits() { return mHits; }