#include <TV1190Data.hxx>
Public Member Functions | |
bool | IsLeading () const |
Is this the leading edge measurement? | |
bool | IsTrailing () const |
Is this the trailing edge measurement? | |
uint32_t | GetMeasurement () const |
Get the TDC measurement. | |
uint32_t | GetTDCNumber () const |
Get the TDC number. | |
uint32_t | GetChannel () const |
Get the channel number. | |
uint32_t | GetEventID () const |
Get Event ID; this is event number defined by V1190 module. | |
uint32_t | GetBunchID () const |
Get Bunch ID. | |
uint32_t | GetEventIndex () const |
Get Event Index; this is which event number within the bank. | |
bool | HasTDCHeader () const |
Check if measurement has a TDC header. | |
bool | HasTDCTrailer () const |
Check if measurement has a TDC trailer. | |
bool | HasTDCErrorWord () const |
Check if measurement has a TDC error word. | |
uint32_t | GetErrors () const |
Get Errors. | |
Private Member Functions | |
TDCMeasurement (uint32_t header, uint32_t measurement, int index) | |
Constructor; need to pass in header and measurement. | |
void | SetTrailer (uint32_t trailer) |
Set the trailer word. | |
void | SetErrors (uint32_t error) |
Set the error word. | |
TDCMeasurement () | |
Private Attributes | |
uint32_t | tdc_header_word |
Found fields to hold the header, measurement, trailer and error words. | |
uint32_t | tdc_measurement_word |
uint32_t | tdc_trailer_word |
uint32_t | tdc_error_error |
int | event_index |
Friends | |
class | TV1190Data |
Class for each TDC measurement For the definition of obscure variables see the CAEN V1190 manual.
Definition at line 10 of file TV1190Data.hxx.
TDCMeasurement::TDCMeasurement | ( | uint32_t | header, | |
uint32_t | measurement, | |||
int | index | |||
) | [inline, private] |
Constructor; need to pass in header and measurement.
Definition at line 57 of file TV1190Data.hxx.
00057 : 00058 tdc_header_word(header), 00059 tdc_measurement_word(measurement), 00060 tdc_trailer_word(0),tdc_error_error(0),event_index(index){};
TDCMeasurement::TDCMeasurement | ( | ) | [private] |
uint32_t TDCMeasurement::GetBunchID | ( | ) | const |
Get Bunch ID.
Definition at line 30 of file TV1190Data.cxx.
References HasTDCHeader(), and tdc_header_word.
00030 { 00031 if(HasTDCHeader()) 00032 return ((tdc_header_word & 0xfff)); 00033 return 0xdeadbeef; 00034 }
uint32_t TDCMeasurement::GetChannel | ( | ) | const [inline] |
Get the channel number.
Definition at line 26 of file TV1190Data.hxx.
References tdc_measurement_word.
Referenced by MyTestLoop::ProcessMidasEvent().
00026 {return ((tdc_measurement_word & 0x3f80000) >> 19 );}
uint32_t TDCMeasurement::GetErrors | ( | ) | const |
Get Errors.
Definition at line 37 of file TV1190Data.cxx.
References HasTDCErrorWord(), and tdc_error_error.
00037 { 00038 if(HasTDCErrorWord()) 00039 return ((tdc_error_error & 0x7fff)); 00040 return 0xdeadbeef; 00041 00042 00043 }
uint32_t TDCMeasurement::GetEventID | ( | ) | const |
Get Event ID; this is event number defined by V1190 module.
Get Event ID.
Definition at line 21 of file TV1190Data.cxx.
References HasTDCHeader(), HasTDCTrailer(), tdc_header_word, and tdc_trailer_word.
00021 { 00022 if(HasTDCHeader()) 00023 return ((tdc_header_word & 0xfff000) >> 12 ); 00024 if(HasTDCTrailer()) 00025 return ((tdc_trailer_word & 0xfff000) >> 12 ); 00026 return 0xdeadbeef; 00027 }
uint32_t TDCMeasurement::GetEventIndex | ( | ) | const [inline] |
Get Event Index; this is which event number within the bank.
Definition at line 35 of file TV1190Data.hxx.
References event_index.
00035 {return event_index;};
uint32_t TDCMeasurement::GetMeasurement | ( | ) | const [inline] |
Get the TDC measurement.
Definition at line 21 of file TV1190Data.hxx.
References tdc_measurement_word.
Referenced by MyTestLoop::ProcessMidasEvent(), and TSimpleExampleCanvas::UpdateCanvasHistograms().
00021 {return (tdc_measurement_word & 0x7ffff);}
uint32_t TDCMeasurement::GetTDCNumber | ( | ) | const |
Get the TDC number.
Definition at line 12 of file TV1190Data.cxx.
References HasTDCHeader(), HasTDCTrailer(), tdc_header_word, and tdc_trailer_word.
Referenced by MyTestLoop::ProcessMidasEvent().
00012 { 00013 if(HasTDCHeader()) 00014 return ((tdc_header_word & 0x3000000) >> 24 ); 00015 if(HasTDCTrailer()) 00016 return ((tdc_trailer_word & 0x3000000) >> 24 ); 00017 return 0xdeadbeef; 00018 }
bool TDCMeasurement::HasTDCErrorWord | ( | ) | const [inline] |
Check if measurement has a TDC error word.
Definition at line 42 of file TV1190Data.hxx.
References tdc_error_error.
Referenced by GetErrors().
00042 {return (tdc_error_error != 0);}
bool TDCMeasurement::HasTDCHeader | ( | ) | const [inline] |
Check if measurement has a TDC header.
Definition at line 38 of file TV1190Data.hxx.
References tdc_header_word.
Referenced by GetBunchID(), GetEventID(), and GetTDCNumber().
00038 {return (tdc_header_word != 0);}
bool TDCMeasurement::HasTDCTrailer | ( | ) | const [inline] |
Check if measurement has a TDC trailer.
Definition at line 40 of file TV1190Data.hxx.
References tdc_trailer_word.
Referenced by GetEventID(), and GetTDCNumber().
00040 {return (tdc_trailer_word != 0);}
bool TDCMeasurement::IsLeading | ( | ) | const [inline] |
Is this the leading edge measurement?
Definition at line 17 of file TV1190Data.hxx.
References tdc_measurement_word.
00017 {return ((tdc_measurement_word & 0x4000000) == 0x0000000);}
bool TDCMeasurement::IsTrailing | ( | ) | const [inline] |
Is this the trailing edge measurement?
Definition at line 19 of file TV1190Data.hxx.
References tdc_measurement_word.
00019 {return ((tdc_measurement_word & 0x4000000) == 0x4000000);}
void TDCMeasurement::SetErrors | ( | uint32_t | error | ) | [inline, private] |
Set the error word.
Definition at line 66 of file TV1190Data.hxx.
References tdc_error_error.
00066 {tdc_error_error = error;}
void TDCMeasurement::SetTrailer | ( | uint32_t | trailer | ) | [private] |
Set the trailer word.
Definition at line 6 of file TV1190Data.cxx.
References tdc_trailer_word.
00006 { 00007 tdc_trailer_word = trailer; 00008 }
friend class TV1190Data [friend] |
Definition at line 12 of file TV1190Data.hxx.
int TDCMeasurement::event_index [private] |
Definition at line 54 of file TV1190Data.hxx.
Referenced by GetEventIndex().
uint32_t TDCMeasurement::tdc_error_error [private] |
Definition at line 53 of file TV1190Data.hxx.
Referenced by GetErrors(), HasTDCErrorWord(), and SetErrors().
uint32_t TDCMeasurement::tdc_header_word [private] |
Found fields to hold the header, measurement, trailer and error words.
Definition at line 50 of file TV1190Data.hxx.
Referenced by GetBunchID(), GetEventID(), GetTDCNumber(), and HasTDCHeader().
uint32_t TDCMeasurement::tdc_measurement_word [private] |
Definition at line 51 of file TV1190Data.hxx.
Referenced by GetChannel(), GetMeasurement(), IsLeading(), and IsTrailing().
uint32_t TDCMeasurement::tdc_trailer_word [private] |
Definition at line 52 of file TV1190Data.hxx.
Referenced by GetEventID(), GetTDCNumber(), HasTDCTrailer(), and SetTrailer().