Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Computing
cbmroot
Commits
4af9e3c5
Commit
4af9e3c5
authored
11 months ago
by
Dominik Smith
Committed by
Pierre-Alain Loizeau
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Added YAML-configurable system offset TRD unpacker in cbm::algo.
parent
94fb376c
No related branches found
No related tags found
1 merge request
!1852
Added YAML-configurable system offset TRD unpacker in cbm::algo.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algo/detectors/trd/ReadoutConfig.h
+7
-0
7 additions, 0 deletions
algo/detectors/trd/ReadoutConfig.h
algo/detectors/trd/Unpack.cxx
+1
-2
1 addition, 2 deletions
algo/detectors/trd/Unpack.cxx
with
8 additions
and
2 deletions
algo/detectors/trd/ReadoutConfig.h
+
7
−
0
View file @
4af9e3c5
...
@@ -87,7 +87,13 @@ namespace cbm::algo::trd
...
@@ -87,7 +87,13 @@ namespace cbm::algo::trd
void
Init
(
const
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
size_t
>>>&
addressMap
,
void
Init
(
const
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
size_t
>>>&
addressMap
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
size_t
>>>>&
channelMap
);
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
size_t
>>>>&
channelMap
);
/** @brief Get system time offset **/
int64_t
GetSystemTimeOffset
()
{
return
fSystemTimeOffset
;
};
private
:
private
:
// --- System time offset
int64_t
fSystemTimeOffset
=
0
;
// --- TRD readout map
// --- TRD readout map
// --- Map index: (equipment, crob, elink), map value: (ASIC address)
// --- Map index: (equipment, crob, elink), map value: (ASIC address)
std
::
map
<
uint16_t
,
std
::
vector
<
std
::
vector
<
uint16_t
>>>
fReadoutMap
=
{};
//!
std
::
map
<
uint16_t
,
std
::
vector
<
std
::
vector
<
uint16_t
>>>
fReadoutMap
=
{};
//!
...
@@ -100,6 +106,7 @@ namespace cbm::algo::trd
...
@@ -100,6 +106,7 @@ namespace cbm::algo::trd
std
::
map
<
uint32_t
,
std
::
vector
<
int32_t
>>
fElinkTimeOffsetMap
;
std
::
map
<
uint32_t
,
std
::
vector
<
int32_t
>>
fElinkTimeOffsetMap
;
CBM_YAML_PROPERTIES
(
CBM_YAML_PROPERTIES
(
yaml
::
Property
(
&
ReadoutConfig
::
fSystemTimeOffset
,
"timeOffset"
,
"System time offset for TRD1D"
),
yaml
::
Property
(
&
ReadoutConfig
::
fReadoutMap
,
"readoutMap"
,
"TRD readout map"
,
{},
YAML
::
Hex
),
yaml
::
Property
(
&
ReadoutConfig
::
fReadoutMap
,
"readoutMap"
,
"TRD readout map"
,
{},
YAML
::
Hex
),
yaml
::
Property
(
&
ReadoutConfig
::
fChannelMap
,
"channelMap"
,
"TRD channel map"
),
yaml
::
Property
(
&
ReadoutConfig
::
fChannelMap
,
"channelMap"
,
"TRD channel map"
),
yaml
::
Property
(
&
ReadoutConfig
::
fElinkTimeOffsetMap
,
"elinkTimeOffset"
,
"TRD time offset per CRI&Elink combination"
)
yaml
::
Property
(
&
ReadoutConfig
::
fElinkTimeOffsetMap
,
"elinkTimeOffset"
,
"TRD time offset per CRI&Elink combination"
)
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/trd/Unpack.cxx
+
1
−
2
View file @
4af9e3c5
...
@@ -11,7 +11,6 @@ using fles::Subsystem;
...
@@ -11,7 +11,6 @@ using fles::Subsystem;
Unpack
::
Unpack
(
const
ReadoutConfig
&
readout
)
:
fReadout
(
readout
)
Unpack
::
Unpack
(
const
ReadoutConfig
&
readout
)
:
fReadout
(
readout
)
{
{
constexpr
i64
SystemTimeOffset
=
1300
;
constexpr
std
::
array
<
u8
,
2
>
SystemVersion
=
{
0x01
,
0x10
};
constexpr
std
::
array
<
u8
,
2
>
SystemVersion
=
{
0x01
,
0x10
};
// Create one algorithm per component for TRD and configure it with parameters
// Create one algorithm per component for TRD and configure it with parameters
...
@@ -29,7 +28,7 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout)
...
@@ -29,7 +28,7 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout)
auto
addresses
=
fReadout
.
Map
(
equip
,
crob
,
elink
);
auto
addresses
=
fReadout
.
Map
(
equip
,
crob
,
elink
);
elinkPar
.
fAddress
=
addresses
.
first
;
// Asic address for this elink
elinkPar
.
fAddress
=
addresses
.
first
;
// Asic address for this elink
elinkPar
.
fChanAddress
=
addresses
.
second
;
// Channel addresses for this elink
elinkPar
.
fChanAddress
=
addresses
.
second
;
// Channel addresses for this elink
elinkPar
.
fTimeOffset
=
SystemTimeOffset
+
fReadout
.
GetElinkTimeOffset
(
crob
,
elink
);
elinkPar
.
fTimeOffset
=
fReadout
.
Get
SystemTimeOffset
()
+
fReadout
.
GetElinkTimeOffset
(
crob
,
elink
);
crobPar
.
fElinkParams
.
push_back
(
elinkPar
);
crobPar
.
fElinkParams
.
push_back
(
elinkPar
);
}
}
par
.
fCrobParams
.
push_back
(
crobPar
);
par
.
fCrobParams
.
push_back
(
crobPar
);
...
...
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