Belle II Software  release-08-01-10
HardwareClockSettings Class Reference

Database object containing the nominal accelerator RF value and the prescales to derive the clock frequencies of the sub-detectors. More...

#include <HardwareClockSettings.h>

Inheritance diagram for HardwareClockSettings:
Collaboration diagram for HardwareClockSettings:

Public Member Functions

 HardwareClockSettings ()
 Constructor.
 
double getClockPrescale (Const::EDetector detector, std::string label) const
 Get the prescale factor used to derive a detector clock from the global clock frequency. More...
 
double getClockFrequency (Const::EDetector detector, std::string label) const
 Get the frequency of a detector clock. More...
 
double getGlobalClockFrequency () const
 Get the global clock (system clock) frequency. More...
 
double getAcceleratorRF () const
 Get the accelerator RF value. More...
 
void setClockPrescale (const Const::EDetector detector, std::string label, double prescale)
 Set the prescale value used to derive a detector clock from the global clock frequency. More...
 
void setClockFrequency (const Const::EDetector detector, std::string label, double frequency)
 Set the frequency value of detector clock not derived from the global clock. More...
 
void setAcceleratorRF (double acceleratorRF)
 Set the accelerator RF value. More...
 
bool isPrescaleAvailable (Const::EDetector detector, std::string label) const
 Check if the prescale of a clock is available. More...
 
bool isFrequencyAvailable (Const::EDetector detector, std::string label) const
 Check if the frequency of a detector clock is available. More...
 
void print () const
 Print the content of the class.
 

Private Attributes

std::map< Const::EDetector, std::map< std::string, double > > m_prescaleMap
 Map of prescale factors used to derive the clock frequencies from the global clock frequency.
 
std::map< Const::EDetector, std::map< std::string, double > > m_clocksMap
 Map of clock frequencies not derived from the global clock frequency. More...
 
double m_acceleratorRF = 0
 Accelerator radio frequency [GHz].
 

Detailed Description

Database object containing the nominal accelerator RF value and the prescales to derive the clock frequencies of the sub-detectors.

Global clock frequency (system clock) is RF/4.

Definition at line 25 of file HardwareClockSettings.h.

Member Function Documentation

◆ getAcceleratorRF()

double getAcceleratorRF ( ) const

Get the accelerator RF value.

Returns
frequency [GHz]

Definition at line 57 of file HardwareClockSettings.cc.

58 {
59  return m_acceleratorRF;
60 }
double m_acceleratorRF
Accelerator radio frequency [GHz].

◆ getClockFrequency()

double getClockFrequency ( Const::EDetector  detector,
std::string  label 
) const

Get the frequency of a detector clock.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
Returns
frequency [GHz]

Definition at line 34 of file HardwareClockSettings.cc.

◆ getClockPrescale()

double getClockPrescale ( Const::EDetector  detector,
std::string  label 
) const

Get the prescale factor used to derive a detector clock from the global clock frequency.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
Returns
prescale factor

Definition at line 62 of file HardwareClockSettings.cc.

◆ getGlobalClockFrequency()

double getGlobalClockFrequency ( ) const

Get the global clock (system clock) frequency.

Returns
frequency [GHz]

Definition at line 52 of file HardwareClockSettings.cc.

◆ isFrequencyAvailable()

bool isFrequencyAvailable ( Const::EDetector  detector,
std::string  label 
) const

Check if the frequency of a detector clock is available.

The check is performed for both the clocks derived from the globalclock and the clocks not derived from it.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
Returns
true, if available

Definition at line 25 of file HardwareClockSettings.cc.

◆ isPrescaleAvailable()

bool isPrescaleAvailable ( Const::EDetector  detector,
std::string  label 
) const

Check if the prescale of a clock is available.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
Returns
true, if available

Definition at line 18 of file HardwareClockSettings.cc.

◆ setAcceleratorRF()

void setAcceleratorRF ( double  acceleratorRF)

Set the accelerator RF value.

Parameters
acceleratorRFAccelerator RF value [GHz].

Definition at line 83 of file HardwareClockSettings.cc.

◆ setClockFrequency()

void setClockFrequency ( const Const::EDetector  detector,
std::string  label,
double  frequency 
)

Set the frequency value of detector clock not derived from the global clock.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
frequencyThe frequency for the clock [GHz]

Definition at line 78 of file HardwareClockSettings.cc.

◆ setClockPrescale()

void setClockPrescale ( const Const::EDetector  detector,
std::string  label,
double  prescale 
)

Set the prescale value used to derive a detector clock from the global clock frequency.

Parameters
detectorThe ID of the detector.
labelThe label for the clock.
prescaleThe prescale factor of the clock.

Definition at line 72 of file HardwareClockSettings.cc.

Member Data Documentation

◆ m_clocksMap

std::map<Const::EDetector, std::map<std::string, double> > m_clocksMap
private

Map of clock frequencies not derived from the global clock frequency.

Clock frequency units are GHz.

Definition at line 114 of file HardwareClockSettings.h.


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