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