StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcPlaneHitCollection.cxx
1 /***************************************************************************
2  *
3  * $Id: StFtpcPlaneHitCollection.cxx,v 2.2 2001/04/05 04:00:50 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, July 1999
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StFtpcPlaneHitCollection.cxx,v $
13  * Revision 2.2 2001/04/05 04:00:50 ullrich
14  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
15  *
16  * Revision 2.1 1999/10/13 19:44:40 ullrich
17  * Initial Revision
18  *
19  **************************************************************************/
20 #include "StFtpcPlaneHitCollection.h"
21 
22 static const char rcsid[] = "$Id: StFtpcPlaneHitCollection.cxx,v 2.2 2001/04/05 04:00:50 ullrich Exp $";
23 
25 
27 
28 StFtpcPlaneHitCollection::~StFtpcPlaneHitCollection() { /* noop */ }
29 
30 unsigned int
31 StFtpcPlaneHitCollection::numberOfSectors() const { return mNumberOfSectors; }
32 
33 StFtpcSectorHitCollection* StFtpcPlaneHitCollection::sector(unsigned int i)
34 {
35  if (i < mNumberOfSectors)
36  return &(mSectors[i]);
37  else
38  return 0;
39 }
40 
42 StFtpcPlaneHitCollection::sector(unsigned int i) const
43 {
44  if (i < mNumberOfSectors)
45  return &(mSectors[i]);
46  else
47  return 0;
48 }
49 
50 unsigned int StFtpcPlaneHitCollection::numberOfHits() const
51 {
52  unsigned int sum = 0;
53  for (int i=0; i < mNumberOfSectors; i++)
54  sum += mSectors[i].hits().size();
55  return sum;
56 }