StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofData.h
1 
5 /***************************************************************************
6  *
7  * $Id: StTofData.h,v 2.4 2005/04/11 22:35:25 calderon Exp $
8  *
9  * Author: W.J. Llope, Sep 2001
10  ***************************************************************************
11  *
12  * Description: TOFp Systems raw data (TOFp+pVPD)
13  *
14  ***************************************************************************
15  *
16  * $Log: StTofData.h,v $
17  * Revision 2.4 2005/04/11 22:35:25 calderon
18  * Tof Classes for Run 5. Modifications and additions from Xin to
19  * take care of new TOF daq and electronics. Added StTofRawData and
20  * modified containers and includes.
21  *
22  * Revision 2.3 2003/05/21 18:22:46 ullrich
23  * Major Revision of ToF classes (F. Geurts)
24  *
25  * Revision 2.2 2002/02/22 22:56:51 jeromel
26  * Doxygen basic documentation in all header files. None of this is required
27  * for QM production.
28  *
29  * Revision 2.1 2001/10/01 19:39:52 ullrich
30  * Initial Revision.
31  *
32  **************************************************************************/
33 #ifndef StTofData_hh
34 #define StTofData_hh
35 
36 #include "StObject.h"
37 
38 class StTofData : public StObject {
39 public:
40  StTofData();
41  StTofData(unsigned short, unsigned short, unsigned short, short, unsigned short, unsigned int, unsigned int);
42  ~StTofData();
43 
44  int operator==(const StTofData&) const;
45  int operator!=(const StTofData&) const;
46 
47  unsigned short dataIndex() const;
48  unsigned short adc() const;
49  unsigned short tdc() const;
50  short tc() const;
51  unsigned short sc() const;
52 
53  unsigned int leadingTdc() const;
54  unsigned int trailingTdc() const;
55 
56  void setDataIndex(unsigned short);
57  void setAdc(unsigned short);
58  void setTdc(unsigned short);
59  void setTc(short);
60  void setSc(unsigned short);
61 
62  void setLeadingTdc(unsigned int);
63  void setTrailingTdc(unsigned int);
64 
65 protected:
66  UShort_t mDataIndex;
67  UShort_t mAdc;
68  UShort_t mTdc;
69  Short_t mTc;
70  UShort_t mSc;
71 
72  UInt_t mLeadingTdc;
73  UInt_t mTrailingTdc;
74 
75  ClassDef(StTofData,3)
76 };
77 
78 inline void
79 StTofData::setDataIndex(unsigned short dataId)
80 {
81  mDataIndex = dataId;
82 }
83 
84 inline void
85 StTofData::setAdc(unsigned short rawAdc)
86 {
87  mAdc = rawAdc;
88 }
89 
90 inline void
91 StTofData::setTdc(unsigned short rawTdc)
92 {
93  mTdc = rawTdc;
94 }
95 
96 inline void
97 StTofData::setTc(short rawTc)
98 {
99  mTc = rawTc;
100 }
101 
102 inline void
103 StTofData::setSc(unsigned short rawSc)
104 {
105  mSc = rawSc;
106 }
107 
108 inline void
109 StTofData::setLeadingTdc(unsigned int rawLTdc)
110 {
111  mLeadingTdc = rawLTdc;
112 }
113 
114 inline void
115 StTofData::setTrailingTdc(unsigned int rawTTdc)
116 {
117  mTrailingTdc = rawTTdc;
118 }
119 
120 
121 inline unsigned short
122 StTofData::dataIndex() const
123 {
124  return mDataIndex;
125 }
126 
127 inline unsigned short
128 StTofData::adc() const
129 {
130  return mAdc;
131 }
132 
133 inline unsigned short
134 StTofData::tdc() const
135 {
136  return mTdc;
137 }
138 
139 inline short
140 StTofData::tc() const
141 {
142  return mTc;
143 }
144 
145 inline unsigned short
146 StTofData::sc() const
147 {
148  return mSc;
149 }
150 
151 inline unsigned int
152 StTofData::leadingTdc() const
153 {
154  return mLeadingTdc;
155 }
156 
157 inline unsigned int
158 StTofData::trailingTdc() const
159 {
160  return mTrailingTdc;
161 }
162 
163 ostream& operator<<(ostream& os, const StTofData&);
164 
165 #endif