StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StL3Trigger.cxx
1 /***************************************************************************
2  *
3  * $Id: StL3Trigger.cxx,v 2.3 2001/08/02 01:27:45 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, Apr 2000
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StL3Trigger.cxx,v $
13  * Revision 2.3 2001/08/02 01:27:45 ullrich
14  * Added event summary and algorithms.
15  *
16  * Revision 2.2 2001/04/05 04:00:51 ullrich
17  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
18  *
19  * Revision 2.1 2000/03/29 16:53:07 ullrich
20  * Initial Revision
21  *
22  **************************************************************************/
23 #include "StL3Trigger.h"
24 #include "StTpcHitCollection.h"
25 #include "StPrimaryVertex.h"
26 #include "StL3EventSummary.h"
27 
28 static const char rcsid[] = "$Id: StL3Trigger.cxx,v 2.3 2001/08/02 01:27:45 ullrich Exp $";
29 
30 ClassImp(StL3Trigger)
31 
33 {
34  mL3TpcHits = 0;
35  mL3EventSummary = 0;
36 }
37 
38 StL3Trigger::~StL3Trigger()
39 {
40  delete mL3TpcHits; mL3TpcHits = 0;
41  delete mL3EventSummary; mL3EventSummary = 0;
42 }
43 
45 StL3Trigger::l3EventSummary() { return mL3EventSummary; }
46 
47 const StL3EventSummary*
48 StL3Trigger::l3EventSummary() const { return mL3EventSummary; }
49 
51 StL3Trigger::tpcHitCollection() { return mL3TpcHits; }
52 
53 const StTpcHitCollection*
54 StL3Trigger::tpcHitCollection() const { return mL3TpcHits; }
55 
56 StSPtrVecTrackDetectorInfo&
57 StL3Trigger::trackDetectorInfo() { return mL3TrackDetectorInfo; }
58 
59 const StSPtrVecTrackDetectorInfo&
60 StL3Trigger::trackDetectorInfo() const { return mL3TrackDetectorInfo; }
61 
62 StSPtrVecTrackNode&
63 StL3Trigger::trackNodes() { return mL3TrackNodes; }
64 
65 const StSPtrVecTrackNode&
66 StL3Trigger::trackNodes() const { return mL3TrackNodes; }
67 
68 unsigned int
69 StL3Trigger::numberOfPrimaryVertices() const { return mL3PrimaryVertices.size(); }
70 
72 StL3Trigger::primaryVertex(unsigned int i)
73 {
74  if (i < mL3PrimaryVertices.size())
75  return mL3PrimaryVertices[i];
76  else
77  return 0;
78 }
79 
80 const StPrimaryVertex*
81 StL3Trigger::primaryVertex(unsigned int i) const
82 {
83  if (i < mL3PrimaryVertices.size())
84  return mL3PrimaryVertices[i];
85  else
86  return 0;
87 }
88 
89 void
90 StL3Trigger::setTpcHitCollection(StTpcHitCollection* val)
91 {
92  if (mL3TpcHits) delete mL3TpcHits;
93  mL3TpcHits = val;
94 }
95 
96 
97 void
98 StL3Trigger::setL3EventSummary(StL3EventSummary* evsum)
99 {
100  if (mL3EventSummary) delete mL3EventSummary;
101  mL3EventSummary = evsum;
102 }
103 
104 
105 void
106 StL3Trigger::addPrimaryVertex(StPrimaryVertex* vertex)
107 {
108  if (vertex)
109  mL3PrimaryVertices.push_back(vertex);
110 }