#include <TCalibration.h>
This class contains a basic map, gain and offset without specifying what they are for. So, you could have a class with instances for ADCS and TDCS to create a complete calibration.
Definition at line 16 of file TCalibration.h.
Public Member Functions | |
TCalibration (UShort_t=1) | |
TCalibration (const TCalibration &) | |
~TCalibration () | |
TCalibration & | operator= (const TCalibration &) |
void | Clear (const Char_t *="") |
void | Print (const Char_t *="") const |
void | SetChannels (UInt_t) |
void | SetBitMask () |
void | AddToChannel (UInt_t, UShort_t) |
void | AddToMap (UInt_t, UShort_t) |
void | AddToOffset (UInt_t, Short_t) |
void | AddToGain (UInt_t, Float_t) |
void | AddToHistogramMap (UInt_t, UShort_t) |
void | Calibrate (const vector< const TDataItem< UShort_t > * > &, vector< const TDataItem< Float_t > * > &) const |
UShort_t | GetChannels () const |
UShort_t | GetHistogramMap (UInt_t) const |
Bool_t | TestChannel (UInt_t) const |
Bool_t | IsSet () const |
Private Attributes | |
UShort_t | fChannels |
Bool_t | fCalSet |
vector< UShort_t > | fChannel |
vector< UShort_t > | fMap |
vector< Short_t > | fOffset |
vector< Float_t > | fGain |
vector< UShort_t > | fMapH |
size_t | fBits |
UInt_t | fMaskMax |
UInt_t * | fBitMask |
|
Default constructor, setting the calibration test switch to false (indicating no data is being held). The number of channels in the calibration is also set (defaults to 1), the gain vector elements initialized to 1, the offset elements to 0 and the map and histogram-map to index = channel.
Definition at line 24 of file TCalibration.cxx. References SetChannels(). |
Here is the call graph for this function:
|
Copy constructor. Need this because we have a pointer in the member list.
Definition at line 39 of file TCalibration.cxx. References fBitMask, fBits, fCalSet, fChannel, fChannels, fGain, fMap, fMapH, fMaskMax, and fOffset. |
|
Default destructor. Deletes the bit-mask used for testing whether a channel associated with the calibration exists in the data. Definition at line 59 of file TCalibration.cxx. |
|
Assignment operator overload. This is needed as some of the DragonRoot classes deal with pointers.
Definition at line 68 of file TCalibration.cxx. References Clear(), fBitMask, fBits, fCalSet, fChannel, fChannels, fGain, fMap, fMapH, fMaskMax, and fOffset. |
Here is the call graph for this function:
|
Clears the map, gain, offset and histogram-map arrays and also sets the calibration test switch to false, indicating no data is set in the calibration.
Definition at line 93 of file TCalibration.cxx. References fBitMask, fCalSet, fGain, fMap, fMapH, and fOffset. |
|
Print the data held in the vector members fMap, fGain, fOffset, fMapH and fBitMask. If no data is present or the calibration test switch is false then a "No calibration set" message is printed.
Definition at line 114 of file TCalibration.cxx. |
|
Sets the size of all the vectors and initializes them to sensible values.
Definition at line 152 of file TCalibration.cxx. References fCalSet, fChannel, fChannels, fGain, fMap, fMapH, fOffset, and SetBitMask(). |
Here is the call graph for this function:
|
Sets the bit-mask. Each bit in the fBitMask array of integers represents a channel, with 1 indicating the channel is attached to the particular calibration (and hence detector) or zero otherwise. For example, if the calibration is printed and a bit-mask of 00001001 is shown, this indicates that if channels 4 and 7 appear in the data then they belong to the detector that owns this calibration. Definition at line 177 of file TCalibration.cxx. References fBitMask, fBits, fCalSet, fChannels, fMap, and fMaskMax. |
|
Set the calibration channels, adding one element at a time to the fChannel vector. This vector enables the location of a detector channel to be mapped given a particular channel in the data.
Definition at line 202 of file TCalibration.cxx. References fChannel. |
|
Set the calibration map, adding one element at a time to the fMap vector. This vector enables the location of a data channel to be mapped given a particular channel in the detector.
Definition at line 216 of file TCalibration.cxx. References fMap. |
|
Set the calibration offset, adding one element at a time to the fOffset vector.
Definition at line 227 of file TCalibration.cxx. References fOffset. |
|
Set the calibration gain, adding one element at a time to the fGain vector.
Definition at line 237 of file TCalibration.cxx. References fGain. |
|
Set the histogram map, adding one element at a time to the fMapH vector.
Definition at line 247 of file TCalibration.cxx. References fMapH. |
|
For the vector of data held in a detector, it can be calibrated by passing it to this method, along with another vector which can accept the calibrated data.
Definition at line 258 of file TCalibration.cxx. |
|
Get the number of channels associated with the calibration.
Definition at line 75 of file TCalibration.h. |
|
Get the histogram-map for detector-channel chan from vector fMapH. Use this to plot a detector channel 0..n in another channel. This is useful if you have more than one type of the same detector.
Definition at line 83 of file TCalibration.h. References fMapH. |
|
Test to see if data-channel dataChannel is present in the calibration i.e. is associated with a particular detector.
Definition at line 96 of file TCalibration.h. |
|
Test to check whether a calibration has been set and data written into fMap, fGain and fOffset.
Definition at line 108 of file TCalibration.h. |
|
The number of channels to set in the calibration. This defaults to 1. Definition at line 42 of file TCalibration.h. |
|
Switch set to true (1) when data is held in fMap, gain and offset. Otherwise false (0). Definition at line 46 of file TCalibration.h. |
|
Vector holding the calibration map values. Definition at line 49 of file TCalibration.h. |
|
Vector holding the calibration map values. Definition at line 52 of file TCalibration.h. |
|
Vector holding the calibration map values. Definition at line 55 of file TCalibration.h. |
|
Vector holding the calibration map values. Definition at line 58 of file TCalibration.h. |
|
Histogram map for the channels of each detector. Definition at line 61 of file TCalibration.h. |
|
The number of bits in the architecture short integer. This is used to find the correct number of elements to dynamically add to the bit-mask array. Definition at line 66 of file TCalibration.h. |
|
The maximum number of elements to the bit-mask array. Definition at line 69 of file TCalibration.h. |
|
Array holding the channel bit-mask. Definition at line 72 of file TCalibration.h. |