Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Detector
Manage
Activity
Members
Labels
Plan
Issues
38
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
42
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Detector
Commits
ba1d8b04
Commit
ba1d8b04
authored
1 year ago
by
Louis Henry
Browse files
Options
Downloads
Patches
Plain Diff
Add specific constructor to FTSourceID from a layer and a local bank index in the layer
parent
433720a6
No related branches found
No related tags found
No related merge requests found
Pipeline
#6036589
failed with stages
in 5 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Detector/FT/include/Detector/FT/FTSourceID.h
+12
-0
12 additions, 0 deletions
Detector/FT/include/Detector/FT/FTSourceID.h
with
12 additions
and
0 deletions
Detector/FT/include/Detector/FT/FTSourceID.h
+
12
−
0
View file @
ba1d8b04
...
...
@@ -95,6 +95,18 @@ namespace LHCb::Detector {
shift
<
Mask
::
quarter
>
(
quarter
)
|
shift
<
Mask
::
dataLink
>
(
dataLink
)
|
shift
<
Mask
::
port
>
(
port
);
}
/// Explicit constructor from the layer and the position in the layer
constexpr
FTSourceID
(
FTChannelID
::
StationID
station
,
FTChannelID
::
LayerID
layer
,
unsigned
int
localBankIdx_layer
)
{
auto
quarter
=
FTChannelID
::
QuarterID
{
localBankIdx_layer
/
FTConstants
::
RawBank
::
BankProperties
::
NbBanksPerQuarter
};
unsigned
int
iBankInQuarter
=
localBankIdx_layer
%
FTConstants
::
RawBank
::
BankProperties
::
NbBanksPerQuarter
;
unsigned
int
dataLink
=
(
iBankInQuarter
==
0
)
?
0
:
1
+
(
iBankInQuarter
-
1
)
/
2
;
unsigned
int
port
=
(
iBankInQuarter
==
0
)
?
0
:
iBankInQuarter
-
1
%
2
;
unsigned
int
sourceHeader
=
is_left
(
quarter
)
?
LHCb
::
Detector
::
FT
::
RawBank
::
leftHeader
:
LHCb
::
Detector
::
FT
::
RawBank
::
rightHeader
;
m_sourceID
=
shift
<
Mask
::
header
>
(
sourceHeader
)
|
shift
<
Mask
::
station
>
(
station
)
|
shift
<
Mask
::
layer
>
(
layer
)
|
shift
<
Mask
::
quarter
>
(
quarter
)
|
shift
<
Mask
::
dataLink
>
(
dataLink
)
|
shift
<
Mask
::
port
>
(
port
);
}
/// Explicit constructor from geometrical location string
/// Assumes a 'name' formatted as TxLxQxDxPx
constexpr
FTSourceID
(
std
::
string_view
name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment