StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPxlLadderHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StPxlLadderHitCollection.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: StPxlLadderHitCollection.cxx,v $
13  * Revision 2.1 2013/03/05 14:40:41 ullrich
14  * Initial Revision.
15  *
16  **************************************************************************/
17 #include "StPxlLadderHitCollection.h"
18 #include "StPxlHit.h"
19 
21 
23 
24 StPxlLadderHitCollection::~StPxlLadderHitCollection() { /* noop */ }
25 
27 StPxlLadderHitCollection::sensor(unsigned int i)
28 {
29  return (i < mNumberOfSensors) ? &(mSensors[i]) : 0;
30 }
31 
33 StPxlLadderHitCollection::sensor(unsigned int i) const
34 {
35  return (i < mNumberOfSensors) ? &(mSensors[i]) : 0;
36 }
37 
38 unsigned int StPxlLadderHitCollection::numberOfHits() const
39 {
40  unsigned int sum = 0;
41  for ( int i=0; i < mNumberOfSensors; i++) {
42  sum += mSensors[i].hits().size();
43  }
44  return sum;
45 }