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
10
void
comparePsdDigiDataMembers
(
CbmPsdDigi
& test, int32_t address,
ECbmModuleId
systemid,
double
time,
double
edep)
11
{
12
int32_t retValInt {-222};
13
double
retValDouble {-222.};
14
ECbmModuleId
retVal {
ECbmModuleId::kNotExist
};
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
ECbmModuleId
Definition
CbmDefs.h:39
ECbmModuleId::kNotExist
@ kNotExist
If not found.
CbmPsdDigi
Data class for PSD digital information.
Definition
CbmPsdDigi.h:36
CbmPsdDigi::GetEdep
double GetEdep() const
Energy deposit.
Definition
CbmPsdDigi.h:119
CbmPsdDigi::GetTime
double GetTime() const
Time.
Definition
CbmPsdDigi.h:105
CbmPsdDigi::GetAddress
uint32_t GetAddress() const
Address.
Definition
CbmPsdDigi.h:93
CbmPsdDigi::GetCharge
double GetCharge() const
Charge.
Definition
CbmPsdDigi.h:113
CbmPsdDigi::GetSystem
static ECbmModuleId GetSystem()
System identifier.
Definition
CbmPsdDigi.h:137
comparePsdDigiDataMembers
void comparePsdDigiDataMembers(CbmPsdDigi &test, int32_t address, ECbmModuleId systemid, double time, double edep)
Definition
comparePsdDigi.h:10
core
data
test
psd
comparePsdDigi.h
Generated on Sun Dec 22 2024 23:04:09 for CbmRoot by
1.12.0