#include <TDataItem.h>
Collaboration diagram for TDataItem:
A basic templated data item. A TDataItem is a just a wrapper for a class that contains two members i.e. a class with just two Short_ts, or a class with just a Double_t and short, say (c.f. STL pair<>). This could represent an ADC or TDC data-item, but also could be a calibrated data-item in which case we could have an energy value and channel. Putting these two basic items in a class gives more functionality and greater safety by utilising the const keyword. This is probably the most important class written for the Dragon DAQ as everything else hinges upon it.
Definition at line 38 of file TDataItem.h.
Public Member Functions | |
TDataItem () | |
TDataItem (UShort_t, T) | |
virtual | ~TDataItem () |
void | SetItem (UShort_t, T) |
void | SetChannel (UShort_t) |
void | SetValue (T) |
UShort_t | GetChannel () const |
T | GetValue () const |
void | Print (const Char_t *="") const |
Private Attributes | |
UShort_t | fChannel |
T | fValue |
|
Default constructor, with fChannel and fValue both initialised to 0. Definition at line 68 of file TDataItem.h. |
|
Overloaded constructor, with fChannel and fValue initialised to chan and val respectively. Definition at line 77 of file TDataItem.h. |
|
Default deconstructor. Definition at line 86 of file TDataItem.h. |
|
Set both the channel (fChannel) and value (fValue) of the item to chan and val respectively. Definition at line 93 of file TDataItem.h. |
|
Set the channel of the hardware data item. This number is always positive (hence the unsigned part) and usually less than 65000 (hence the short part; unless we're dealing with a monster module that is). Definition at line 103 of file TDataItem.h. References fChannel. |
|
Set the value of the hardware data item. This should span the expected range of the ADCs and TDCs, but is templated so that we can write things such as "energy" (which is a Double_t) to disk too. Definition at line 114 of file TDataItem.h. References fValue. |
|
Get the channel of the data item (fChannel).
Definition at line 125 of file TDataItem.h. |
|
Get the value of the data item (fValue).
Definition at line 134 of file TDataItem.h. |
|
Print the data held in this class.
Definition at line 143 of file TDataItem.h. |
|
This is the hardware channel; assumed to be a short. Definition at line 53 of file TDataItem.h. |
|
This is the hardware value; typedef'd to type T. Definition at line 56 of file TDataItem.h. |