StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFttCollection.h
1 /***************************************************************************
2  *
3  * $Id: StFttCollection.h,v 2.1 2021/01/11 20:25:37 ullrich Exp $
4  *
5  * Author: Akio Ogawa, 2018 Aug
6  ***************************************************************************
7  *
8  * Description:
9  * Collection of all hits (towers), clusters and points (photons) in the FCS
10  * This collection owns all these objects, and is itself owned by StEvent.
11  * It is therefore vital to *not* delete any of the objects stored in this
12  * container yourself - the collection will handle freeing memory.
13  * Similarly, any object added to the collection via an add() method must be
14  * allocated with new, and not be owned anywhere else.
15  *
16  ***************************************************************************/
17 #ifndef StFttCollection_hh
18 #define StFttCollection_hh
19 
20 #include "Stiostream.h"
21 #include "StObject.h"
22 #include "StEnumerations.h"
23 #include "StContainers.h"
24 
25 class StFttRawHit;
26 class StFttCluster;
27 class StFttPoint;
28 
29 class StFttCollection : public StObject {
30 public:
32  ~StFttCollection();
33 
34  void addRawHit(StFttRawHit*); // Add a hit
35  StSPtrVecFttRawHit& rawHits(); // Return the hit list
36  const StSPtrVecFttRawHit& rawHits() const; // Return the hit list
37  unsigned int numberOfRawHits() const; // Return the number of hits
38 
39  void addCluster(StFttCluster*); // Add a cluster
40  StSPtrVecFttCluster& clusters(); // Return the cluster list
41  const StSPtrVecFttCluster& clusters() const; // Return the cluster list
42  unsigned int numberOfClusters() const; // Return the number of clusters
43 
44  void addPoint(StFttPoint*); // Add a point
45  StSPtrVecFttPoint& points(); // Return the point list
46  const StSPtrVecFttPoint& points() const; // Return the point list
47  unsigned int numberOfPoints() const; // Return the number of points
48 
49  void print(int option=1);
50 
51 private:
52  StSPtrVecFttRawHit mRawHits;
53  StSPtrVecFttCluster mClusters;
54  StSPtrVecFttPoint mPoints;
55 
56  ClassDef(StFttCollection,1)
57 
58 };
59 
60 #endif