QPulserConverter Class Reference
[Apollo]

List of all members.


Detailed Description

utility class to convert between different pulser parameters representations

Author:
Sergio Di Domizio

Public Member Functions

virtual ~QPulserConverter ()
 dtor
void Load (const std::map< unsigned int, QDaqChannel > &channels)
 load pulser configuration
unsigned int GetPulseId (unsigned int boardId, unsigned int hwCh) const
 get pulse_id from hardware address (board and channel)
int GetBoard (unsigned int pulseId) const
 get board id from pulse id
int GetHwCh (unsigned int pulseId) const
 get hardware channel from pulse id
int get_mem1 (float)
 get pulser mem1 from pulse amplitude
int get_mem2 (int, float)
 get pulser mem2 from pulse amplitude and hw channel
int HeaterName2Board (const std::string &name) const
 convert heater name to board id

Static Public Member Functions

static QPulserConverterGetInstance ()
 singleton getter

Private Member Functions

 QPulserConverter ()

Private Attributes

std::map< QPulserAddress,
unsigned int > 
fMapping

Classes

class  QPulserAddress
 utlity class to sort and compare pulser channels More...

Constructor & Destructor Documentation

QPulserConverter::QPulserConverter (  )  [private]

ctor


Member Function Documentation

void QPulserConverter::Load ( const std::map< unsigned int, QDaqChannel > &  channels  ) 

load pulser configuration

Parameters:
channels map of QDaqChannel objects filled with pulser configuration read from db (or somewhere else)

References QPulserConverter::QPulserAddress::fBoard, QPulserConverter::QPulserAddress::fHwCh, fMapping, and HeaterName2Board().

Referenced by QGuiPulserMain::UpdateSettingsBasket().

unsigned int QPulserConverter::GetPulseId ( unsigned int  boardId,
unsigned int  hwCh 
) const

get pulse_id from hardware address (board and channel)

Returns:
requested pulse id or 0 if boardId and channel do not match any entry in the configuration map

References QPulserConverter::QPulserAddress::fBoard, QPulserConverter::QPulserAddress::fHwCh, and fMapping.

Referenced by QPulserGuiInterface::AddChannel(), and QPulserSingleShot::SetParameters().

int QPulserConverter::GetBoard ( unsigned int  pulseId  )  const

get board id from pulse id

Returns:
board id or -1 if requested pulse id does not exist

References fMapping.

Referenced by QGuiPulserMain::Blink().

int QPulserConverter::GetHwCh ( unsigned int  pulseId  )  const

get hardware channel from pulse id

Returns:
hardware channel or -1 if requested pulse id does not exist

References fMapping.

Referenced by QGuiPulserMain::Blink().


Member Data Documentation

std::map<QPulserAddress, unsigned int> QPulserConverter::fMapping [private]

map of QPulserAddress and corresponding pulse id

Referenced by GetBoard(), GetHwCh(), GetPulseId(), and Load().


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

Generated on Tue Nov 16 10:50:08 2010 for CUORE Software by  doxygen 1.5.6