#include <ChannelHit.hh>
Collaboration diagram for ChannelHit:
Public Member Functions | |
ChannelHit (const Channel &) | |
ChannelHit (const Channel &, const i16 aDigitalValue, const i16 aAnalogValue) | |
virtual | ~ChannelHit () |
i16 | getDigitalValue (void) const |
i16 | getAnalogValue (void) const |
bool | setDigitalValue (i16 aValue) |
bool | setAnalogValue (i16 aValue) |
const Channel & | getChannel (void) const |
const ui64 | getTimestamp (void) const |
const ui32 | getBcIdAbs (void) const |
const ui32 | getBcIdDif (void) const |
const ui32 | getBcIdHit (void) const |
const ui32 | getBcIdHitFine (void) const |
void | setHardrocTime (const ui64 ts, const ui32 aBcIdAbs, const ui32 aBcIdDif, const ui32 aBcIdHit, const ui32 aBcIdHitFine) |
void | setTimestamp (const ui64 ts) |
void | setMemoryOrder (const ui16 order) |
ui16 | getMemoryOrder (void) const |
ui32 | getAbsTime (void) const |
void | print (void) const |
Private Attributes | |
i16 | analogValue |
i16 | digitalValue |
const Channel & | channel |
ui64 | timestamp |
ui32 | bcIdAbs |
ui32 | bcIdDif |
ui32 | bcIdHit |
ui32 | bcIdHitFine |
ui16 | memoryOrder |
Definition at line 21 of file ChannelHit.hh.
ChannelHit::ChannelHit | ( | const Channel & | ) |
Definition at line 14 of file ChannelHit.cpp.
00014 :channel(aChannel) 00015 { 00016 timestamp = 0; 00017 bcIdAbs = bcIdDif = bcIdHit = bcIdHitFine = memoryOrder = 0; 00018 // FILE_LOG(logDEBUG) << "-----ChannelHit constructor"<< endl; 00019 }
ChannelHit::ChannelHit | ( | const Channel & | , | |
const i16 | aDigitalValue, | |||
const i16 | aAnalogValue | |||
) |
Definition at line 22 of file ChannelHit.cpp.
00022 : channel(aChannel), digitalValue(aDigitalValue), analogValue(aAnalogValue) 00023 { 00024 timestamp = 0; 00025 bcIdAbs = bcIdDif = bcIdHit = bcIdHitFine = 0; 00026 //threshold_0 = 0; 00027 //threshold_1 = 0; 00028 // threshold_2 = 0; 00029 //FILE_LOG(logDEBUG) << "-----ChannelHit constructor"<< endl; 00030 }
ChannelHit::~ChannelHit | ( | ) | [virtual] |
i16 ChannelHit::getDigitalValue | ( | void | ) | const [inline] |
Definition at line 30 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel().
00030 { return digitalValue; }
i16 ChannelHit::getAnalogValue | ( | void | ) | const [inline] |
Definition at line 31 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel(), and sorter::operator()().
00031 { return analogValue; }
bool ChannelHit::setDigitalValue | ( | i16 | aValue | ) | [inline] |
bool ChannelHit::setAnalogValue | ( | i16 | aValue | ) | [inline] |
const Channel& ChannelHit::getChannel | ( | void | ) | const [inline] |
Definition at line 34 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel().
00034 { return channel; }
const ui64 ChannelHit::getTimestamp | ( | void | ) | const [inline] |
Definition at line 35 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel().
00035 { return(timestamp); };
const ui32 ChannelHit::getBcIdAbs | ( | void | ) | const [inline] |
Definition at line 36 of file ChannelHit.hh.
Referenced by getAbsTime(), and MTChannel::MTChannel().
00036 { return(bcIdAbs); };
const ui32 ChannelHit::getBcIdDif | ( | void | ) | const [inline] |
Definition at line 37 of file ChannelHit.hh.
Referenced by getAbsTime(), and MTChannel::MTChannel().
00037 { return(bcIdDif); };
const ui32 ChannelHit::getBcIdHit | ( | void | ) | const [inline] |
Definition at line 38 of file ChannelHit.hh.
Referenced by getAbsTime(), and MTChannel::MTChannel().
00038 { return(bcIdHit); };
const ui32 ChannelHit::getBcIdHitFine | ( | void | ) | const [inline] |
Definition at line 39 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel().
00039 { return(bcIdHitFine); };
void ChannelHit::setHardrocTime | ( | const ui64 | ts, | |
const ui32 | aBcIdAbs, | |||
const ui32 | aBcIdDif, | |||
const ui32 | aBcIdHit, | |||
const ui32 | aBcIdHitFine | |||
) | [inline] |
Definition at line 40 of file ChannelHit.hh.
Referenced by MicrorocReader::newHit(), Hardroc2Reader::newHit(), Hardroc1Reader::newHit(), and DiracReader::newHit().
00041 { timestamp = ts, bcIdAbs = aBcIdAbs, bcIdDif = aBcIdDif, bcIdHit = aBcIdHit; bcIdHitFine= aBcIdHitFine; };
void ChannelHit::setTimestamp | ( | const ui64 | ts | ) | [inline] |
void ChannelHit::setMemoryOrder | ( | const ui16 | order | ) | [inline] |
Definition at line 43 of file ChannelHit.hh.
Referenced by MicrorocReader::newHit().
00043 { memoryOrder = order; };
ui16 ChannelHit::getMemoryOrder | ( | void | ) | const [inline] |
Definition at line 44 of file ChannelHit.hh.
Referenced by MTChannel::MTChannel().
00044 { return memoryOrder ;} ;
ui32 ChannelHit::getAbsTime | ( | void | ) | const |
Definition at line 47 of file ChannelHit.cpp.
00048 { 00049 i32 deltaT = this->getBcIdDif() - this->getBcIdHit(); 00050 ui32 time = 0; 00051 if ( deltaT > 0 ) 00052 { 00053 // temps absolu = BCID_Abs + ( BCID_Dif - BCID_Hit ) 00054 time = this->getBcIdAbs() + deltaT; 00055 } 00056 else 00057 { 00058 // temps absolu = BCID_Abs + ( BCID_Dif + 2e24-1 - BCID_Hit ) 00059 time = this->getBcIdAbs() + ( this->getBcIdDif() + 16777215 - this->getBcIdHit() ); 00060 } 00061 00062 return time; 00063 00064 }
void ChannelHit::print | ( | void | ) | const |
Definition at line 38 of file ChannelHit.cpp.
00039 { 00040 //FILE_LOG(logDEBUG) << "---ChannelHit.print():" << endl; 00041 channel.print(); 00042 FILE_LOG(logINFO) << "Digital value: " << digitalValue << endl; 00043 FILE_LOG(logINFO) << "Analog value: " << analogValue << endl; 00044 }
i16 ChannelHit::analogValue [private] |
Definition at line 55 of file ChannelHit.hh.
Referenced by getAnalogValue(), print(), and setAnalogValue().
i16 ChannelHit::digitalValue [private] |
Definition at line 56 of file ChannelHit.hh.
Referenced by getDigitalValue(), print(), and setDigitalValue().
const Channel& ChannelHit::channel [private] |
ui64 ChannelHit::timestamp [private] |
Definition at line 59 of file ChannelHit.hh.
Referenced by ChannelHit(), getTimestamp(), setHardrocTime(), and setTimestamp().
ui32 ChannelHit::bcIdAbs [private] |
Definition at line 60 of file ChannelHit.hh.
Referenced by ChannelHit(), getBcIdAbs(), and setHardrocTime().
ui32 ChannelHit::bcIdDif [private] |
Definition at line 61 of file ChannelHit.hh.
Referenced by ChannelHit(), getBcIdDif(), and setHardrocTime().
ui32 ChannelHit::bcIdHit [private] |
Definition at line 62 of file ChannelHit.hh.
Referenced by ChannelHit(), getBcIdHit(), and setHardrocTime().
ui32 ChannelHit::bcIdHitFine [private] |
Definition at line 63 of file ChannelHit.hh.
Referenced by ChannelHit(), getBcIdHitFine(), and setHardrocTime().
ui16 ChannelHit::memoryOrder [private] |
Definition at line 64 of file ChannelHit.hh.
Referenced by ChannelHit(), getMemoryOrder(), and setMemoryOrder().