NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | List of all members
DDAS::SetFileEditor Class Reference

#include <SetFileEditor.h>

Public Member Functions

 SetFileEditor (const char *setfile)
 
virtual ~SetFileEditor ()
 
void setSlotSpeed (unsigned short slot, unsigned short speed)
 
void set (unsigned short slot, const char *what, uint32_t value)
 
void setChanPar (unsigned short slot, const char *what, const uint32_t *values)
 
uint32_t get (unsigned short slot, const char *what)
 
std::vector< uint32_t > getChanPar (unsigned short slot, const char *what)
 

Detailed Description

Provides the ability to edit a set file. The set file must already exist and is mapped into memory.

Constructor & Destructor Documentation

DDAS::SetFileEditor::SetFileEditor ( const char *  setfile)

constructor

  • saves the set file name.
  • Maps the set file into memory.
  • Creates default varmaps for each of the slots (for 250MHz digitizers).
Parameters
constchar* setfile - Path to the set file.
DDAS::SetFileEditor::~SetFileEditor ( )
virtual

destructor just munmap the file.m_longs tells us how big it is and includes any page padding needed.

Member Function Documentation

uint32_t DDAS::SetFileEditor::get ( unsigned short  slot,
const char *  what 
)

get Get a uint32_t value in a set file chunk.

Parameters
slot- slot number.
what- name of the item to get.
Returns
uint32_t
Exceptions
std::range_error
std::invalid_argument
std::vector< uint32_t > DDAS::SetFileEditor::getChanPar ( unsigned short  slot,
const char *  what 
)

getChanPar Get the 16 values of a channel parameter

Parameters
slot- slot number,
what- what to get.
Returns
std::vector<uint32_t>
Exceptions
std::range_error
std::invalid_argument
void DDAS::SetFileEditor::set ( unsigned short  slot,
const char *  what,
uint32_t  value 
)

set Set a uint32_t value in a set file chunk.

Parameters
slot- slot number
what- Name of the item to set.
value- new value to set.
Exceptions
std::range_error
std::invalid_argument
void DDAS::SetFileEditor::setChanPar ( unsigned short  slot,
const char *  what,
const uint32_t *  values 
)

setChanPar Set the 16 values of a channel parameter.

Parameters
slotslot number
whatparameter name.
valuesto set
Exceptions
std::range_error
std::invalid_argument
void DDAS::SetFileEditor::setSlotSpeed ( unsigned short  slot,
unsigned short  speed 
)

setSlotSpeed Sets the speed of a slot. This is needed to select the proper varfile that defines the offsets into the chunk of memory associated with a slot.

Parameters
slot- slot number (2 is the first slot).
speed- MHz speed of the digitizer.
Note
Several of the methods called by this method may throw exceptions that derive from std::exception including
Exceptions
std::range_error
std::invalid_argument

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