8#include <framework/dbobjects/HardwareClockSettings.h> 
    9#include <framework/gearbox/Const.h> 
   10#include <gtest/gtest.h> 
   11#include <framework/utilities/TestHelpers.h> 
   21    Int_t topPrescaleTest  = 6;
 
   22    Int_t eclPrescaleTest  = 3 * 24;
 
   24    Float_t dummyFrequency = 999.99;
 
   30    testClock.
setClockPrescale(Const::EDetector::TOP, 
"sampling", topPrescaleTest);
 
   31    testClock.
setClockPrescale(Const::EDetector::ECL, 
"sampling", eclPrescaleTest);
 
   37    EXPECT_EQ(testClock.
getClockPrescale(Const::EDetector::TOP, 
"sampling"), topPrescaleTest);
 
   38    EXPECT_EQ(testClock.
getClockPrescale(Const::EDetector::ECL, 
"sampling"), eclPrescaleTest);
 
   40    EXPECT_EQ(testClock.
getClockFrequency(Const::EDetector::ECL, 
"sampling"), RF / 4. / eclPrescaleTest);
 
   41    EXPECT_EQ(testClock.
getClockFrequency(Const::EDetector::ECL, 
"dummy"), dummyFrequency);
 
   42    EXPECT_EQ(testClock.
getClockFrequency(Const::EDetector::ARICH, 
"dummy"), dummyFrequency);
 
   55    EXPECT_B2ERROR(testClock.
getClockPrescale(Const::EDetector::SVD, 
"sampling"));
 
   58    EXPECT_B2ERROR(testClock.
getClockPrescale(Const::EDetector::ECL, 
"wrongname"));
 
   67    EXPECT_B2ERROR(testClock.
getClockFrequency(Const::EDetector::ARICH, 
"wrongname"));
 
Database object containing the nominal accelerator RF value and the prescales to derive the clock fre...
void setClockFrequency(const Const::EDetector detector, std::string label, double frequency)
Set the frequency value of detector clock not derived from the global clock.
double getClockPrescale(Const::EDetector detector, std::string label) const
Get the prescale factor used to derive a detector clock from the global clock frequency.
bool isPrescaleAvailable(Const::EDetector detector, std::string label) const
Check if the prescale of a clock is available.
double getClockFrequency(Const::EDetector detector, std::string label) const
Get the frequency of a detector clock.
double getAcceleratorRF() const
Get the accelerator RF value.
bool isFrequencyAvailable(Const::EDetector detector, std::string label) const
Check if the frequency of a detector clock is available.
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.
void setAcceleratorRF(double acceleratorRF)
Set the accelerator RF value.
Abstract base class for different kinds of events.