Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LHCb
LHCb
Merge requests
!2997
Tweak UTDecoder
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Tweak UTDecoder
unify-utdecoders
into
master
Overview
8
Commits
2
Pipelines
3
Changes
3
Merged
Gerhard Raven
requested to merge
unify-utdecoders
into
master
4 years ago
Overview
6
Commits
2
Pipelines
3
Changes
3
Expand
add [[nodiscard]]
add constexpr
remove redundant data members
fix clang warning about class vs. struct on Microsoft platforms...
Edited
4 years ago
by
Gerhard Raven
0
0
Merge request reports
Compare
master
version 2
4857fe2a
4 years ago
version 1
159b6950
4 years ago
master (base)
and
latest version
latest version
7d28a586
2 commits,
4 years ago
version 2
4857fe2a
1 commit,
4 years ago
version 1
159b6950
1 commit,
4 years ago
3 files
+
122
−
166
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
UT/UTDAQ/UTDAQ/UTADCWord.h
+
10
−
8
Options
@@ -28,27 +28,29 @@ public:
/** constructer with int
@param value
*/
explicit
UTADCWord
(
unsigned
int
value
)
:
m_value
(
value
)
{}
explicit
constexpr
UTADCWord
(
unsigned
int
value
)
:
m_value
(
value
)
{}
UTADCWord
(
unsigned
int
value
,
unsigned
int
nlane
)
:
m_value
(
value
),
m_lane
(
nlane
){};
constexpr
UTADCWord
(
unsigned
int
value
,
unsigned
int
nlane
)
:
m_value
(
value
),
m_lane
(
nlane
){};
/** The actual value
@return value
*/
unsigned
int
value
()
const
{
return
m_value
;
};
[[
nodiscard
]]
constexpr
unsigned
int
value
()
const
{
return
m_value
;
};
unsigned
int
channelID
()
const
{
[[
nodiscard
]]
constexpr
unsigned
int
channelID
()
const
{
return
(
(
m_value
&
static_cast
<
int
>
(
mask
::
strip
)
)
>>
static_cast
<
int
>
(
bits
::
strip
)
)
+
static_cast
<
int
>
(
bits
::
maxstrip
)
*
m_lane
;
}
unsigned
int
adc
()
const
{
return
(
m_value
&
static_cast
<
int
>
(
mask
::
adc
)
)
>>
static_cast
<
int
>
(
bits
::
adc
);
}
[[
nodiscard
]]
constexpr
unsigned
int
adc
()
const
{
return
(
m_value
&
static_cast
<
int
>
(
mask
::
adc
)
)
>>
static_cast
<
int
>
(
bits
::
adc
);
}
unsigned
int
fracStripBits
()
const
{
return
0
;
}
[[
nodiscard
]]
constexpr
unsigned
int
fracStripBits
()
const
{
return
0
;
}
unsigned
int
pseudoSizeBits
()
const
{
return
0
;
}
[[
nodiscard
]]
constexpr
unsigned
int
pseudoSizeBits
()
const
{
return
0
;
}
bool
hasHighThreshold
()
const
{
return
true
;
}
[[
nodiscard
]]
constexpr
bool
hasHighThreshold
()
const
{
return
true
;
}
/** Operator overloading for stringoutput */
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
const
UTADCWord
&
obj
)
{
return
obj
.
fillStream
(
s
);
}
Loading