fdhwlib  2.0.25
TsBackgroundBase Class Reference

#include <TsBackgroundBase.h>

Inheritance diagram for TsBackgroundBase:
hw4::TsBackground TsBackground

List of all members.

Public Member Functions

Protected Attributes

Friends


Detailed Description

Contains one set of background data.

References:

Background light level data format

Changes:

  • Subsecond added
  • Selection of the background parameter added.
Todo:

Add a generalized class to provide analysis with the background data. E.g. mean + variance of the paramter vs pixel?!

Check how to do analysis with the 2D arrays?

Add compression level

Use readRegisterBlock in get()

Todo:
Add a individual timestamp for every parameter ?!

Definition at line 516 of file TsBackgroundBase.h.


Constructor & Destructor Documentation

TsBackgroundBase::TsBackgroundBase ( )
virtual TsBackgroundBase::~TsBackgroundBase ( ) [virtual]

Member Function Documentation

virtual void TsBackgroundBase::analyse ( int  select = 0) [virtual]

Anaylse the background data matrices.

Calculate the mean value and variance of the parameter matrices.

virtual void TsBackgroundBase::calcStatistics ( int  matrix[][24],
Float_t mean,
Float_t var,
Int_t n,
Int_t  type = 0 
) [virtual]

Calculate mean and variance for the paramter matrices.

Parameters:
matrixReference to the matrix of the variables. A size of 20x24 elements is required.
meanMean of the distribution of the pixel
varVariance of the distribution of the pixel
nNumber of pixel in the analysis
type0 analyse normal pixel, 1 analyse virtual pixel
virtual void TsBackgroundBase::calcStatistics ( unsigned short  matrix[][24],
Float_t mean,
Float_t var,
Int_t n,
Int_t  type = 0 
) [virtual]

Calculate mean and variance for the paramter matrices.

Parameters:
matrixReference to the matrix of the variables. A size of 20x24 elements is required.
meanMean of the distribution of the pixel
varVariance of the distribution of the pixel
nNumber of pixel in the analysis
type0 analyse normal pixel, 1 analyse virtual pixel
virtual void TsBackgroundBase::displayHeader ( FILE *  fout,
int  select 
) [virtual]

Display the header line for the output.

virtual void TsBackgroundBase::displayParameterSet ( FILE *  fout,
int  select 
) [virtual]

Display the parameter names on the given output stream.

virtual void TsBackgroundBase::displaySummary ( FILE *  fout,
int  select 
) [virtual]

Display summary of the background record.

void TsBackgroundBase::dump ( FILE *  fout)
virtual int TsBackgroundBase::get ( SubrackBase s,
int  select = 0 
) [virtual]

Get background parameters for the complete camera.

Parameters:
sPointer to the electronic description
selectSelect the required parameters in the background arrays. Bits 0 to 4 disable the parameters Current Monitor, Variance, Threshold, Pedestal (Sum), FLT Hitrate.

Reimplemented in hw4::TsBackground, and TsBackground.

unsigned long TsBackgroundBase::getAgeOfDataset ( FILE *  fout = 0)

Set the age of the dataset.

The time measurement is based on the start time set in the get function

Returns:
Time in pasted since the start of the readout [ms].
int TsBackgroundBase::getIndex ( )
virtual char* TsBackgroundBase::getParameterName ( int  nr) [virtual]

Get the name of a parameter.

Parameters:
nrNumber of the parameter (1..5) The select mask will be formed by setting the corresponding bits in the mask.
virtual int TsBackgroundBase::getParameterSet ( FILE *  fin) [virtual]

Analyse the data structure of the background file.

The function returns the selected parameters.

virtual int TsBackgroundBase::getPixelNo ( int  col,
int  row 
) [virtual]

Calculate the unique pixel number for a telescope.

Data Format in bg-files:
     1 <-<--  row --->  22      23  24
 1   1  2  3 ....       22     441  442
 |  23 24  25....       44     443  444
col  ...
 |
 20 419 420 ....       440     479  480
 
int TsBackgroundBase::getTelescopeId ( )
unsigned long TsBackgroundBase::getTRef ( )
virtual bool TsBackgroundBase::isAvailable ( int  col) [virtual]

Check if the board is included in the data.

int TsBackgroundBase::loadAMFormat ( FILE *  fin,
int  select = 0 
)

Load the background array in the text format specified by the ipe hardware test tool.

Parameters:
finInput stream
selectSelect the required parameters in the background arrays Bits 0 to 4 disable the parameters Current Monitor, Variance, Threshold, Pedestal (Sum), FLT Hitrate.
int TsBackgroundBase::saveAMFormat ( FILE *  fout,
int  select = 0 
)

Save the background array in the text format specified by the ipe hardware test tool.

Parameters:
foutOutput stream
selectSelect the required parameters in the background arrays Bits 0 to 4 disable the parameters Current Monitor, Variance, Threshold, Pedestal (Sum), FLT Hitrate.
virtual int TsBackgroundBase::set ( SubrackBase s,
int  select = 0 
) [virtual]

Set the background values of the crate (for simulation mode)

Reimplemented in hw4::TsBackground, and TsBackground.

void TsBackgroundBase::setIndex ( int  i)
virtual void TsBackgroundBase::setParameter ( bool *  isPresent,
int *  nSamples 
) [virtual]
void TsBackgroundBase::setPeriod ( int  time)
void TsBackgroundBase::setPeriod ( float  time)
void TsBackgroundBase::setTelescopeId ( int  id)
void TsBackgroundBase::setTRef ( unsigned long  time)

Friends And Related Function Documentation

friend class FltCmds [friend]

Definition at line 524 of file TsBackgroundBase.h.

friend class hw4::FltCmds [friend]

Definition at line 525 of file TsBackgroundBase.h.

friend class TsBackgroundLoop [friend]

Definition at line 521 of file TsBackgroundBase.h.

friend class TsBackgroundReader [friend]

Definition at line 522 of file TsBackgroundBase.h.


Member Data Documentation

TsBackgroundData TsBackgroundBase::fData [protected]

The data.

Definition at line 680 of file TsBackgroundBase.h.


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