CbmRoot
Loading...
Searching...
No Matches
compareMuchDigi.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 COMPAREMUCHDIGI_H
6
#define COMPAREMUCHDIGI_H 1
7
8
#include "gtest/gtest.h"
9
10
void
compareMuchDigiDataMembers
(
CbmMuchDigi
& test, int32_t address,
ECbmModuleId
systemid, uint64_t time,
11
int32_t charge)
12
{
13
int32_t retValInt {-222};
14
double
retValDouble {-222.};
15
ECbmModuleId
retVal {
ECbmModuleId::kNotExist
};
16
17
retValInt = test.
GetAddress
();
18
EXPECT_EQ(address, retValInt);
19
20
retVal = test.
GetSystem
();
21
EXPECT_EQ(systemid, retVal);
22
23
retValDouble = test.
GetTime
();
24
EXPECT_FLOAT_EQ(
static_cast<
double
>
(time), retValDouble);
25
26
retValDouble = test.
GetCharge
();
27
EXPECT_EQ(
static_cast<
double
>
(charge), retValDouble);
28
29
retValInt = test.
GetAdc
();
30
EXPECT_EQ(charge, retValInt);
31
}
32
33
#endif
// COMPAREMUCHDIGI_H
ECbmModuleId
ECbmModuleId
Definition
CbmDefs.h:39
ECbmModuleId::kNotExist
@ kNotExist
If not found.
CbmMuchDigi
Definition
CbmMuchDigi.h:37
CbmMuchDigi::GetCharge
double GetCharge() const
Charge.
Definition
CbmMuchDigi.h:69
CbmMuchDigi::GetAdc
uint16_t GetAdc() const
Definition
CbmMuchDigi.h:90
CbmMuchDigi::GetAddress
int32_t GetAddress() const
Definition
CbmMuchDigi.h:93
CbmMuchDigi::GetTime
double GetTime() const
Definition
CbmMuchDigi.h:94
CbmMuchDigi::GetSystem
static ECbmModuleId GetSystem()
Definition
CbmMuchDigi.h:75
compareMuchDigiDataMembers
void compareMuchDigiDataMembers(CbmMuchDigi &test, int32_t address, ECbmModuleId systemid, uint64_t time, int32_t charge)
Definition
compareMuchDigi.h:10
core
data
test
much
compareMuchDigi.h
Generated on Sun Dec 22 2024 23:04:09 for CbmRoot by
1.12.0