StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofRawData.cxx
1 /***************************************************************************
2  *
3  * $Id: StTofRawData.cxx,v 2.3 2008/02/26 20:01:57 ullrich Exp $
4  *
5  * Author: Xin Dong, Feb 2005
6  ***************************************************************************
7  *
8  * Description: TOF raw hits (from Run 5)
9  *
10  ***************************************************************************
11  *
12  * $Log: StTofRawData.cxx,v $
13  * Revision 2.3 2008/02/26 20:01:57 ullrich
14  * Added new member mTriggerrime and related methods.
15  *
16  * Revision 2.2 2007/11/21 00:28:31 ullrich
17  * Added new data member mTray plus access functions. New overloaded constructor.
18  *
19  * Revision 2.1 2005/04/11 22:35:25 calderon
20  * Tof Classes for Run 5. Modifications and additions from Xin to
21  * take care of new TOF daq and electronics. Added StTofRawData and
22  * modified containers and includes.
23  *
24  *
25  **************************************************************************/
26 
27 #include "StTofRawData.h"
28 
29 static const char rcsid[] = "$Id: StTofRawData.cxx,v 2.3 2008/02/26 20:01:57 ullrich Exp $";
30 
31 ClassImp(StTofRawData)
32 
34 {
35  mLeTeFlag = 0;
36  mTray = 0;
37  mChannel = 0;
38  mTdc = 0;
39  mTriggertime = 0;
40  mQuality = 0;
41  }
42 
43 StTofRawData::StTofRawData(unsigned short iflag,
44  unsigned short channel,
45  unsigned int rawTdc,
46  unsigned short quality)
47 {
48  mLeTeFlag = iflag;
49  mTray = 0;
50  mChannel = channel;
51  mTdc = rawTdc;
52  mTriggertime = 0;
53  mQuality = quality;
54 }
55 
56 StTofRawData::StTofRawData(unsigned short iflag,
57  unsigned short tray,
58  unsigned short channel,
59  unsigned int rawTdc,
60  unsigned short quality)
61 {
62  mLeTeFlag = iflag;
63  mTray = tray;
64  mChannel = channel;
65  mTdc = rawTdc;
66  mTriggertime = 0;
67  mQuality = quality;
68  }
69 
70 StTofRawData::StTofRawData(unsigned short iflag,
71  unsigned short tray,
72  unsigned short channel,
73  unsigned int rawTdc,
74  unsigned int triggertime,
75  unsigned short quality)
76 {
77  mLeTeFlag = iflag;
78  mTray = tray;
79  mChannel = channel;
80  mTdc = rawTdc;
81  mTriggertime = triggertime;
82  mQuality = quality;
83  }
84 
85 StTofRawData::~StTofRawData() { /* noop */ }
86 
87 int StTofRawData::operator==(const StTofRawData& p) const
88 {
89  return (p.mLeTeFlag == mLeTeFlag &&
90  p.mTray == mTray &&
91  p.mChannel == mChannel &&
92  p.mTdc == mTdc &&
93  p.mQuality == mQuality &&
94  p.mTriggertime == mTriggertime);
95 }
96 
97 int StTofRawData::operator!=(const StTofRawData& p) const
98 {
99  return !(*this == p); // use operator==()
100 }