SctApi::ConfigUtility Class Reference

compares ABCDModule structs and their sub-types More...

#include <ConfigurationUtility.h>


Public Types

enum  ConfigVarType {
  BOC_CHANNEL_CONFIG_VAR, BOC_GLOBAL_CONFIG_VAR, MODULE_GLOBAL_CONFIG_VAR, MODULE_CHIP_CONFIG_VAR,
  MODULE_CHANNEL_CONFIG_VAR, TIM_CONFIG_VAR, TRIGGER_VAR, UNKNOWN_CONFIG_VAR
}

Static Public Member Functions

static unsigned diff (const ABCDBasic &first, const ABCDBasic &second, bool print=false)
 check equality of ABCDBasic ignoring any unused bits
static unsigned diff (const ABCDConfig &first, const ABCDConfig &second, bool print=false)
 check equality of ABCDChip ignoring any unused bits
static unsigned diff (const ABCDCaldata &first, const ABCDCaldata &second, bool print=false)
 check equality of ABCDChip ignoring any unused bits
static unsigned diff (const ABCDChip &first, const ABCDChip &second, bool print=false)
 check equality of ABCDChip ignoring any unused bits
static unsigned diff (const ABCDModule &first, const ABCDModule &second, bool print=false)
 check equality of ABCDModule ignoring any unused bits
static unsigned diffSN (const ABCDModule &first, const ABCDModule &second, bool print=false)
 check equality of ABCDModule serial number
static std::auto_ptr< ABCDModule > clone (const ABCDModule &first)
 Clone a module.
static std::auto_ptr< ABCDBasic > clone (const ABCDBasic &first)
 Clone the basic part of a chip.
static void modifyVar (ABCDModule *module, UINT32 typ, FLOAT32 val)
 set an ABCD module variable:
static void modifyVar (ABCDModule *module, unsigned chip, UINT32 typ, FLOAT32 val)
 set an ABCD module chip variable:
static bool isBocRegister (UINT32 typ)
 return true if the type is a BOC register
static bool isModuleRegister (UINT32 typ)
 return true if the type is a Module register (channel or chip or global) register
static bool isTimRegister (UINT32 typ)
 return true if the type is a TIM register
static std::string apiBitFieldToString (unsigned bitfield)
static ConfigVarType variableType (UINT32 typ)
 return true if the type is a BOC register rather than a ABCD register

Private Member Functions

 ConfigUtility ()

Static Private Member Functions

static ConfigUtilityConfigUtility::instance ()
static void setToken (ABCDModule *module, unsigned token, int link0, int link1)
static INT32 ConfigUtility::setChipRole (ABCDModule *module, UINT32 theChip, ABCD_ROLES role)

Private Attributes

UINT16 config_compare_mask


Detailed Description

compares ABCDModule structs and their sub-types

Definition at line 15 of file ConfigurationUtility.h.


Member Function Documentation

std::auto_ptr< ABCDBasic > SctApi::ConfigUtility::clone const ABCDBasic &  first  )  [inline, static]
 

Clone the basic part of a chip.

Definition at line 107 of file ConfigurationUtility.h.

std::auto_ptr< ABCDModule > SctApi::ConfigUtility::clone const ABCDModule &  first  )  [inline, static]
 

Clone a module.

Definition at line 100 of file ConfigurationUtility.h.

unsigned SctApi::ConfigUtility::diff const ABCDModule &  first,
const ABCDModule &  second,
bool  print = false
[inline, static]
 

check equality of ABCDModule ignoring any unused bits

Returns:
bitfield with bits of ConfigType which are different

Definition at line 237 of file ConfigurationUtility.h.

References diff().

Here is the call graph for this function:

unsigned SctApi::ConfigUtility::diff const ABCDChip &  first,
const ABCDChip &  second,
bool  print = false
[inline, static]
 

check equality of ABCDChip ignoring any unused bits

Returns:
bitfield with bits of ConfigType which are different

Definition at line 196 of file ConfigurationUtility.h.

unsigned SctApi::ConfigUtility::diff const ABCDCaldata &  first,
const ABCDCaldata &  second,
bool  print = false
[inline, static]
 

check equality of ABCDChip ignoring any unused bits

Returns:
bitfield with bits of ConfigType which are different

Definition at line 169 of file ConfigurationUtility.h.

unsigned SctApi::ConfigUtility::diff const ABCDConfig &  first,
const ABCDConfig &  second,
bool  print = false
[inline, static]
 

check equality of ABCDChip ignoring any unused bits

Returns:
bitfield with bits of ConfigType which are different

Definition at line 127 of file ConfigurationUtility.h.

unsigned SctApi::ConfigUtility::diff const ABCDBasic &  first,
const ABCDBasic &  second,
bool  print = false
[inline, static]
 

check equality of ABCDBasic ignoring any unused bits

Returns:
bitfield with bits of ConfigType which are different

Definition at line 142 of file ConfigurationUtility.h.

Referenced by diff().

unsigned SctApi::ConfigUtility::diffSN const ABCDModule &  first,
const ABCDModule &  second,
bool  print = false
[inline, static]
 

check equality of ABCDModule serial number

Returns:
bitfield with bits of ConfigType which are different

Definition at line 266 of file ConfigurationUtility.h.

bool SctApi::ConfigUtility::isBocRegister UINT32  typ  )  [inline, static]
 

return true if the type is a BOC register

Definition at line 288 of file ConfigurationUtility.h.

References variableType().

Referenced by SctApi::ScanControlTIMHisto::nextBin().

Here is the call graph for this function:

bool SctApi::ConfigUtility::isModuleRegister UINT32  typ  )  [inline, static]
 

return true if the type is a Module register (channel or chip or global) register

Definition at line 303 of file ConfigurationUtility.h.

References variableType().

Referenced by SctApi::modifyABCDVar(), modifyVar(), and SctApi::ScanControlTIMHisto::nextBin().

Here is the call graph for this function:

bool SctApi::ConfigUtility::isTimRegister UINT32  typ  )  [inline, static]
 

return true if the type is a TIM register

Definition at line 296 of file ConfigurationUtility.h.

References variableType().

Referenced by SctApi::CrateImpl::modifyTIMParam(), and SctApi::ScanControlTIMHisto::nextBin().

Here is the call graph for this function:

void SctApi::ConfigUtility::modifyVar ABCDModule *  module,
unsigned  chip,
UINT32  typ,
FLOAT32  val
[static]
 

set an ABCD module chip variable:

Definition at line 174 of file ConfigurationUtility.cxx.

References modifyVar(), and variableType().

Here is the call graph for this function:

void SctApi::ConfigUtility::modifyVar ABCDModule *  module,
UINT32  typ,
FLOAT32  val
[static]
 

set an ABCD module variable:

Definition at line 75 of file ConfigurationUtility.cxx.

References isModuleRegister(), setToken(), SctApi::tokens, and variableType().

Referenced by SctApi::modifyABCDVar(), and modifyVar().

Here is the call graph for this function:

ConfigUtility::ConfigVarType SctApi::ConfigUtility::variableType UINT32  typ  )  [static]
 

return true if the type is a BOC register rather than a ABCD register

Definition at line 577 of file ConfigurationUtility.cxx.

Referenced by isBocRegister(), isModuleRegister(), isTimRegister(), SctApi::modifyABCDVarAllModulesOneChip(), modifyVar(), and SctApi::ScanControlTIMHisto::nextBin().


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 14:04:16 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6