NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Functions
ToUtils.cpp File Reference

: Utilities common to e.g. toxml and tocrate More...

#include <ToUtils.h>
#include <sstream>
#include <stdexcept>

Functions

std::pair< unsigned short,
unsigned short > 
parseMspsOption (const char *opt)
 
std::vector< unsigned short > makeSlotVector (const std::map< unsigned short, DDAS::XMLCrateReader::SlotInformation > &slotInfo)
 
std::vector< unsigned short > makeSlotVector (const DDAS::Crate &crate)
 

Detailed Description

: Utilities common to e.g. toxml and tocrate

Function Documentation

std::vector<unsigned short> makeSlotVector ( const std::map< unsigned short, DDAS::XMLCrateReader::SlotInformation > &  slotInfo)

makeSlotVector Given the slot information map, crate a vector of slots.

Parameters
slotInfo- slot information vetor
crate- Crate settings.
Returns
std::vector<unsigned short>
std::pair<unsigned short, unsigned short> parseMspsOption ( const char *  opt)

parseMspsOption Given the MSPS string of the form slot:speed returns the pair of {slot,speed}.

Parameters
opt- the option value
Returns
std::pair<unsigned short, unsigned short> first - the slot, second the speed in MHz.