9 #include <UnitTest++.h> 22 CHECK_EQUAL(
baseline, GetBaseline());
29 CHECK_EQUAL(
crateId * 208 + GetModuleNumber() * 16 +
35 CHECK(GetCfdForcedTriggerBit());
45 CHECK(GetCfdTriggerSourceBit());
55 CHECK_EQUAL(
crateId, GetCrateNumber());
60 CHECK_EQUAL(
energy, GetEnergy());
71 CHECK_EQUAL(
ts_high, GetEventTimeHigh());
76 CHECK_EQUAL(
ts_low, GetEventTimeLow());
81 CHECK_EQUAL(
ex_ts_high, GetExternalTimeHigh());
86 CHECK_EQUAL(
ex_ts_low, GetExternalTimeLow());
96 CHECK_ARRAY_EQUAL(
qdc, GetQdc(),
qdc.size());
101 CHECK(IsSaturated());
106 CHECK_EQUAL(
slotId, GetSlotNumber());
111 CHECK_ARRAY_EQUAL(
trace, GetTrace(),
trace.size());
116 CHECK(IsVirtualChannel());
121 CHECK_EQUAL(
ts, GetTime());
165 int main(
int argv,
char *argc[]) {
166 return (UnitTest::RunAllTests());
static bool CompareId(const XiaData *lhs, const XiaData *rhs)
A method that will compare the unique ID of two XiaData classes.
static const bool pileup_bit
static const bool cfd_source_trigger_bit
static const unsigned int ex_ts_high
void SetCrateNumber(const unsigned int &a)
Sets the crate number.
static const unsigned int ts_low
int main(int argv, char *argc[])
static const unsigned int crateId
void SetSlotNumber(const unsigned int &a)
Sets the slot number.
void Clear()
Clear all variables and set them to some default values.
static const std::vector< unsigned int > trace
void SetChannelNumber(const unsigned int &a)
Sets the channel number.
static bool CompareTime(const XiaData *lhs, const XiaData *rhs)
A method that will compare the times of two XiaData classes this method can be used in conjunction wi...
static const unsigned int channelNumber
static const bool virtual_channel
static const std::vector< unsigned int > energy_sums
static const double baseline
static const bool cfd_forced_trigger
static const unsigned int ex_ts_low
static const std::vector< unsigned int > qdc
This header provides sample data that can be used by Unit Tests to ensure proper functionality.
static const bool trace_out_of_range
static const unsigned int slotId
static const unsigned int cfd_fractional_time
static const unsigned int ts_high
TEST_FIXTURE(XiaData, Test_GetBaseline)
void SetTime(const double &a)
Sets the calculated arrival time of the signal.
static const unsigned int energy
TEST(Test_CompareTime)
This will test that the Time for the rhs is greater than the lhs.