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
40dc7ac4
Commit
40dc7ac4
authored
10 months ago
by
Dominik Smith
Committed by
Pierre-Alain Loizeau
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Added YAML-configurable system offset TRD2D unpacker in cbm::algo.
parent
71ad1331
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1851
Added YAML-configurable system offset TRD2D unpacker in cbm::algo.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
algo/detectors/trd2d/ReadoutConfig.h
+8
-1
8 additions, 1 deletion
algo/detectors/trd2d/ReadoutConfig.h
algo/detectors/trd2d/Unpack.cxx
+5
-6
5 additions, 6 deletions
algo/detectors/trd2d/Unpack.cxx
with
13 additions
and
7 deletions
algo/detectors/trd2d/ReadoutConfig.h
+
8
−
1
View file @
40dc7ac4
...
@@ -108,7 +108,13 @@ namespace cbm::algo::trd2d
...
@@ -108,7 +108,13 @@ namespace cbm::algo::trd2d
void
InitChannelMap
(
void
InitChannelMap
(
const
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
tuple
<
int32_t
,
bool
,
uint64_t
>>>>&
channelMap
);
const
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
map
<
size_t
,
std
::
tuple
<
int32_t
,
bool
,
uint64_t
>>>>&
channelMap
);
/** @brief Get system time offset **/
int64_t
GetSystemTimeOffset
()
{
return
fSystemTimeOffset
;
};
private
:
private
:
// --- System time offset
int64_t
fSystemTimeOffset
=
0
;
// --- TRD2D readout map
// --- TRD2D readout map
// --- Map index: (equipment), map value: (module id, crob id)
// --- Map index: (equipment), map value: (module id, crob id)
std
::
map
<
uint16_t
,
CompMapping
>
fReadoutMap
=
{};
//!
std
::
map
<
uint16_t
,
CompMapping
>
fReadoutMap
=
{};
//!
...
@@ -117,7 +123,8 @@ namespace cbm::algo::trd2d
...
@@ -117,7 +123,8 @@ namespace cbm::algo::trd2d
// --- Map index: (equipment, asic, chan), map value: (pad address, mask flag, daq offset)
// --- Map index: (equipment, asic, chan), map value: (pad address, mask flag, daq offset)
std
::
map
<
uint16_t
,
std
::
vector
<
std
::
vector
<
ChanMapping
>>>
fChannelMap
=
{};
//!
std
::
map
<
uint16_t
,
std
::
vector
<
std
::
vector
<
ChanMapping
>>>
fChannelMap
=
{};
//!
CBM_YAML_PROPERTIES
(
yaml
::
Property
(
&
ReadoutConfig
::
fReadoutMap
,
"readoutMap"
,
"Maps equipment to module and CROB ID"
,
CBM_YAML_PROPERTIES
(
yaml
::
Property
(
&
ReadoutConfig
::
fSystemTimeOffset
,
"timeOffset"
,
"System time offset for TRD2D"
),
yaml
::
Property
(
&
ReadoutConfig
::
fReadoutMap
,
"readoutMap"
,
"Maps equipment to module and CROB ID"
,
YAML
::
Hex
),
YAML
::
Hex
),
yaml
::
Property
(
&
ReadoutConfig
::
fChannelMap
,
"channelMap"
,
yaml
::
Property
(
&
ReadoutConfig
::
fChannelMap
,
"channelMap"
,
"Maps equipment, ASIC and channel to pad address, R pairing flag and DAQ offset"
,
"Maps equipment, ASIC and channel to pad address, R pairing flag and DAQ offset"
,
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/trd2d/Unpack.cxx
+
5
−
6
View file @
40dc7ac4
...
@@ -11,8 +11,7 @@ using fles::Subsystem;
...
@@ -11,8 +11,7 @@ using fles::Subsystem;
Unpack
::
Unpack
(
const
ReadoutConfig
&
readout
)
:
fReadout
(
readout
)
Unpack
::
Unpack
(
const
ReadoutConfig
&
readout
)
:
fReadout
(
readout
)
{
{
constexpr
i64
SystemTimeOffset
=
-
510
;
constexpr
u8
SystemVersion
=
0x02
;
constexpr
u8
SystemVersion
=
0x02
;
// Create one algorithm per component for TRD and configure it with parameters
// Create one algorithm per component for TRD and configure it with parameters
auto
equipIdsTrd2d
=
fReadout
.
GetEquipmentIds
();
auto
equipIdsTrd2d
=
fReadout
.
GetEquipmentIds
();
...
@@ -33,10 +32,10 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout)
...
@@ -33,10 +32,10 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout)
chanPar
.
fDaqOffset
=
pars
.
daqOffset
;
// Time calibration parameter
chanPar
.
fDaqOffset
=
pars
.
daqOffset
;
// Time calibration parameter
asicPar
.
fChanParams
.
push_back
(
chanPar
);
asicPar
.
fChanParams
.
push_back
(
chanPar
);
}
}
auto
comppars
=
fReadout
.
CompMap
(
equip
);
auto
comppars
=
fReadout
.
CompMap
(
equip
);
par
.
fSystemTimeOffset
=
SystemTimeOffset
;
par
.
fSystemTimeOffset
=
fReadout
.
Get
SystemTimeOffset
()
;
par
.
fModId
=
comppars
.
moduleId
;
par
.
fModId
=
comppars
.
moduleId
;
par
.
fCrobId
=
comppars
.
crobId
;
par
.
fCrobId
=
comppars
.
crobId
;
par
.
fAsicParams
.
push_back
(
asicPar
);
par
.
fAsicParams
.
push_back
(
asicPar
);
}
}
auto
algo
=
std
::
make_unique
<
UnpackMS
>
(
par
);
auto
algo
=
std
::
make_unique
<
UnpackMS
>
(
par
);
...
...
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