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
61ae7c2e
Commit
61ae7c2e
authored
4 months ago
by
Pierre-Alain Loizeau
Browse files
Options
Downloads
Patches
Plain Diff
[online] add SystemTimeOffset parameter for BMon unpacker
parent
0f87a54d
No related branches found
No related tags found
1 merge request
!1969
Add more time offsets to parameters of online unpackers for BMon and TOF
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/detectors/bmon/ReadoutConfig.cxx
+2
-0
2 additions, 0 deletions
algo/detectors/bmon/ReadoutConfig.cxx
algo/detectors/bmon/ReadoutConfig.h
+16
-2
16 additions, 2 deletions
algo/detectors/bmon/ReadoutConfig.h
algo/detectors/bmon/Unpack.cxx
+2
-1
2 additions, 1 deletion
algo/detectors/bmon/Unpack.cxx
with
20 additions
and
3 deletions
algo/detectors/bmon/ReadoutConfig.cxx
+
2
−
0
View file @
61ae7c2e
...
...
@@ -79,6 +79,8 @@ namespace cbm::algo::bmon
void
ReadoutConfig
::
Init
(
const
ReadoutSetup
&
pars
)
{
fTimeOffset
=
pars
.
timeOffset
;
// Constructing the map (equipmentId, eLink, channel) -> (TOF address)
const
uint32_t
numChanPerComp
=
pars
.
NChansPerComponent
();
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/bmon/ReadoutConfig.h
+
16
−
2
View file @
61ae7c2e
...
...
@@ -16,6 +16,10 @@
namespace
cbm
::
algo
::
bmon
{
/**
* @brief Readout setup / Hardware cabling for BMon
* Used to create the hardware mapping for the BMon unpacker.
*/
struct
ReadoutSetup
{
struct
CROB
{
...
...
@@ -30,9 +34,10 @@ namespace cbm::algo::bmon
yaml
::
Property
(
&
CROB
::
rpcType
,
"rpcType"
,
"add explanation."
),
yaml
::
Property
(
&
CROB
::
rpcSide
,
"rpcSide"
,
"add explanation."
),
yaml
::
Property
(
&
CROB
::
nRPC
,
"nRPC"
,
"number of RPCs."
),
yaml
::
Property
(
&
CROB
::
timeOffset
,
"timeOffset"
,
"time offset for CROB"
));
yaml
::
Property
(
&
CROB
::
timeOffset
,
"timeOffset"
,
"time offset for CROB"
));
};
i32
timeOffset
;
i32
nFebsPerComponent
;
i32
nAsicsPerFeb
;
i32
nChannelsPerAsic
;
...
...
@@ -40,7 +45,8 @@ namespace cbm::algo::bmon
std
::
vector
<
CROB
>
crobs
;
std
::
vector
<
u16
>
eqIds
;
CBM_YAML_PROPERTIES
(
yaml
::
Property
(
&
ReadoutSetup
::
nFebsPerComponent
,
"nFebsPerComponent"
,
"Number of FEBs per component"
),
CBM_YAML_PROPERTIES
(
yaml
::
Property
(
&
ReadoutSetup
::
timeOffset
,
"timeOffset"
,
"Time offset for BMon"
),
yaml
::
Property
(
&
ReadoutSetup
::
nFebsPerComponent
,
"nFebsPerComponent"
,
"Number of FEBs per component"
),
yaml
::
Property
(
&
ReadoutSetup
::
nAsicsPerFeb
,
"nAsicsPerFeb"
,
"Number of ASICs per FEB"
),
yaml
::
Property
(
&
ReadoutSetup
::
nChannelsPerAsic
,
"nChannelsPerAsic"
,
"Number of channels per ASIC"
),
yaml
::
Property
(
&
ReadoutSetup
::
nCrobPerComponent
,
"nCrobPerComponent"
,
"Number of CROBs per component"
),
...
...
@@ -70,6 +76,11 @@ namespace cbm::algo::bmon
/** @brief Destructor **/
virtual
~
ReadoutConfig
();
/** @brief System time offset for BMon
** @return Value of system time offset
**/
i32
TimeOffset
()
const
{
return
fTimeOffset
;
}
/** @brief Equipment in the configuration
** @return Vector of equipment IDs
**/
...
...
@@ -96,6 +107,9 @@ namespace cbm::algo::bmon
int32_t
TimeOffsetMap
(
uint16_t
equipId
,
uint16_t
elink
);
private
:
// --- BMon system time offset
int32_t
fTimeOffset
=
0
;
// --- Bmon elink time offsets
// --- Map index: (equipment, elink), map value: (time offset)
std
::
map
<
uint16_t
,
std
::
vector
<
int32_t
>>
fTimeOffsetMap
=
{};
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/bmon/Unpack.cxx
+
2
−
1
View file @
61ae7c2e
...
...
@@ -12,6 +12,7 @@ using fles::Subsystem;
Unpack
::
Unpack
(
const
ReadoutConfig
&
readout
)
:
fReadout
(
readout
)
{
constexpr
u8
SystemVersion
=
0x00
;
i32
SysTimeOffset
=
fReadout
.
TimeOffset
();
// Create one algorithm per component for Bmon and configure it with parameters
auto
equipIdsBmon
=
fReadout
.
GetEquipmentIds
();
...
...
@@ -21,7 +22,7 @@ Unpack::Unpack(const ReadoutConfig& readout) : fReadout(readout)
for
(
size_t
elink
=
0
;
elink
<
numElinks
;
elink
++
)
{
bmon
::
UnpackElinkPar
elinkPar
;
elinkPar
.
fChannelUId
=
fReadout
.
Map
(
equip
,
elink
);
// Vector of Bmon addresses for this elink
elinkPar
.
fTimeOffset
=
fReadout
.
TimeOffsetMap
(
equip
,
elink
);
// Time offset for this elink
elinkPar
.
fTimeOffset
=
SysTimeOffset
+
fReadout
.
TimeOffsetMap
(
equip
,
elink
);
// Time offset for this elink
par
.
fElinkParams
.
push_back
(
elinkPar
);
}
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