PAASS
Software suite to Acquire and Analyze Data from Pixie16
XiaListModeDataMask Class Reference

#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...
 

Detailed Description

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.

Constructor & Destructor Documentation

§ XiaListModeDataMask() [1/3]

XiaListModeDataMask::XiaListModeDataMask ( )
inline

Default constructor.

Definition at line 23 of file XiaListModeDataMask.hpp.

§ XiaListModeDataMask() [2/3]

XiaListModeDataMask::XiaListModeDataMask ( const DataProcessing::FIRMWARE firmware,
const unsigned int &  freq 
)
inline

Constructor accepting a FIRMWARE enum as an argument

Parameters
[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.

§ XiaListModeDataMask() [3/3]

XiaListModeDataMask::XiaListModeDataMask ( const std::string &  firmware,
const unsigned int &  freq 
)
inline

Constructor accepting a string with the firmware type and the frequency

Parameters
[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.

Here is the call graph for this function:

§ ~XiaListModeDataMask()

XiaListModeDataMask::~XiaListModeDataMask ( )
inline

Default Destructor.

Definition at line 49 of file XiaListModeDataMask.hpp.

Member Function Documentation

§ BadMaskErrorMessage()

string XiaListModeDataMask::BadMaskErrorMessage ( const std::string &  func) const
private

Definition at line 298 of file XiaListModeDataMask.cpp.

§ ConvertStringToFirmware()

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.

Parameters
[in]type: A string of the firmware version that we would like. It can be prepended with the "R" or not.
Returns
The firmware ENUM for the firmware type.

Definition at line 14 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetCfdForcedTriggerBitMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdForcedTriggerBitMask ( ) const

Getter for the Mask and Shift of the Cfd Forced Trigger Bit mask.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 136 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetCfdFractionalTimeMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdFractionalTimeMask ( ) const

Getter for the Mask and Shift of the Event Time High.

Returns
The pair of the mask and bit shift to use to decode the data.

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.

Here is the caller graph for this function:

§ GetCfdSize()

double XiaListModeDataMask::GetCfdSize ( ) const
Returns
The decimal size of the CFD, i.e. 13-bit = 8192. It returns a double since we're generally using this size in calculations of the arrival time of the pulse.

Definition at line 306 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetCfdTriggerSourceMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetCfdTriggerSourceMask ( ) const

Getter for the Mask and Shift of the CFD Trigger Source Bit.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 171 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetChannelNumberMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetChannelNumberMask ( ) const
inline

Getter for the Mask and Shift of the Channel Number.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 53 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetCrateIdMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetCrateIdMask ( ) const
inline

Getter for the Mask and Shift of the Crate ID.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 65 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetEventEnergyMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetEventEnergyMask ( ) const

Getter for the Mask and Shift of the Energy.

Returns
The pair of the mask and bit shift to use to decode the data.

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.

Here is the caller graph for this function:

§ GetEventLengthMask()

std::pair< unsigned int, unsigned int > XiaListModeDataMask::GetEventLengthMask ( ) const

Getter for the Mask and Shift of the Event Length.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 108 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetEventTimeHighMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetEventTimeHighMask ( ) const
inline

Getter for the Mask and Shift of the Event Time High.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 87 of file XiaListModeDataMask.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetFinishCodeMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetFinishCodeMask ( ) const
inline

Getter for the Mask and Shift of the Finish Code.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 81 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetFirmware()

DataProcessing::FIRMWARE XiaListModeDataMask::GetFirmware ( ) const
inline

Getter for the value of the FIRMWARE so that we can test that things are working as expected.

Returns
The current value of the internal firmware_ variable.

Definition at line 130 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetFrequency()

unsigned int XiaListModeDataMask::GetFrequency ( ) const
inline

Getter for the value of the frequency that we're using.

Returns
The current value of the internal frequency_ variable

Definition at line 134 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetHeaderLengthMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetHeaderLengthMask ( ) const
inline

Getter for the Mask and Shift of the Header Length.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 71 of file XiaListModeDataMask.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetSlotIdMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetSlotIdMask ( ) const
inline

Getter for the Mask and Shift of the Slot Id.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 59 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetTraceLengthMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetTraceLengthMask ( ) const

Getter for the Mask and Shift of the Trace Length.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 273 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ GetTraceMask()

std::pair<unsigned int, unsigned int> XiaListModeDataMask::GetTraceMask ( ) const
inline

Getter for the Mask and shift for the trace words.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 123 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ GetTraceOutOfRangeFlagMask()

pair< unsigned int, unsigned int > XiaListModeDataMask::GetTraceOutOfRangeFlagMask ( ) const

Getter for the Mask and Shift of the Trace-out-of-range Flag.

Returns
The pair of the mask and bit shift to use to decode the data.

Definition at line 241 of file XiaListModeDataMask.cpp.

Here is the caller graph for this function:

§ SetFirmware() [1/2]

void XiaListModeDataMask::SetFirmware ( const DataProcessing::FIRMWARE firmware)
inline

Sets the firmware version

Parameters
[in]firmware: The firmware type that we would like to set.

Definition at line 138 of file XiaListModeDataMask.hpp.

Here is the caller graph for this function:

§ SetFirmware() [2/2]

void XiaListModeDataMask::SetFirmware ( const std::string &  type)
inline

Sets the firmware version

Parameters
[in]type: The string that we are going to convert to the more useful FIRMWARE enum.

Definition at line 145 of file XiaListModeDataMask.hpp.

Here is the call graph for this function:

§ SetFrequency()

void XiaListModeDataMask::SetFrequency ( const unsigned int &  freq)
inline

Sets the frequency of the module that we are working with.

Parameters
[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.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

§ firmware_

DataProcessing::FIRMWARE XiaListModeDataMask::firmware_
private

The firmware version that we are using.

Definition at line 163 of file XiaListModeDataMask.hpp.

§ frequency_

unsigned int XiaListModeDataMask::frequency_
private

The frequency of the module that we want to decode.

Definition at line 165 of file XiaListModeDataMask.hpp.


The documentation for this class was generated from the following files: