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

: Utilities for toxml, tocrate etc. More...

#include <vector>
#include <map>
#include <utility>
#include <ModuleSettings.h>
#include <XMLCrateReader.h>

Go to the source code of this file.

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 for toxml, tocrate etc.

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.