spdFastorCalibration Class Reference

fastor calibration scan More...

#include <spdFastorCalibration.h>

Inheritance diagram for spdFastorCalibration:

Inheritance graph
[legend]
Collaboration diagram for spdFastorCalibration:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 spdFastorCalibration (SPDConfig *spdConf)
 ~spdFastorCalibration (void)
unsigned start (unsigned int fopolMinimum, unsigned int fopolMaximum, unsigned int fopolStep, unsigned int convpolMinimum, unsigned int convpolMaximum, unsigned int convpolStep, unsigned int comprefMinimum, unsigned int comprefMaximum, unsigned int comprefStep, unsigned int cgpolMinimum, unsigned int cgpolMaximum, unsigned int cgpolStep, unsigned int prevthMinimum, unsigned int prevthMaximum, unsigned int prevthStep, UInt32 triggerNum, UInt32 testPulseMatrices)
 Method to start the calibration of the Fast Or.
unsigned restart (void)
 Method to restart the calibration of the Fast Or.
void stop ()
 Method to stop the calibration of the Fast Or.
void scan ()
 Method to perform the scan.
UInt32 testFastorCalibration ()
 method to test the fastor calibration, will perform only one step of the scan
bool isActive ()

Private Member Functions

void infoHandler (void)
 info handler method that overloads the dim DimClient one
int sendPitCommand (const char *command)
int finalizeStep ()
UInt32 setTpMatrixAllEnabled (int currentTestPulse)
int checkNextTestPulse (int currentTestPulse)
 method to return the next selected test-pulse
UInt32 setDacEnabledHalfStaves (UInt8 DACn, UInt8 DACValue)
UInt32 sendHeadersAllEnabled (UInt32 foData[])
int saveFoDataToLog (int router, UInt32 *foData)
void setPixelInMatrix (UInt32 testPulseMatrix[], unsigned row, unsigned column)
unsigned foStep ()
 Method to perform one step of the fastor calibration.

Private Attributes

unsigned stepCounter
 counts the current step
spdLoggerlog
DWORD timePitRequest
 Stores when the last command to the pit was sent.
DWORD pitRequestTimeout
 stores the pit timeout time, it is initialized to 10000 ms
DACParameters fopol
DACParameters convpol
DACParameters compref
DACParameters cgpol
DACParameters prevth
timer timerScan
unsigned int row
 keeps the current row of the test matrix being used
unsigned int column
 keeps the current column of the tet matrix being used
DimUpdatedInfo * getFastorCounters
 Dim info connected with the services in the PIT fed to get all the fo counters.
DimUpdatedInfo * cmdReturn
 Dim Info getting the return value of the pit fed commands.
DimUpdatedInfo * cmdId
 Dim Info getting the ID of the command sent to the pit fed.
DimUpdatedInfo * pitCmdStatus
 Dim command.
SPDConfigparent
 Connection to the SPD Config class to access all configuration methods.
bool active
 internal member which defines if there is a scan active or not
UInt32 triggerNumber
 internal member which defines the number of triggers used in each step
UInt32 testPulseActive
 internal member which defines the matrices to set for the test pulse
int stepPhase
 variable needed to keep track of the scan phase
int testPulse
 variable to keep track of the current row for the test pulse


Detailed Description

fastor calibration scan

fastor calibration scan 1: set a test pulse matrix 2: loop over fopol, convpol, compref, cgpol and prevth sending triggers and asking the PIT FED for the fastor counters 3:write header to router and send extra trigger with the counter data (the actual hits in the detector are not important)


Constructor & Destructor Documentation

spdFastorCalibration::spdFastorCalibration ( SPDConfig spdConf  ) 

spdFastorCalibration::~spdFastorCalibration ( void   ) 


Member Function Documentation

void spdFastorCalibration::infoHandler ( void   )  [private]

info handler method that overloads the dim DimClient one

This method is a callback function which will be called every time the services connect to pit FED are refreshed

int spdFastorCalibration::sendPitCommand ( const char *  command  )  [inline, private]

Sends a command to the pixel trigger For the moment is just calling the DimClient::SendCommand function but the main objective is to encapsulate the interface with the pit commands

int spdFastorCalibration::finalizeStep (  )  [private]

Method to finalize the step of the scan Writes the header in the enabled routers, checks all DAC values that need to be incremented and the new test pulse to be set this method is needed because of the DIM flush problem so it had to be separated in several functions

Returns:
error state 0 = everything was ok (all dacs where set properly)

UInt32 spdFastorCalibration::setTpMatrixAllEnabled ( int  currentTestPulse  )  [private]

function to set all test pulse matrices in all enabled channels

Parameters:
currentTestPulse- the number of the current test pulse to set [0-5]
Returns:
the error state of the operation (0=ok not 0 means one problem with one of the channels)

int spdFastorCalibration::checkNextTestPulse ( int  currentTestPulse  )  [private]

method to return the next selected test-pulse

UInt32 spdFastorCalibration::setDacEnabledHalfStaves ( UInt8  DACn,
UInt8  DACValue 
) [private]

Method to set a dac value in all enabled channels it sets all 10 pixel chips of all the enabled chanels with the same dac value

Parameters:
DACn- number identifying the dac
DACValue- value to set in the dacs

UInt32 spdFastorCalibration::sendHeadersAllEnabled ( UInt32  foData[]  )  [private]

function to set the header in all enabled routers

Returns:
the error state of the operation (0=ok not 0 means one problem with one of the channels)

int spdFastorCalibration::saveFoDataToLog ( int  router,
UInt32 foData 
) [private]

method to save the fastor data to log

void spdFastorCalibration::setPixelInMatrix ( UInt32  testPulseMatrix[],
unsigned  row,
unsigned  column 
) [inline, private]

unsigned spdFastorCalibration::foStep (  )  [private]

Method to perform one step of the fastor calibration.

unsigned spdFastorCalibration::start ( unsigned int  fopolMinimum,
unsigned int  fopolMaximum,
unsigned int  fopolStep,
unsigned int  convpolMinimum,
unsigned int  convpolMaximum,
unsigned int  convpolStep,
unsigned int  comprefMinimum,
unsigned int  comprefMaximum,
unsigned int  comprefStep,
unsigned int  cgpolMinimum,
unsigned int  cgpolMaximum,
unsigned int  cgpolStep,
unsigned int  prevthMinimum,
unsigned int  prevthMaximum,
unsigned int  prevthStep,
UInt32  triggerNum,
UInt32  testPulseMatrices 
)

Method to start the calibration of the Fast Or.

unsigned spdFastorCalibration::restart ( void   )  [virtual]

Method to restart the calibration of the Fast Or.

Reimplemented from SpdScan.

void spdFastorCalibration::stop (  )  [virtual]

Method to stop the calibration of the Fast Or.

Reimplemented from SpdScan.

void spdFastorCalibration::scan (  )  [virtual]

Method to perform the scan.

Reimplemented from SpdScan.

UInt32 spdFastorCalibration::testFastorCalibration (  ) 

method to test the fastor calibration, will perform only one step of the scan

bool spdFastorCalibration::isActive (  )  [inline, virtual]

Reimplemented from SpdScan.


Member Data Documentation

unsigned spdFastorCalibration::stepCounter [private]

counts the current step

spdLogger* spdFastorCalibration::log [private]

DWORD spdFastorCalibration::timePitRequest [private]

Stores when the last command to the pit was sent.

DWORD spdFastorCalibration::pitRequestTimeout [private]

stores the pit timeout time, it is initialized to 10000 ms

DACParameters spdFastorCalibration::fopol [private]

DACParameters spdFastorCalibration::convpol [private]

DACParameters spdFastorCalibration::compref [private]

DACParameters spdFastorCalibration::cgpol [private]

DACParameters spdFastorCalibration::prevth [private]

timer spdFastorCalibration::timerScan [private]

unsigned int spdFastorCalibration::row [private]

keeps the current row of the test matrix being used

unsigned int spdFastorCalibration::column [private]

keeps the current column of the tet matrix being used

DimUpdatedInfo* spdFastorCalibration::getFastorCounters [private]

Dim info connected with the services in the PIT fed to get all the fo counters.

DimUpdatedInfo* spdFastorCalibration::cmdReturn [private]

Dim Info getting the return value of the pit fed commands.

DimUpdatedInfo* spdFastorCalibration::cmdId [private]

Dim Info getting the ID of the command sent to the pit fed.

DimUpdatedInfo* spdFastorCalibration::pitCmdStatus [private]

Dim command.

SPDConfig* spdFastorCalibration::parent [private]

Connection to the SPD Config class to access all configuration methods.

bool spdFastorCalibration::active [private]

internal member which defines if there is a scan active or not

UInt32 spdFastorCalibration::triggerNumber [private]

internal member which defines the number of triggers used in each step

UInt32 spdFastorCalibration::testPulseActive [private]

internal member which defines the matrices to set for the test pulse

int spdFastorCalibration::stepPhase [private]

variable needed to keep track of the scan phase

This is needed because the DIM does not support the send receiving of the commands in the same loop, flush problem using DIM, I've sent a support request without any success so a solution is to leave the cycle and keep track of the step phase like this the flush will be done

int spdFastorCalibration::testPulse [private]

variable to keep track of the current row for the test pulse


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