1 #include "CbmDetectorList.h"
2 #include "CbmTrdDetectorId.h"
4 #include "gtest/gtest-spi.h"
5 #include "gtest/gtest.h"
8 CbmTrdDetectorId fTrdId;
16 Int_t detInfo_array[6] = {
17 system, station, layer, moduleType, moduleNr, sector};
19 Int_t retVal = fTrdId.SetDetectorInfo(detInfo_array);
22 detInfo_array[0] =
kTRD;
29 retVal = fTrdId.SetDetectorInfo(detInfo_array);
39 retVal = fTrdId.SetDetectorInfo(detInfo_array);
40 EXPECT_EQ(32, retVal);
49 retVal = fTrdId.SetDetectorInfo(detInfo_array);
50 EXPECT_EQ(512, retVal);
59 retVal = fTrdId.SetDetectorInfo(detInfo_array);
60 EXPECT_EQ(4096, retVal);
69 retVal = fTrdId.SetDetectorInfo(detInfo_array);
70 EXPECT_EQ(131072, retVal);
79 retVal = fTrdId.SetDetectorInfo(detInfo_array);
80 EXPECT_EQ(33554432, retVal);
82 detInfo_array[0] =
kTRD;
89 retVal = fTrdId.SetDetectorInfo(detInfo_array);
90 EXPECT_EQ(33690149, retVal);
92 detInfo_array[0] =
kTRD;
96 detInfo_array[4] = 34;
99 retVal = fTrdId.SetDetectorInfo(detInfo_array);
100 EXPECT_EQ(105129573, retVal);
102 detInfo_array[0] = 0;
103 detInfo_array[1] = 0;
104 detInfo_array[2] = 0;
105 detInfo_array[3] = 8;
106 detInfo_array[4] = 0;
107 detInfo_array[5] = 0;
109 retVal = fTrdId.SetDetectorInfo(detInfo_array);
110 EXPECT_EQ(32768, retVal);
112 detInfo_array[0] =
kTRD;
113 detInfo_array[1] = 2;
114 detInfo_array[2] = 3;
115 detInfo_array[3] = 5;
116 detInfo_array[4] = 17;
117 detInfo_array[5] = 2;
119 retVal = fTrdId.SetDetectorInfo(detInfo_array);
120 EXPECT_EQ(69359173, retVal);