#include <TsBackgroundBase.h>
List of all members.
Public Member Functions
- TsBackgroundBase ()
- virtual ~TsBackgroundBase ()
- virtual int getPixelNo (int col, int row)
- virtual void setParameter (bool *isPresent, int *nSamples)
- virtual bool isAvailable (int col)
- virtual char * getParameterName (int nr)
- void setIndex (int i)
- int getIndex ()
- void setTRef (unsigned long time)
- unsigned long getTRef ()
- void setPeriod (int time)
- void setPeriod (float time)
- void setTelescopeId (int id)
- int getTelescopeId ()
- unsigned long getAgeOfDataset (FILE *fout=0)
- virtual int get (SubrackBase *s, int select=0)
- virtual int set (SubrackBase *s, int select=0)
- virtual void calcStatistics (int matrix[][24], Float_t *mean, Float_t *var, Int_t *n, Int_t type=0)
- virtual void calcStatistics (unsigned short matrix[][24], Float_t *mean, Float_t *var, Int_t *n, Int_t type=0)
- virtual void analyse (int select=0)
- virtual void displaySummary (FILE *fout, int select)
- virtual int getParameterSet (FILE *fin)
- virtual void displayParameterSet (FILE *fout, int select)
- virtual void displayHeader (FILE *fout, int select)
- int loadAMFormat (FILE *fin, int select=0)
- int saveAMFormat (FILE *fout, int select=0)
- void dump (FILE *fout)
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:
-
matrix | Reference to the matrix of the variables. A size of 20x24 elements is required. |
mean | Mean of the distribution of the pixel |
var | Variance of the distribution of the pixel |
n | Number of pixel in the analysis |
type | 0 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:
-
matrix | Reference to the matrix of the variables. A size of 20x24 elements is required. |
mean | Mean of the distribution of the pixel |
var | Variance of the distribution of the pixel |
n | Number of pixel in the analysis |
type | 0 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:
-
s | Pointer to the electronic description |
select | Select 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:
-
nr | Number 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:
-
fin | Input stream |
select | Select 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:
-
fout | Output stream |
select | Select 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] |
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] |
friend class hw4::FltCmds [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: