CbmRoot
Loading...
Searching...
No Matches
comparePsdDigi.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 COMPAREPSDDIGI_H
6#define COMPAREPSDDIGI_H 1
7
8#include "gtest/gtest.h"
9
10void comparePsdDigiDataMembers(CbmPsdDigi& test, int32_t address, ECbmModuleId systemid, double time, double edep)
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(edep, retValDouble);
27
28 retValDouble = test.GetEdep();
29 EXPECT_FLOAT_EQ(edep, retValDouble);
30}
31
32#endif // COMPAREPSDDIGI_H
ECbmModuleId
Definition CbmDefs.h:39
@ kNotExist
If not found.
Data class for PSD digital information.
Definition CbmPsdDigi.h:36
double GetEdep() const
Energy deposit.
Definition CbmPsdDigi.h:119
double GetTime() const
Time.
Definition CbmPsdDigi.h:105
uint32_t GetAddress() const
Address.
Definition CbmPsdDigi.h:93
double GetCharge() const
Charge.
Definition CbmPsdDigi.h:113
static ECbmModuleId GetSystem()
System identifier.
Definition CbmPsdDigi.h:137
void comparePsdDigiDataMembers(CbmPsdDigi &test, int32_t address, ECbmModuleId systemid, double time, double edep)