StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StIstLadderHitCollection.cxx
1 /***************************************************************************
2 *
3 * $Id: StIstLadderHitCollection.cxx,v 2.1 2014/04/10 16:20:09 jeromel Exp $
4 *
5 * Author: Yaping Wang, August 2013
6 ****************************************************************************
7 * Description:
8 * See header file.
9 ***************************************************************************/
10 
11 #include "StIstLadderHitCollection.h"
12 
13 static const char rcsid[] = "$Id: StIstLadderHitCollection.cxx,v 2.1 2014/04/10 16:20:09 jeromel Exp $";
14 
16 
18 
19 StIstLadderHitCollection::~StIstLadderHitCollection() { /* noop */ }
20 
21 unsigned int StIstLadderHitCollection::numberOfHits() const
22 {
23  unsigned int sum = 0;
24 
25  for (unsigned int j = 0; j < kIstNumSensorsPerLadder; j++) {
26  sum += mSensors[j].hits().size();
27  }
28 
29  return sum;
30 }
31 
32 StIstSensorHitCollection* StIstLadderHitCollection::sensor(unsigned int i)
33 {
34  if (i < kIstNumSensorsPerLadder)
35  return &(mSensors[i]);
36  else
37  return 0;
38 }
39 
40 const StIstSensorHitCollection* StIstLadderHitCollection::sensor(unsigned int i) const
41 {
42  if (i < kIstNumSensorsPerLadder)
43  return &(mSensors[i]);
44  else
45  return 0;
46 }
47 
48 
49 /***************************************************************************
50 *
51 * $Log: StIstLadderHitCollection.cxx,v $
52 * Revision 2.1 2014/04/10 16:20:09 jeromel
53 * Ist struct (Thomas OK-ed)
54 *
55 * Revision 1.7 2014/03/17 20:27:57 ypwang
56 * remove numOfLadder() and numOfSensor() from StIstHitCollection.h and StIstLadderHitCollection.h, respectively
57 *
58 * Revision 1.6 2014/03/13 22:10:21 smirnovd
59 * Fixed constructor's initialization list
60 *
61 * Revision 1.5 2014/03/13 22:10:12 smirnovd
62 * Move some constants from StIstUtil/StIstConsts.h to StEvent/StEnumerations.h to avoid external dependance of StEvent on StIstUtil
63 *
64 * Revision 1.4 2014/03/13 22:05:25 smirnovd
65 * Style issue: Function return types on same line
66 *
67 * Revision 1.3 2014/02/26 21:18:08 smirnovd
68 * Style corrected with astyle -s3 -p -H -A3 -k3 -O -o -y -Y -f
69 *
70 * Revision 1.2 2014/01/29 18:25:00 ypwang
71 * updating scripts
72 *
73 *
74 ****************************************************************************
75 * StIstLadderHitCollection.cxx,v 1.0
76 * Revision 1.0 2013/11/04 15:25:30 Yaping
77 * Initial version
78 ****************************************************************************/
const int kIstNumSensorsPerLadder
6 sensor per one IST Ladder