Class for storing data from CAEN V792 module. More...
#include <TV792Data.hxx>
Public Member Functions | |
TV792Data (int bklen, int bktype, const char *name, void *pdata) | |
Constructor. | |
void | Print () |
Print the bank contents in a structured way. | |
uint32_t | GetGeoAddress () const |
Get GEO address. | |
uint32_t | GetCrate () const |
Get the crate number. | |
uint32_t | GetNumberChannels () const |
Get the number of converted channels. | |
uint32_t | GetEventCounter () const |
Get the event counter. | |
std::vector< VADCMeasurement > & | GetMeasurements () |
Get the Vector of TDC Measurements. | |
const uint16_t * | GetData16 () const |
const uint32_t * | GetData32 () const |
const uint64_t * | GetData64 () const |
int | GetSize () const |
int | GetType () const |
std::string | GetName () const |
void | Dump () |
Dump the bank contents in an unstructured way. | |
Private Attributes | |
std::vector< VADCMeasurement > | fMeasurements |
Vector of TDC Measurements. | |
uint32_t | fAdc_header_word |
Fields to hold the header, measurement, trailer and error words. | |
uint32_t | fAdc_trailer_word |
Class for storing data from CAEN V792 module.
Definition at line 53 of file TV792Data.hxx.
TV792Data::TV792Data | ( | int | bklen, | |
int | bktype, | |||
const char * | name, | |||
void * | pdata | |||
) |
Constructor.
Definition at line 5 of file TV792Data.cxx.
References fAdc_header_word, fAdc_trailer_word, fMeasurements, TGenericData::GetData32(), and TGenericData::GetSize().
00005 : 00006 TGenericData(bklen, bktype, name, pdata) 00007 { 00008 00009 fAdc_header_word = 0; 00010 fAdc_trailer_word = 0; 00011 00012 for(int i = 0; i < GetSize(); i++){ 00013 00014 uint32_t word = GetData32()[i]; 00015 if((word & 0x07000000) == 0x02000000){ // header 00016 fAdc_header_word = word; 00017 } 00018 00019 00020 if((word & 0x07000000) == 0x00000000) // measurement 00021 fMeasurements.push_back(VADCMeasurement(fAdc_header_word,word)); 00022 00023 if((word & 0x07000000) == 0x04000000) // trailer 00024 fAdc_trailer_word = word; 00025 00026 00027 } 00028 00029 }
void TGenericData::Dump | ( | ) | [inline, inherited] |
Dump the bank contents in an unstructured way.
Definition at line 39 of file TGenericData.hxx.
References TGenericData::GetData32(), TGenericData::GetName(), and TGenericData::GetSize().
Referenced by TGenericData::Print().
00039 { 00040 00041 std::cout << "Generic decoder for bank named " << GetName().c_str() << std::endl; 00042 for(int i = 0; i < GetSize(); i++){ 00043 std::cout << std::hex << "0x" << GetData32()[i] << std::dec << std::endl; 00044 } 00045 00046 }
uint32_t TV792Data::GetCrate | ( | ) | const [inline] |
Get the crate number.
Definition at line 68 of file TV792Data.hxx.
References fAdc_header_word.
Referenced by Print().
00068 {return ((fAdc_header_word & 0xff0000) >> 16);}
const uint16_t* TGenericData::GetData16 | ( | ) | const [inline, inherited] |
Definition at line 24 of file TGenericData.hxx.
References TGenericData::fData.
Referenced by TL2249Data::TL2249Data().
00024 { return reinterpret_cast<const uint16_t*>(fData); }
const uint32_t* TGenericData::GetData32 | ( | ) | const [inline, inherited] |
Definition at line 27 of file TGenericData.hxx.
References TGenericData::fData.
Referenced by TGenericData::Dump(), TV1720RawData::HandlUncompressedData(), TV1720RawData::HandlZLECompressedData(), TDT724RawData::TDT724RawData(), TMesytecData::TMesytecData(), TV1190Data::TV1190Data(), TV1720RawData::TV1720RawData(), TV1730DppData::TV1730DppData(), TV1730RawData::TV1730RawData(), and TV792Data().
00027 { return reinterpret_cast<const uint32_t*>(fData); }
const uint64_t* TGenericData::GetData64 | ( | ) | const [inline, inherited] |
Definition at line 30 of file TGenericData.hxx.
References TGenericData::fData.
Referenced by TAgilentHistograms::UpdateHistograms().
00030 { return reinterpret_cast<const uint64_t*>(fData); }
uint32_t TV792Data::GetEventCounter | ( | ) | const [inline] |
Get the event counter.
Definition at line 74 of file TV792Data.hxx.
References fAdc_trailer_word.
Referenced by Print().
00074 {return (fAdc_trailer_word & 0xffffff); };
uint32_t TV792Data::GetGeoAddress | ( | ) | const [inline] |
Get GEO address.
Definition at line 65 of file TV792Data.hxx.
References fAdc_header_word.
Referenced by Print().
00065 {return ((fAdc_header_word & 0xf8000000) >> 27);}
std::vector<VADCMeasurement>& TV792Data::GetMeasurements | ( | ) | [inline] |
Get the Vector of TDC Measurements.
Definition at line 77 of file TV792Data.hxx.
References fMeasurements.
Referenced by Analyzer::ProcessMidasEvent(), TComplicatedExampleCanvas::UpdateCanvasHistograms(), and TV792Histograms::UpdateHistograms().
00077 {return fMeasurements;}
std::string TGenericData::GetName | ( | ) | const [inline, inherited] |
Definition at line 36 of file TGenericData.hxx.
References TGenericData::fBankName.
Referenced by TGenericData::Dump(), Print(), TV1730RawData::Print(), TV1730DppData::Print(), TV1720RawData::Print(), TV1190Data::Print(), TMesytecData::Print(), TL2249Data::Print(), and TDT724RawData::Print().
00036 {return fBankName;}
uint32_t TV792Data::GetNumberChannels | ( | ) | const [inline] |
Get the number of converted channels.
Definition at line 71 of file TV792Data.hxx.
References fAdc_header_word.
Referenced by Print().
00071 {return ((fAdc_header_word & 0x3f00) >> 8); };
int TGenericData::GetSize | ( | ) | const [inline, inherited] |
Definition at line 32 of file TGenericData.hxx.
References TGenericData::fSize.
Referenced by TGenericData::Dump(), TL2249Data::TL2249Data(), TMesytecData::TMesytecData(), TV1190Data::TV1190Data(), and TV792Data().
00032 {return fSize;}
int TGenericData::GetType | ( | ) | const [inline, inherited] |
Definition at line 34 of file TGenericData.hxx.
References TGenericData::fBankType.
00034 {return fBankType;}
void TV792Data::Print | ( | ) | [virtual] |
Print the bank contents in a structured way.
Reimplemented from TGenericData.
Definition at line 31 of file TV792Data.cxx.
References fMeasurements, GetCrate(), GetEventCounter(), GetGeoAddress(), TGenericData::GetName(), and GetNumberChannels().
Referenced by MyTestLoop::ProcessMidasEvent().
00031 { 00032 00033 std::cout << "V792 decoder for bank " << GetName().c_str() << std::endl; 00034 00035 std::cout << "Geo-Add = " << GetGeoAddress() << ", crate number = " << GetCrate() 00036 << ", Number of channels= " << GetNumberChannels() << ", event counter = " 00037 << GetEventCounter() << std::endl; 00038 for(int i = 0; i < fMeasurements.size(); i++){ 00039 std::cout << "chan " << fMeasurements[i].GetChannel() 00040 << " meas = " << fMeasurements[i].GetMeasurement() << " " ; 00041 std::cout << " [UN/OV=" << fMeasurements[i].IsUnderThreshold() << "/" << fMeasurements[i].IsOverFlow() << "], "; 00042 00043 if((i-2)%3 == 0) std::cout << std::endl; 00044 00045 } 00046 std::cout << std::endl; 00047 00048 00049 00050 }
uint32_t TV792Data::fAdc_header_word [private] |
Fields to hold the header, measurement, trailer and error words.
Definition at line 87 of file TV792Data.hxx.
Referenced by GetCrate(), GetGeoAddress(), GetNumberChannels(), and TV792Data().
uint32_t TV792Data::fAdc_trailer_word [private] |
Definition at line 88 of file TV792Data.hxx.
Referenced by GetEventCounter(), and TV792Data().
std::vector<VADCMeasurement> TV792Data::fMeasurements [private] |
Vector of TDC Measurements.
Definition at line 83 of file TV792Data.hxx.
Referenced by GetMeasurements(), Print(), and TV792Data().