StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEventInfo.cxx
1 /***************************************************************************
2  *
3  * $Id: StEventInfo.cxx,v 2.5 2009/11/23 16:34:06 fisyak Exp $
4  *
5  * Author: Thomas Ullrich, Jun 2000
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************
11  *
12  * $Log: StEventInfo.cxx,v $
13  * Revision 2.5 2009/11/23 16:34:06 fisyak
14  * Cleanup, remove dependence on dst tables, clean up software monitors
15  *
16  * Revision 2.4 2001/09/19 04:48:08 ullrich
17  * Added event size.
18  *
19  * Revision 2.3 2001/04/05 04:00:49 ullrich
20  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
21  *
22  * Revision 2.2 2000/09/06 22:34:20 ullrich
23  * Changed mBunchCrossingNumber from scalar to array to hold all 64 bits.
24  *
25  * Revision 2.1 2000/06/19 01:32:16 perev
26  * Thomas StEvent branches added
27  *
28  **************************************************************************/
29 #include "StEventInfo.h"
30 #include "tables/St_event_header_Table.h"
31 
32 static const char rcsid[] = "$Id: StEventInfo.cxx,v 2.5 2009/11/23 16:34:06 fisyak Exp $";
33 
34 ClassImp(StEventInfo)
35 
37 {
38  mRunId = 0;
39  mId = 0;
40  mTime = 0;
41  mTriggerMask = 0;
42  mBunchCrossingNumber[0] = 0;
43  mBunchCrossingNumber[1] = 0;
44  mEventSize = 0;
45 }
46 StEventInfo::~StEventInfo() { /* noop */ }
47 
48 const TString&
49 StEventInfo::type() const { return mType; }
50 
51 int
52 StEventInfo::id() const { return mId; }
53 
54 int
55 StEventInfo::runId() const { return mRunId; }
56 
57 int
58 StEventInfo::time() const { return mTime; }
59 
60 unsigned int
61 StEventInfo::triggerMask() const { return mTriggerMask; }
62 
63 unsigned int
64 StEventInfo::bunchCrossingNumber(unsigned int i) const
65 {
66  return i<2 ? mBunchCrossingNumber[i] : 0;
67 }
68 
69 unsigned int
70 StEventInfo::eventSize() const { return mEventSize; }
71 
72 void
73 StEventInfo::setType(const char* val) { mType = val; }
74 
75 void
76 StEventInfo::setRunId(int val) { mRunId = val; }
77 
78 void
79 StEventInfo::setId(int val) { mId = val; }
80 
81 void
82 StEventInfo::setTime(int val) { mTime = val; }
83 
84 void
85 StEventInfo::setTriggerMask(unsigned int val) { mTriggerMask = val; }
86 
87 void
88 StEventInfo::setBunchCrossingNumber(unsigned int val, unsigned int i)
89 {
90  if (i<2) mBunchCrossingNumber[i] = val;
91 }
92 
93 void
94 StEventInfo::setEventSize(unsigned int val) { mEventSize = val; }