00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include "StTofData.h"
00027
00028 static const char rcsid[] = "$Id: StTofData.cxx,v 2.3 2005/04/11 22:35:25 calderon Exp $";
00029
00030 ClassImp(StTofData)
00031
00032 StTofData::StTofData()
00033 : mDataIndex(0), mAdc(0), mTdc(0), mTc(0), mSc(0), mLeadingTdc(0), mTrailingTdc(0)
00034 { }
00035
00036 StTofData::StTofData(unsigned short dataId, unsigned short rawAdc,
00037 unsigned short rawTdc, short rawTc, unsigned short rawSc,
00038 unsigned int rawLTdc, unsigned int rawTTdc)
00039 : mDataIndex(dataId), mAdc(rawAdc), mTdc(rawTdc), mTc(rawTc), mSc(rawSc),
00040 mLeadingTdc(rawLTdc), mTrailingTdc(rawTTdc)
00041 { }
00042
00043 StTofData::~StTofData() { }
00044
00045 int StTofData::operator==(const StTofData& p) const
00046 {
00047 return (p.mDataIndex == mDataIndex &&
00048 p.mAdc == mAdc && p.mTdc == mTdc &&
00049 p.mTc == mTc && p.mSc == mSc &&
00050 p.mLeadingTdc == mLeadingTdc && p.mTrailingTdc == mTrailingTdc);
00051 }
00052
00053 int StTofData::operator!=(const StTofData& p) const
00054 {
00055 return !(*this == p);
00056 }
00057
00058 ostream& operator<<(ostream& os, const StTofData& d)
00059 {
00060 return (os << "StTofData::> "<< " ID=" << d.dataIndex()
00061 << ", adc=" << d.adc()
00062 << ", tdc=" << d.tdc()
00063 << ", tc=" << d.tc()
00064 << ", sc=" << d.sc());
00065
00066
00067 }
00068