StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StIstSensorHitCollection.cxx
1 /***************************************************************************
2 *
3 * $Id: StIstSensorHitCollection.cxx,v 2.1 2014/04/10 16:21:04 jeromel Exp $
4 *
5 * Author: Yaping Wang, August 2013
6 ****************************************************************************
7 * Description:
8 * See header file.
9 ***************************************************************************/
10 
11 #include "StIstSensorHitCollection.h"
12 #include "StIstHit.h"
13 
14 static const char rcsid[] = "$Id: StIstSensorHitCollection.cxx,v 2.1 2014/04/10 16:21:04 jeromel Exp $";
15 
17 
19 
20 StIstSensorHitCollection::~StIstSensorHitCollection()
21 {
22  // Usually this wouldn't be necessary but mHits is a polymorphic container and StIstHit provides
23  // its own new/delete operator
24  for (unsigned int i=0; i<mHits.size(); i++) {
25  delete mHits[i];
26  mHits[i] = 0;
27  }
28 }
29 
30 const StSPtrVecIstHit & StIstSensorHitCollection::hits() const { return mHits; }
31 
32 StSPtrVecIstHit & StIstSensorHitCollection::hits() { return mHits; }
33 
34 
35 /***************************************************************************
36 *
37 * $Log: StIstSensorHitCollection.cxx,v $
38 * Revision 2.1 2014/04/10 16:21:04 jeromel
39 * Ist struct (Thomas OK-ed)
40 *
41 * Revision 1.6 2014/03/13 22:10:36 smirnovd
42 * Collapse vector after clean up
43 *
44 * Revision 1.5 2014/03/13 22:10:21 smirnovd
45 * Fixed constructor's initialization list
46 *
47 * Revision 1.4 2014/03/13 22:05:25 smirnovd
48 * Style issue: Function return types on same line
49 *
50 * Revision 1.3 2014/02/26 21:18:08 smirnovd
51 * Style corrected with astyle -s3 -p -H -A3 -k3 -O -o -y -Y -f
52 *
53 * Revision 1.2 2014/01/29 18:25:00 ypwang
54 * updating scripts
55 *
56 *
57 ****************************************************************************
58 * StIstSensorHitCollection.cxx,v 1.0
59 * Revision 1.0 2013/11/04 15:25:30 Yaping
60 * Initial version
61 ****************************************************************************/