StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlSensorHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StPxlSensorHitCollection.cxx,v 2.1 2013/03/05 14:40:41 ullrich Exp $
4  *
5  * Author: X. Dong, Jan 2013
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StPxlSensorHitCollection.cxx,v $
13  * Revision 2.1 2013/03/05 14:40:41 ullrich
14  * Initial Revision.
15  *
16  **************************************************************************/
17 #include "StPxlSensorHitCollection.h"
18 #include "StPxlHit.h"
19 
21 
23 
24 StPxlSensorHitCollection::~StPxlSensorHitCollection()
25 {
26  //
27  // Usually this wouldn't be necessary but mHits
28  // is a polymorphic container and StPxlHit
29  // provides its own new/delete operator.
30  //
31  for (unsigned int i=0; i<mHits.size(); i++) {
32  delete mHits[i];
33  mHits[i] = 0;
34  }
35 }
36 
37 const StSPtrVecPxlHit&
38 StPxlSensorHitCollection::hits() const { return mHits; }
39 
40 StSPtrVecPxlHit&
41 StPxlSensorHitCollection::hits() { return mHits; }