StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBTofRawHit.cxx
1 /***************************************************************************
2  *
3  * $Id: StBTofRawHit.cxx,v 2.2 2009/01/15 00:48:10 ullrich Exp $
4  *
5  * Author: Xin Dong, Nov 2008
6  ***************************************************************************
7  *
8  * Description: TOF raw hits from daq
9  *
10  ***************************************************************************
11  *
12  * $Log: StBTofRawHit.cxx,v $
13  * Revision 2.2 2009/01/15 00:48:10 ullrich
14  * mLeTeFlag changed to mFlag, tray(), module(), cell() now return int.
15  *
16  * Revision 2.1 2008/12/22 20:31:00 ullrich
17  * Initial Revision.
18  *
19  *
20  **************************************************************************/
21 
22 #include "StBTofRawHit.h"
23 
24 static const char rcsid[] = "$Id: StBTofRawHit.cxx,v 2.2 2009/01/15 00:48:10 ullrich Exp $";
25 
26 ClassImp(StBTofRawHit)
27 
29 {
30  mFlag = 0;
31  mTray = 0;
32  mChannel = 0;
33  mTdc = 0;
34  }
35 
36 StBTofRawHit::StBTofRawHit(char iflag, unsigned char tray,
37  unsigned char channel, unsigned int rawTdc)
38 {
39  mFlag = iflag;
40  mTray = tray;
41  mChannel = channel;
42  mTdc = rawTdc;
43 }
44 
45 StBTofRawHit::~StBTofRawHit() { /* noop */ }
46 
47 int StBTofRawHit::operator==(const StBTofRawHit& p) const
48 {
49  return (p.mFlag == mFlag &&
50  p.mTray == mTray &&
51  p.mChannel == mChannel &&
52  p.mTdc == mTdc );
53 }
54 
55 int StBTofRawHit::operator!=(const StBTofRawHit& p) const
56 {
57  return !(*this == p); // use operator==()
58 }
59 
60 ostream&
61 operator<<(ostream &os, const StBTofRawHit& hit)
62 {
63  os << " Flag " << hit.flag() << endl
64  << " Tray " << hit.tray() << endl
65  << " Channel " << hit.channel() << endl
66  << " Tdc " << hit.tdc() << endl ;
67  return os;
68 }