ChannelHit Class Reference

#include <ChannelHit.hh>

Collaboration diagram for ChannelHit:

Collaboration graph
[legend]
List of all members.

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 ChannelgetChannel (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 Channelchannel
ui64 timestamp
ui32 bcIdAbs
ui32 bcIdDif
ui32 bcIdHit
ui32 bcIdHitFine
ui16 memoryOrder

Detailed Description

CLASS ChannelHit //

Definition at line 21 of file ChannelHit.hh.


Constructor & Destructor Documentation

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]

Definition at line 33 of file ChannelHit.cpp.

00034 {
00035   //FILE_LOG(logDEBUG) << "------ChannelHit destructeur:" <<  endl;
00036 }


Member Function Documentation

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]

Definition at line 32 of file ChannelHit.hh.

00032 { digitalValue = aValue; return true; }

bool ChannelHit::setAnalogValue ( i16  aValue  )  [inline]

Definition at line 33 of file ChannelHit.hh.

00033 { analogValue = aValue; return true; }

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]

Definition at line 42 of file ChannelHit.hh.

00042 { timestamp = ts; };

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 }


Member Data Documentation

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]

Definition at line 57 of file ChannelHit.hh.

Referenced by getChannel(), and print().

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().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:06 2013 for MicromegasFramework by  doxygen 1.4.7