CbmRoot
Loading...
Searching...
No Matches
compareRichDigi.h
Go to the documentation of this file.
1/* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef COMPARERICHDIGI_H
6#define COMPARERICHDIGI_H 1
7
8#include "gtest/gtest.h"
9
10void compareRichDigiDataMembers(CbmRichDigi& test, int32_t address, ECbmModuleId systemid, double time, double tot)
11{
12 int32_t retValInt {-222};
13 double retValDouble {-222.};
15
16 retValInt = test.GetAddress();
17 EXPECT_EQ(address, retValInt);
18
19 retVal = test.GetSystem();
20 EXPECT_EQ(systemid, retVal);
21
22 retValDouble = test.GetTime();
23 EXPECT_FLOAT_EQ(time, retValDouble);
24
25 retValDouble = test.GetCharge();
26 EXPECT_FLOAT_EQ(tot, retValDouble);
27
28 retValDouble = test.GetToT();
29 EXPECT_FLOAT_EQ(tot, retValDouble);
30}
31
32#endif // COMPARERICHDIGI_H
ECbmModuleId
Definition CbmDefs.h:39
@ kNotExist
If not found.
int32_t GetAddress() const
Definition CbmRichDigi.h:43
double GetToT() const
Definition CbmRichDigi.h:78
double GetCharge() const
Charge.
Definition CbmRichDigi.h:56
double GetTime() const
Definition CbmRichDigi.h:72
static ECbmModuleId GetSystem()
System identifier.
Definition CbmRichDigi.h:66
void compareRichDigiDataMembers(CbmRichDigi &test, int32_t address, ECbmModuleId systemid, double time, double tot)