PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
#include <XiaListModeDataMask.hpp>
Public Member Functions | |
XiaListModeDataMask () | |
Default constructor. More... | |
XiaListModeDataMask (const DataProcessing::FIRMWARE &firmware, const unsigned int &freq) | |
XiaListModeDataMask (const std::string &firmware, const unsigned int &freq) | |
~XiaListModeDataMask () | |
Default Destructor. More... | |
std::pair< unsigned int, unsigned int > | GetChannelNumberMask () const |
std::pair< unsigned int, unsigned int > | GetSlotIdMask () const |
std::pair< unsigned int, unsigned int > | GetCrateIdMask () const |
std::pair< unsigned int, unsigned int > | GetHeaderLengthMask () const |
std::pair< unsigned int, unsigned int > | GetEventLengthMask () const |
std::pair< unsigned int, unsigned int > | GetFinishCodeMask () const |
std::pair< unsigned int, unsigned int > | GetEventTimeHighMask () const |
std::pair< unsigned int, unsigned int > | GetCfdFractionalTimeMask () const |
std::pair< unsigned int, unsigned int > | GetCfdForcedTriggerBitMask () const |
std::pair< unsigned int, unsigned int > | GetCfdTriggerSourceMask () const |
double | GetCfdSize () const |
std::pair< unsigned int, unsigned int > | GetEventEnergyMask () const |
std::pair< unsigned int, unsigned int > | GetTraceOutOfRangeFlagMask () const |
std::pair< unsigned int, unsigned int > | GetTraceLengthMask () const |
std::pair< unsigned int, unsigned int > | GetTraceMask () const |
DataProcessing::FIRMWARE | GetFirmware () const |
unsigned int | GetFrequency () const |
void | SetFirmware (const DataProcessing::FIRMWARE &firmware) |
void | SetFirmware (const std::string &type) |
void | SetFrequency (const unsigned int &freq) |
DataProcessing::FIRMWARE | ConvertStringToFirmware (const std::string &type) |
Private Member Functions | |
std::string | BadMaskErrorMessage (const std::string &func) const |
Private Attributes | |
DataProcessing::FIRMWARE | firmware_ |
The firmware version that we are using. More... | |
unsigned int | frequency_ |
The frequency of the module that we want to decode. More... | |
A class that provides the necessary data masks and bit shifts to decode the XIA Pixie-16 List Mode Data headers. To decode the data we apply the mask to the 32-bit header words, then shift the result by the specified amount to remove the lease significant bits. We do not include a method for the Event Time Low header word (Word 1) since this value takes the entire 32-bit word. The values of the bit shifts are taken from documentation provided by XIA LLC.
Definition at line 20 of file XiaListModeDataMask.hpp.
|
inline |
Default constructor.
Definition at line 23 of file XiaListModeDataMask.hpp.
|
inline |
Constructor accepting a FIRMWARE enum as an argument
[in] | firmware | : The value we want to set for the firmware |
[in] | freq | : The value in MS/s or MHz that we want to assign to the frequency. |
Definition at line 32 of file XiaListModeDataMask.hpp.
|
inline |
Constructor accepting a string with the firmware type and the frequency
[in] | firmware | : The value we want to set for the firmware |
[in] | freq | : The value in MS/s or MHz that we want to assign to the frequency. |
Definition at line 42 of file XiaListModeDataMask.hpp.
|
inline |
Default Destructor.
Definition at line 49 of file XiaListModeDataMask.hpp.
|
private |
Definition at line 298 of file XiaListModeDataMask.cpp.
FIRMWARE XiaListModeDataMask::ConvertStringToFirmware | ( | const std::string & | type | ) |
Converts a string to a firmware version this is used to set the firmware using SetFirmware(string) method.
[in] | type | : A string of the firmware version that we would like. It can be prepended with the "R" or not. |
Definition at line 14 of file XiaListModeDataMask.cpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdForcedTriggerBitMask | ( | ) | const |
Getter for the Mask and Shift of the Cfd Forced Trigger Bit mask.
Definition at line 136 of file XiaListModeDataMask.cpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdFractionalTimeMask | ( | ) | const |
Getter for the Mask and Shift of the Event Time High.
The CFD Fractional Time always starts on bit 16 of Word 2. The range of this value changes.
Definition at line 54 of file XiaListModeDataMask.cpp.
double XiaListModeDataMask::GetCfdSize | ( | ) | const |
Definition at line 306 of file XiaListModeDataMask.cpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdTriggerSourceMask | ( | ) | const |
Getter for the Mask and Shift of the CFD Trigger Source Bit.
Definition at line 171 of file XiaListModeDataMask.cpp.
|
inline |
Getter for the Mask and Shift of the Channel Number.
Definition at line 53 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the Mask and Shift of the Crate ID.
Definition at line 65 of file XiaListModeDataMask.hpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetEventEnergyMask | ( | ) | const |
Getter for the Mask and Shift of the Energy.
The energy always starts out on Bit 0 of Word 3 so we do not need to define a variable for the bit.
Definition at line 213 of file XiaListModeDataMask.cpp.
std::pair< unsigned int, unsigned int > XiaListModeDataMask::GetEventLengthMask | ( | ) | const |
Getter for the Mask and Shift of the Event Length.
Definition at line 108 of file XiaListModeDataMask.cpp.
|
inline |
Getter for the Mask and Shift of the Event Time High.
Definition at line 87 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the Mask and Shift of the Finish Code.
Definition at line 81 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the value of the FIRMWARE so that we can test that things are working as expected.
Definition at line 130 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the value of the frequency that we're using.
Definition at line 134 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the Mask and Shift of the Header Length.
Definition at line 71 of file XiaListModeDataMask.hpp.
|
inline |
Getter for the Mask and Shift of the Slot Id.
Definition at line 59 of file XiaListModeDataMask.hpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetTraceLengthMask | ( | ) | const |
Getter for the Mask and Shift of the Trace Length.
Definition at line 273 of file XiaListModeDataMask.cpp.
|
inline |
Getter for the Mask and shift for the trace words.
Definition at line 123 of file XiaListModeDataMask.hpp.
pair< unsigned int, unsigned int > XiaListModeDataMask::GetTraceOutOfRangeFlagMask | ( | ) | const |
Getter for the Mask and Shift of the Trace-out-of-range Flag.
Definition at line 241 of file XiaListModeDataMask.cpp.
|
inline |
Sets the firmware version
[in] | firmware | : The firmware type that we would like to set. |
Definition at line 138 of file XiaListModeDataMask.hpp.
|
inline |
Sets the firmware version
[in] | type | : The string that we are going to convert to the more useful FIRMWARE enum. |
Definition at line 145 of file XiaListModeDataMask.hpp.
|
inline |
Sets the frequency of the module that we are working with.
[in] | freq | : The frequency of the module in MS/s or MHz that we are working with. |
Definition at line 152 of file XiaListModeDataMask.hpp.
|
private |
The firmware version that we are using.
Definition at line 163 of file XiaListModeDataMask.hpp.
|
private |
The frequency of the module that we want to decode.
Definition at line 165 of file XiaListModeDataMask.hpp.