StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSstLadderHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StSstLadderHitCollection.cxx,v 2.1 2015/05/13 16:50:59 ullrich Exp $
4  *
5  * Author: Jonathan Bouchet, Thomas Ullrich, May 2015
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StSstLadderHitCollection.cxx,v $
13  * Revision 2.1 2015/05/13 16:50:59 ullrich
14  * Initial Revision.
15  *
16  **************************************************************************/
17 #include "StSstLadderHitCollection.h"
18 
19 static const char rcsid[] = "$Id: StSstLadderHitCollection.cxx,v 2.1 2015/05/13 16:50:59 ullrich Exp $";
20 
22 
24 
25 StSstLadderHitCollection::~StSstLadderHitCollection() { /* no op */ }
26 
27 unsigned int
28 StSstLadderHitCollection::numberOfWafers() const {return mMaxNumberOfWafers;}
29 
30 unsigned int
31 StSstLadderHitCollection::numberOfHits() const
32 {
33  unsigned int sum = 0;
34  for (unsigned int j=0; j<numberOfWafers(); j++) {
35  sum += mWafers[j].hits().size();
36  }
37  return sum;
38 }
39 
41 StSstLadderHitCollection::wafer(unsigned int i)
42 {
43  if (i < numberOfWafers())
44  return &(mWafers[i]);
45  else
46  return 0;
47 }
48 
50 StSstLadderHitCollection::wafer(unsigned int i) const
51 {
52  if (i < numberOfWafers())
53  return &(mWafers[i]);
54  else
55  return 0;
56 }
57