Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
InttMap.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file InttMap.cc
1
#include "
InttMap.h
"
2
3
bool
InttMap::OnlineComparator::operator()
(
4
struct
InttMap::Online_s
const
&
lhs
,
5
struct
InttMap::Online_s
const
&
rhs
)
const
6
{
7
if
(lhs.
lyr
!= rhs.
lyr
)
8
{
9
return
lhs.
lyr
< rhs.
lyr
;
10
}
11
if
(lhs.
ldr
!= rhs.
ldr
)
12
{
13
return
lhs.
ldr
< rhs.
ldr
;
14
}
15
if
(lhs.
arm
!= rhs.
arm
)
16
{
17
return
lhs.
arm
< rhs.
arm
;
18
}
19
if
(lhs.
chp
!= rhs.
chp
)
20
{
21
return
lhs.
chp
< rhs.
chp
;
22
}
23
if
(lhs.
chn
!= rhs.
chn
)
24
{
25
return
lhs.
chn
< rhs.
chn
;
26
}
27
28
return
false
;
29
}
30
31
bool
InttMap::OnlineWildcardComparator::operator()
(
32
struct
InttMap::Online_s
const
&
lhs
,
33
struct
InttMap::Online_s
const
&
rhs
)
const
34
{
35
if
(lhs.
lyr
==
Wildcard
|| rhs.
lyr
==
Wildcard
)
36
{
37
return
false
;
38
}
39
if
(lhs.
lyr
!= rhs.
lyr
)
40
{
41
return
lhs.
lyr
< rhs.
lyr
;
42
}
43
// if(lhs.lyr != Wildcard && rhs.lyr == Wildcard && lhs.lyr != rhs.lyr)return lhs.lyr < rhs.lyr;
44
45
if
(lhs.
ldr
==
Wildcard
|| rhs.
ldr
==
Wildcard
)
46
{
47
return
false
;
48
}
49
if
(lhs.
ldr
!= rhs.
ldr
)
50
{
51
return
lhs.
ldr
< rhs.
ldr
;
52
}
53
// if(lhs.ldr != Wildcard && rhs.ldr != Wildcard && lhs.ldr != rhs.ldr)return lhs.ldr < rhs.ldr;
54
55
if
(lhs.
arm
==
Wildcard
|| rhs.
arm
==
Wildcard
)
56
{
57
return
false
;
58
}
59
if
(lhs.
arm
!= rhs.
arm
)
60
{
61
return
lhs.
arm
< rhs.
arm
;
62
}
63
// if(lhs.arm != Wildcard && rhs.arm != Wildcard && lhs.arm != rhs.arm)return lhs.arm < rhs.arm;
64
65
if
(lhs.
chp
==
Wildcard
|| rhs.
chp
==
Wildcard
)
66
{
67
return
false
;
68
}
69
if
(lhs.
chp
!= rhs.
chp
)
70
{
71
return
lhs.
chp
< rhs.
chp
;
72
}
73
// if(lhs.chp != Wildcard && rhs.chp != Wildcard && lhs.chp != rhs.chp)return lhs.chp < rhs.chp;
74
75
if
(lhs.
chn
==
Wildcard
|| rhs.
chn
==
Wildcard
)
76
{
77
return
false
;
78
}
79
if
(lhs.
chn
!= rhs.
chn
)
80
{
81
return
lhs.
chn
< rhs.
chn
;
82
}
83
// if(lhs.chn != Wildcard && rhs.chn != Wildcard && lhs.chn != rhs.chn)return lhs.chn < rhs.chn;
84
85
return
false
;
86
}
87
88
bool
InttMap::RawDataComparator::operator()
(
89
struct
InttMap::RawData_s
const
&
lhs
,
90
struct
InttMap::RawData_s
const
&
rhs
)
const
91
{
92
if
(lhs.
pid
!= rhs.
pid
)
93
{
94
return
lhs.
pid
< rhs.
pid
;
95
}
96
if
(lhs.
fee
!= rhs.
fee
)
97
{
98
return
lhs.
fee
< rhs.
fee
;
99
}
100
if
(lhs.
chp
!= rhs.
chp
)
101
{
102
return
lhs.
chp
< rhs.
chp
;
103
}
104
if
(lhs.
chn
!= rhs.
chn
)
105
{
106
return
lhs.
chn
< rhs.
chn
;
107
}
108
109
return
false
;
110
}
111
112
bool
InttMap::RawDataWildcardComparator::operator()
(
113
struct
InttMap::RawData_s
const
&
lhs
,
114
struct
InttMap::RawData_s
const
&
rhs
)
const
115
{
116
if
(lhs.
pid
==
Wildcard
|| rhs.
pid
==
Wildcard
)
117
{
118
return
false
;
119
}
120
if
(lhs.
pid
!= rhs.
pid
)
121
{
122
return
lhs.
pid
< rhs.
pid
;
123
}
124
// if(lhs.pid != Wildcard && rhs.pid != Wildcard && lhs.pid != rhs.pid)return lhs.pid < rhs.pid;
125
126
if
(lhs.
fee
==
Wildcard
|| rhs.
fee
==
Wildcard
)
127
{
128
return
false
;
129
}
130
if
(lhs.
fee
!= rhs.
fee
)
131
{
132
return
lhs.
fee
< rhs.
fee
;
133
}
134
// if(lhs.fee != Wildcard && rhs.fee != Wildcard && lhs.fee != rhs.fee)return lhs.fee < rhs.fee;
135
136
if
(lhs.
chp
==
Wildcard
|| rhs.
chp
==
Wildcard
)
137
{
138
return
false
;
139
}
140
if
(lhs.
chp
!= rhs.
chp
)
141
{
142
return
lhs.
chp
< rhs.
chp
;
143
}
144
// if(lhs.chp != Wildcard && rhs.chp != Wildcard && lhs.chp != rhs.chp)return lhs.chp < rhs.chp;
145
146
if
(lhs.
chn
==
Wildcard
|| rhs.
chn
==
Wildcard
)
147
{
148
return
false
;
149
}
150
if
(lhs.
chn
!= rhs.
chn
)
151
{
152
return
lhs.
chn
< rhs.
chn
;
153
}
154
// if(lhs.chn != Wildcard && rhs.chn != Wildcard && lhs.chn != rhs.chn)return lhs.chn < rhs.chn;
155
156
return
false
;
157
}
158
159
bool
InttMap::OfflineComparator::operator()
(
160
struct
InttMap::Offline_s
const
&
lhs
,
161
struct
InttMap::Offline_s
const
&
rhs
)
const
162
{
163
if
(lhs.
layer
!= rhs.
layer
)
164
{
165
return
lhs.
layer
< rhs.
layer
;
166
}
167
if
(lhs.
ladder_phi
!= rhs.
ladder_phi
)
168
{
169
return
lhs.
ladder_phi
< rhs.
ladder_phi
;
170
}
171
if
(lhs.
ladder_z
!= rhs.
ladder_z
)
172
{
173
return
lhs.
ladder_z
< rhs.
ladder_z
;
174
}
175
if
(lhs.
strip_z
!= rhs.
strip_z
)
176
{
177
return
lhs.
strip_z
< rhs.
strip_z
;
178
}
179
if
(lhs.
strip_phi
!= rhs.
strip_phi
)
180
{
181
return
lhs.
strip_phi
< rhs.
strip_phi
;
182
}
183
184
return
false
;
185
}
186
187
bool
InttMap::OfflineWildcardComparator::operator()
(
188
struct
InttMap::Offline_s
const
&
lhs
,
189
struct
InttMap::Offline_s
const
&
rhs
)
const
190
{
191
if
(lhs.
layer
==
Wildcard
|| rhs.
layer
==
Wildcard
)
192
{
193
return
false
;
194
}
195
if
(lhs.
layer
!= rhs.
layer
)
196
{
197
return
lhs.
layer
< rhs.
layer
;
198
}
199
// if(lhs.layer != Wildcard && rhs.layer != Wildcard && lhs.layer != rhs.layer)return lhs.layer < rhs.layer;
200
201
if
(lhs.
ladder_phi
==
Wildcard
|| rhs.
ladder_phi
==
Wildcard
)
202
{
203
return
false
;
204
}
205
if
(lhs.
ladder_phi
!= rhs.
ladder_phi
)
206
{
207
return
lhs.
ladder_phi
< rhs.
ladder_phi
;
208
}
209
// if(lhs.ladder_phi != Wildcard && rhs.ladder_phi != Wildcard && lhs.ladder_phi != rhs.ladder_phi)return lhs.ladder_phi < rhs.ladder_phi;
210
211
if
(lhs.
ladder_z
==
Wildcard
|| rhs.
ladder_z
==
Wildcard
)
212
{
213
return
false
;
214
}
215
if
(lhs.
ladder_z
!= rhs.
ladder_z
)
216
{
217
return
lhs.
ladder_z
< rhs.
ladder_z
;
218
}
219
// if(lhs.ladder_z != Wildcard && rhs.ladder_z != Wildcard && lhs.ladder_z != rhs.ladder_z)return lhs.ladder_z < rhs.ladder_z;
220
221
if
(lhs.
strip_z
==
Wildcard
|| rhs.
strip_z
==
Wildcard
)
222
{
223
return
false
;
224
}
225
if
(lhs.
strip_z
!= rhs.
strip_z
)
226
{
227
return
lhs.
strip_z
< rhs.
strip_z
;
228
}
229
// if(lhs.strip_z != Wildcard && rhs.strip_z != Wildcard && lhs.strip_z != rhs.strip_z)return lhs.strip_z < rhs.strip_z;
230
231
if
(lhs.
strip_phi
==
Wildcard
|| rhs.
strip_phi
==
Wildcard
)
232
{
233
return
false
;
234
}
235
if
(lhs.
strip_phi
!= rhs.
strip_phi
)
236
{
237
return
lhs.
strip_phi
< rhs.
strip_phi
;
238
}
239
// if(lhs.strip_phi != Wildcard && rhs.strip_phi != Wildcard && lhs.strip_phi != rhs.strip_phi)return lhs.strip_phi < rhs.strip_phi;
240
241
return
false
;
242
}
coresoftware
blob
master
offline
packages
intt
InttMap.cc
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:06
using
1.8.2 with
sPHENIX GitHub integration