CbmRoot
_GTestCbmPsdAddress.cxx
Go to the documentation of this file.
1 #include "CbmPsdAddress.h"
2 
3 #include "gtest/gtest-spi.h"
4 #include "gtest/gtest.h"
5 
6 #include "comparePsdAddress.h"
7 
8 TEST(_GTestCbmPsdAddress, CheckAddress) {
9  Int_t moduleid {1};
10  Int_t sectionid {0};
11  Int_t address {24};
12 
14  address, ECbmModuleId::kPsd, moduleid, sectionid);
15 
16  moduleid = 0;
17  sectionid = 1;
18  address = 1032;
19 
21  address, ECbmModuleId::kPsd, moduleid, sectionid);
22 
23  moduleid = 5;
24  sectionid = 5;
25  address = 5208;
26 
28  address, ECbmModuleId::kPsd, moduleid, sectionid);
29 }
30 
31 TEST(_GTestCbmPsdAddress, CheckSetModuleId) {
32  Int_t moduleid {1};
33  Int_t sectionid {0};
34  Int_t address {24};
35 
37  address, ECbmModuleId::kPsd, moduleid, sectionid);
38 
39  EXPECT_EQ(88, CbmPsdAddress::SetModuleId(24, 5));
40 }
41 
42 TEST(_GTestCbmPsdAddress, CheckSetSectionId) {
43  Int_t moduleid {1};
44  Int_t sectionid {0};
45  Int_t address {24};
46 
48  address, ECbmModuleId::kPsd, moduleid, sectionid);
49 
50  EXPECT_EQ(5144, CbmPsdAddress::SetSectionId(24, 5));
51 }
TEST
TEST(_GTestCbmPsdAddress, CheckAddress)
Definition: _GTestCbmPsdAddress.cxx:8
CbmPsdAddress.h
CbmPsdAddress::SetModuleId
static UInt_t SetModuleId(UInt_t address, Int_t newModuleId)
Set new module ID for address.
Definition: CbmPsdAddress.h:81
CbmPsdAddress::SetSectionId
static UInt_t SetSectionId(UInt_t address, Int_t newSectionId)
Set new section ID for address.
Definition: CbmPsdAddress.h:92
comparePsdAddressDataMembers
void comparePsdAddressDataMembers(Int_t address, ECbmModuleId systemid, Int_t moduleid, Int_t sectionid)
Definition: comparePsdAddress.h:4
comparePsdAddress.h
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.