SPDConfig Class Reference

Class to perform global operations in the detectors and calibration scans. More...

#include <SPDConfig.h>

Collaboration diagram for SPDConfig:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SPDConfig (char side)
 ~SPDConfig (void)
spdFastorCalibrationgetFoScan ()
 returns reference of the fastor calibration scans
spdMeanTHScangetMeanThScan ()
 returns reference of the mean threshold calibration scans
SpdDacScangetDacScan ()
 returns reference of the dac scan
SpdDelayScangetDelayScan ()
 returns reference to the delay scan
SpdMinThresScangetMinThresScan ()
 returns reference to the min threshold scan
SpdUniMatrixScangetUniMatrixScan ()
 returns reference to the uniformity matrix scan
bool isScanActive ()
 method that returns if any of the scans is active
SpdHalfStavegetHS (unsigned chNumber)
 methos to return a reference of one halfstave
SpdRoutergetRouter (unsigned routerNumber)
 methos to return a reference of one router
char getSide ()
 getter for the side
unsigned StartNoiseScan (UInt8 ChNumber, UInt32 triggern, bool InternTrig)
 starts a noisy scan
void setMCMStimuli (UInt8 ChN, UInt32 Enable, UInt32 ColumnToSet=1)
 sets the MCM stimuly for one link receiver channel only
void setMCMStimuliToAll (UInt32 Enable, UInt32 ColumnToSet=1)
 sets the MCM stimuly to all enable channels
void SetScansHeader (UInt8 routerNumber, UInt8 scanType, UInt32 triggern)
 Method to write the scan header in the router for the noise scan only.
void scans ()
 checks "loops" over the scans calling their scan method
unsigned int UnMaskAllPixels (void)
 unmasks all pixel chips
unsigned int refreshAllTemperatures ()
 refreshes the temperatures in all enabled halfstaves
unsigned int resetInternalDPI_All (void)
 Method to set the internal digital pilot with the default values in all enabled halfstaves.
unsigned int DataReset_All (void)
 performs a data reset in all half-staves
int writeConfigDiffTable ()
void countConfigDiff (unsigned &mcmDiff, unsigned &dacDiff, unsigned &noisyDiff)
int sendTriggerToEnabledRouters (UInt32 triggerN, bool delay=true, bool l2y=true, bool l1=true, bool tp=true)
void configureSPDDefault (UInt32 *report, bool routerReset=true, bool digitalPilot=true, bool analogPilot=true, bool pixdacs=true)
bool isRouterActive (unsigned routerNumber)

Public Attributes

HSConfData HSData

Protected Attributes

char side

Private Attributes

spdLoggerlog
SpdHalfStavehalfStaves [NHalfStaves]
 this will contain the HalfStave classes, 60 per side
SpdRouterrouters [NRouters]
 contains the routers per side
std::vector< SpdScan * > scansVector

Friends

class spdFastorCalibration
class spdMeanTHScan
class SpdDacScan
class SpdDelayScan
class SpdUniMatrixScan
class SpdMinThresScan
class SpdScan


Detailed Description

Class to perform global operations in the detectors and calibration scans.

this class contains instances of halfstaves routers and classes to perform calibration scans and global operations in the detector at the moment I've made all these calibration scans methods friends of this class most probably a huge crime in encapsulation but, for historical reasons, this was the easiest way of doing it


Constructor & Destructor Documentation

SPDConfig::SPDConfig ( char  side  ) 

SPDConfig::~SPDConfig ( void   ) 


Member Function Documentation

spdFastorCalibration& SPDConfig::getFoScan (  )  [inline]

returns reference of the fastor calibration scans

spdMeanTHScan& SPDConfig::getMeanThScan (  )  [inline]

returns reference of the mean threshold calibration scans

SpdDacScan& SPDConfig::getDacScan (  )  [inline]

returns reference of the dac scan

SpdDelayScan& SPDConfig::getDelayScan (  )  [inline]

returns reference to the delay scan

SpdMinThresScan& SPDConfig::getMinThresScan (  )  [inline]

returns reference to the min threshold scan

SpdUniMatrixScan& SPDConfig::getUniMatrixScan (  )  [inline]

returns reference to the uniformity matrix scan

bool SPDConfig::isScanActive (  ) 

method that returns if any of the scans is active

SpdHalfStave & SPDConfig::getHS ( unsigned  chNumber  ) 

methos to return a reference of one halfstave

SpdRouter & SPDConfig::getRouter ( unsigned  routerNumber  ) 

methos to return a reference of one router

char SPDConfig::getSide (  )  [inline]

getter for the side

unsigned SPDConfig::StartNoiseScan ( UInt8  ChNumber,
UInt32  triggern,
bool  InternTrig 
)

starts a noisy scan

void SPDConfig::setMCMStimuli ( UInt8  ChN,
UInt32  Enable,
UInt32  ColumnToSet = 1 
)

sets the MCM stimuly for one link receiver channel only

Parameters:
ChN chanel number (halfstave) to set
Enable enable or disable flag for the mcm stimuly
ColumnToSet defines the column to set in the mcm stimuly

void SPDConfig::setMCMStimuliToAll ( UInt32  Enable,
UInt32  ColumnToSet = 1 
)

sets the MCM stimuly to all enable channels

Parameters:
Enable enable or disable flag for the mcm stimuly
ColumnToSet defines the column to set in the mcm stimuly

void SPDConfig::SetScansHeader ( UInt8  routerNumber,
UInt8  scanType,
UInt32  triggern 
)

Method to write the scan header in the router for the noise scan only.

void SPDConfig::scans (  ) 

checks "loops" over the scans calling their scan method

unsigned SPDConfig::UnMaskAllPixels ( void   ) 

unmasks all pixel chips

unsigned SPDConfig::refreshAllTemperatures (  ) 

refreshes the temperatures in all enabled halfstaves

unsigned SPDConfig::resetInternalDPI_All ( void   ) 

Method to set the internal digital pilot with the default values in all enabled halfstaves.

unsigned SPDConfig::DataReset_All ( void   ) 

performs a data reset in all half-staves

int SPDConfig::writeConfigDiffTable (  ) 

function to write the differences to the database temporary table will loop through all halfstaves and send a command to compare the default and actual values writing them in the database in a temporary table

void SPDConfig::countConfigDiff ( unsigned &  mcmDiff,
unsigned &  dacDiff,
unsigned &  noisyDiff 
)

function to get the number of differences between the default and the actual data will loop through all internal containers comparing the defaul and actual values and counting the number of differente settings in mcm values, dac values and noisy pixel values

Parameters:
mcmDiff,: argument by reference it will be incremented inside the funcion to contain the number of mcm differences
dacDiff,: argument by reference it will be incremented inside the funcion to contain the number of pixel dac differences
noisyDiff,: argument by reference it will be incremented inside the funcion to contain the number of noisy pixels differences

int SPDConfig::sendTriggerToEnabledRouters ( UInt32  triggerN,
bool  delay = true,
bool  l2y = true,
bool  l1 = true,
bool  tp = true 
)

Method to send triggers to all enabled routers you can define the number of triggers to send and the rest of the varaiables enable the type of triggers to send

Parameters:
triggerN number of triggers to send
delay have to ask what this means to michele
l2y enables the level 2 yes trigger
l1 enables the level 1 trigger
tp enables the test pulse trigger

void SPDConfig::configureSPDDefault ( UInt32 report,
bool  routerReset = true,
bool  digitalPilot = true,
bool  analogPilot = true,
bool  pixdacs = true 
)

bool SPDConfig::isRouterActive ( unsigned  routerNumber  ) 

returns if a router as at least one acitve channel or not CAUTION it uses the local router number, so if side is C the router is still from 0-9


Friends And Related Function Documentation

friend class spdFastorCalibration [friend]

friend class spdMeanTHScan [friend]

friend class SpdDacScan [friend]

friend class SpdDelayScan [friend]

friend class SpdUniMatrixScan [friend]

friend class SpdMinThresScan [friend]

friend class SpdScan [friend]


Member Data Documentation

char SPDConfig::side [protected]

spdLogger* SPDConfig::log [private]

SpdHalfStave* SPDConfig::halfStaves[NHalfStaves] [private]

this will contain the HalfStave classes, 60 per side

SpdRouter* SPDConfig::routers[NRouters] [private]

contains the routers per side

std::vector< SpdScan * > SPDConfig::scansVector [private]

Contains a vector of the possible scans these are classes that inherit from SpdScan

HSConfData SPDConfig::HSData

Instance to manage database configuration of the halfstaves For the moment is a public member for historic reasons


The documentation for this class was generated from the following files:
Generated on Tue Dec 1 12:09:52 2009 for SPD FED Server by  doxygen 1.5.4