Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

TGrCalibration Class Reference

#include <TGrCalibration.h>

Collaboration diagram for TGrCalibration:

[legend]
List of all members.

Detailed Description

Gamma-ray calibration class.

Used as interface to MySQL, this class contains calibrations for ADCs, leading-edge and constant-fraction TDCs, as these are the modules that output data into the gamma-ray memories.

Author:
JEP.
Version:
1.0.
Date:
June 2004.

Definition at line 18 of file TGrCalibration.h.

Public Member Functions

 TGrCalibration (UInt_t=1)
 ~TGrCalibration ()
void Clear (const Char_t *="")
void Print (const Char_t *="") const
void FindCalibration (const Char_t *=0)
void SetDatabase (const Char_t *)
const TCalibrationGetAdc () const
const TCalibrationGetLeTdc () const
const TCalibrationGetCfTdc () const
TMySQLResult * GetDatabaseInfo (const Char_t *=0)

Private Attributes

string fDatabase
TCalibration fAdc
TCalibration fLeTdc
TCalibration fCfTdc


Constructor & Destructor Documentation

TGrCalibration UInt_t  channels = 1  ) 
 

Default constructor. Sets the size of the ADC and TDC calibrations (defaults to 1 but would be 32 for a DSSSD for example).

Parameters:
[in] channels The number of channels the detector to calibrate has.

Definition at line 39 of file TGrCalibration.cxx.

~TGrCalibration  ) 
 

Default destructor.

Definition at line 51 of file TGrCalibration.cxx.


Member Function Documentation

void Clear const Char_t *  option = ""  ) 
 

Utility method to clear out the calibration.

Parameters:
[in] option The option is currently unimplemented.

Definition at line 57 of file TGrCalibration.cxx.

References TCalibration::Clear(), fAdc, fCfTdc, and fLeTdc.

Here is the call graph for this function:

void Print const Char_t *  option = ""  )  const
 

Print data held in this class. The option is currently unimplemented. Prints out leading-edge and constant-fraction TDC data, and ADC data.

Parameters:
[in] option The option is currently unimplemented.

Definition at line 68 of file TGrCalibration.cxx.

References fAdc, fCfTdc, fLeTdc, and TCalibration::Print().

Here is the call graph for this function:

void FindCalibration const Char_t *  detectorName = 0  ) 
 

Set the detector calibration, this depends on the detector name. This is an interface to MySQL, currently using TMySQL ROOT library.

Parameters:
[in] detectorName The detector to look for.

Definition at line 84 of file TGrCalibration.cxx.

References TCalibration::AddToChannel(), TCalibration::AddToGain(), TCalibration::AddToHistogramMap(), TCalibration::AddToMap(), TCalibration::AddToOffset(), fAdc, fCfTdc, fLeTdc, TCalibration::GetChannels(), GetDatabaseInfo(), and TCalibration::SetBitMask().

Here is the call graph for this function:

void SetDatabase const Char_t *  database  )  [inline]
 

Set the database from where the calibration data is accessed.

Parameters:
[in] database The name of the database, for example "mysql://localhost:3306/dragon".

Definition at line 47 of file TGrCalibration.h.

References fDatabase.

const TCalibration & GetAdc  )  const [inline]
 

Get the gamma-ray ADC calibration.

Returns:
A calibration associated with the gamma-ray ADCs.

Definition at line 56 of file TGrCalibration.h.

const TCalibration & GetLeTdc  )  const [inline]
 

Get the gamma-ray leading-edge TDC calibration.

Returns:
A calibration associated with the gamma-ray leading-edge TDCs.

Definition at line 64 of file TGrCalibration.h.

const TCalibration & GetCfTdc  )  const [inline]
 

Get the gamma-ray constant-fraction TDC calibration.

Returns:
A calibration associated with the gamma-ray constant-fraction TDCs.

Definition at line 73 of file TGrCalibration.h.

TMySQLResult * GetDatabaseInfo const Char_t *  detectorName = 0  ) 
 

Get the detector calibration from the MySQL database. This depends on the detector name passed in the character string detectorName. A corresponding entry will be looked for in the MySQL database and the TMySQLResult returned. If it fails an error will be printed.

Parameters:
[in] detectorName The detector name to look for.
Returns:
The TMySQLResult from the query if successful, otherwise a default calibration is used.

Definition at line 165 of file TGrCalibration.cxx.

References fDatabase.


Member Data Documentation

string fDatabase [private]
 

The database to access the calibration data from. This defaults to "mysql://localhost:3306/Online"

Definition at line 35 of file TGrCalibration.h.

TCalibration fAdc [private]
 

Gamma-ray ADC calibration.

Definition at line 38 of file TGrCalibration.h.

TCalibration fLeTdc [private]
 

Gamma-ray leading-edge TDC calibration.

Definition at line 41 of file TGrCalibration.h.

TCalibration fCfTdc [private]
 

Gamma-ray constant-fraction TDC calibration.

Definition at line 44 of file TGrCalibration.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 8 11:54:34 2007 for DragonRoot by  doxygen 1.3.9.1