#include <TGenericData.hxx>
Public Member Functions | |
TGenericData (int bklen, int bktype, const char *name, void *pdata) | |
virtual | ~TGenericData () |
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. | |
virtual void | Print () |
Print the bank contents in a structured way. | |
Private Attributes | |
int | fSize |
Size of the bank (in what units?). | |
int | fBankType |
Bank data type (MIDAS TID_xxx). | |
std::string | fBankName |
Bank name. | |
void * | fData |
A generic ABC for storing decoded data banks. Provides methods for accessing unstructured data. INherited classes will provide more user-friendly data access.
Definition at line 11 of file TGenericData.hxx.
TGenericData::TGenericData | ( | int | bklen, | |
int | bktype, | |||
const char * | name, | |||
void * | pdata | |||
) | [inline] |
virtual TGenericData::~TGenericData | ( | ) | [inline, virtual] |
Definition at line 21 of file TGenericData.hxx.
void TGenericData::Dump | ( | ) | [inline] |
Dump the bank contents in an unstructured way.
Definition at line 39 of file TGenericData.hxx.
References GetData32(), GetName(), and GetSize().
Referenced by 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 }
const uint16_t* TGenericData::GetData16 | ( | ) | const [inline] |
Definition at line 24 of file TGenericData.hxx.
References fData.
Referenced by TL2249Data::TL2249Data().
00024 { return reinterpret_cast<const uint16_t*>(fData); }
const uint32_t* TGenericData::GetData32 | ( | ) | const [inline] |
Definition at line 27 of file TGenericData.hxx.
References fData.
Referenced by Dump(), TV1720RawData::HandlUncompressedData(), TV1720RawData::HandlZLECompressedData(), TDT724RawData::TDT724RawData(), TMesytecData::TMesytecData(), TV1190Data::TV1190Data(), TV1720RawData::TV1720RawData(), TV1730DppData::TV1730DppData(), TV1730RawData::TV1730RawData(), and TV792Data::TV792Data().
00027 { return reinterpret_cast<const uint32_t*>(fData); }
const uint64_t* TGenericData::GetData64 | ( | ) | const [inline] |
Definition at line 30 of file TGenericData.hxx.
References fData.
Referenced by TAgilentHistograms::UpdateHistograms().
00030 { return reinterpret_cast<const uint64_t*>(fData); }
std::string TGenericData::GetName | ( | ) | const [inline] |
Definition at line 36 of file TGenericData.hxx.
References fBankName.
Referenced by Dump(), TV792Data::Print(), TV1730RawData::Print(), TV1730DppData::Print(), TV1720RawData::Print(), TV1190Data::Print(), TMesytecData::Print(), TL2249Data::Print(), and TDT724RawData::Print().
00036 {return fBankName;}
int TGenericData::GetSize | ( | ) | const [inline] |
Definition at line 32 of file TGenericData.hxx.
References fSize.
Referenced by Dump(), TL2249Data::TL2249Data(), TMesytecData::TMesytecData(), TV1190Data::TV1190Data(), and TV792Data::TV792Data().
00032 {return fSize;}
int TGenericData::GetType | ( | ) | const [inline] |
virtual void TGenericData::Print | ( | ) | [inline, virtual] |
Print the bank contents in a structured way.
Reimplemented in TDT724RawData, TL2249Data, TMesytecData, TV1190Data, TV1720RawData, TV1730DppData, TV1730RawData, and TV792Data.
Definition at line 49 of file TGenericData.hxx.
References Dump().
00049 { 00050 Dump(); 00051 }
std::string TGenericData::fBankName [private] |
int TGenericData::fBankType [private] |
Bank data type (MIDAS TID_xxx).
Definition at line 59 of file TGenericData.hxx.
Referenced by GetType().
void* TGenericData::fData [private] |
Pointer to the unstructured data. The data itself is NOT owned by TGenericData.
Definition at line 66 of file TGenericData.hxx.
Referenced by GetData16(), GetData32(), and GetData64().
int TGenericData::fSize [private] |
Size of the bank (in what units?).
Definition at line 56 of file TGenericData.hxx.
Referenced by GetSize().