StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMtdRawHit.cxx
1 /***************************************************************************
2  *
3  * $Id: StMtdRawHit.cxx,v 2.1 2011/04/25 21:24:02 ullrich Exp $
4  *
5  * Author: Frank Geurts, April 25, 2011
6  ***************************************************************************
7  *
8  * Description: TOF raw hits from daq
9  *
10  ***************************************************************************
11  *
12  * $Log: StMtdRawHit.cxx,v $
13  * Revision 2.1 2011/04/25 21:24:02 ullrich
14  * Initial Revision.
15  *
16  **************************************************************************/
17 
18 #include "StMtdRawHit.h"
19 
20 static const char rcsid[] = "$Id: StMtdRawHit.cxx,v 2.1 2011/04/25 21:24:02 ullrich Exp $";
21 
22 ClassImp(StMtdRawHit)
23 
25  mFlag = 0;
26  mBackLeg = 0;
27  mChannel = 0;
28  mTdc = 0;
29 }
30 
31 StMtdRawHit::StMtdRawHit(char iflag, unsigned char backleg,
32  unsigned char channel, unsigned int rawTdc) {
33  mFlag = iflag;
34  mBackLeg = backleg;
35  mChannel = channel;
36  mTdc = rawTdc;
37 }
38 
39 StMtdRawHit::~StMtdRawHit() { /* noop */ }
40 
41 int StMtdRawHit::operator==(const StMtdRawHit& p) const {
42  return (p.mFlag == mFlag &&
43  p.mBackLeg == mBackLeg &&
44  p.mChannel == mChannel &&
45  p.mTdc == mTdc );
46 }
47 
48 int StMtdRawHit::operator!=(const StMtdRawHit& p) const {
49  return !(*this == p); // use operator==()
50 }
51 
52 ostream& operator<<(ostream &os, const StMtdRawHit& hit) {
53  os << " Flag " << hit.flag() << endl
54  << " BackLeg " << hit.backleg() << endl
55  << " Channel " << hit.channel() << endl
56  << " Tdc " << hit.tdc() << endl ;
57  return os;
58 }