StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTpcPadrowHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StTpcPadrowHitCollection.cxx,v 2.3 2001/04/05 04:00:57 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, July 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StTpcPadrowHitCollection.cxx,v $
13  * Revision 2.3 2001/04/05 04:00:57 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:38 ullrich
17  * Delete hits explicitly in destructor
18  *
19  * Revision 2.1 1999/10/13 19:45:30 ullrich
20  * Initial Revision
21  *
22  **************************************************************************/
23 #include "StTpcPadrowHitCollection.h"
24 #include "StTpcHit.h"
25 
26 static const char rcsid[] = "$Id: StTpcPadrowHitCollection.cxx,v 2.3 2001/04/05 04:00:57 ullrich Exp $";
27 
29 
31 
32 StTpcPadrowHitCollection::~StTpcPadrowHitCollection()
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 const StSPtrVecTpcHit&
46 StTpcPadrowHitCollection::hits() const { return mHits; }
47 
48 StSPtrVecTpcHit&
49 StTpcPadrowHitCollection::hits() { return mHits; }