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

THiCalibration Class Reference

#include <THiCalibration.h>

Collaboration diagram for THiCalibration:

[legend]
List of all members.

Detailed Description

Heavy-ion calibration class.

Used as interface to MySQL, this class contains calibrations for ADCs and TDCs, as these are the modules that output data into the heavy-ion memories.

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

Definition at line 18 of file THiCalibration.h.

Public Member Functions

 THiCalibration (UInt_t=1)
 ~THiCalibration ()
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 TCalibrationGetTdc () const
TMySQLResult * GetDatabaseInfo (const Char_t *=0)

Private Attributes

string fDatabase
TCalibration fAdc
TCalibration fTdc


Constructor & Destructor Documentation

THiCalibration 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 35 of file THiCalibration.cxx.

~THiCalibration  ) 
 

Default destructor.

Definition at line 47 of file THiCalibration.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 53 of file THiCalibration.cxx.

References TCalibration::Clear(), fAdc, and fTdc.

Here is the call graph for this function:

void Print const Char_t *  option = ""  )  const
 

Print data held in this class. Prints out TDC and ADC data.

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

Definition at line 63 of file THiCalibration.cxx.

References fAdc, fTdc, 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 75 of file THiCalibration.cxx.

References TCalibration::AddToChannel(), TCalibration::AddToGain(), TCalibration::AddToHistogramMap(), TCalibration::AddToMap(), TCalibration::AddToOffset(), fAdc, fTdc, 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 45 of file THiCalibration.h.

References fDatabase.

const TCalibration & GetAdc  )  const [inline]
 

Get the heavy-ion ADC calibration.

Returns:
A calibration associated with the heavy-ion ADCs.

Definition at line 54 of file THiCalibration.h.

const TCalibration & GetTdc  )  const [inline]
 

Get the heavy-ion TDC calibration.

Returns:
A calibration associated with the heavy-ion TDCs.

Definition at line 62 of file THiCalibration.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 142 of file THiCalibration.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 34 of file THiCalibration.h.

TCalibration fAdc [private]
 

Heavy-ion ADC calibration. This is set by calling SetCalibration().

Definition at line 38 of file THiCalibration.h.

TCalibration fTdc [private]
 

Heavy-ion TDC calibration. This is set by calling SetCalibration().

Definition at line 42 of file THiCalibration.h.


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