Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
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
scouting-demonstrator
scdaq
Commits
d5dc9a46
Commit
d5dc9a46
authored
11 months ago
by
Giovanna Lazzari Miotto
Browse files
Options
Downloads
Patches
Plain Diff
chore: Change orbit count to signed 32-bit
parent
fefe3aca
No related branches found
No related tags found
1 merge request
!103
feature: Introduce VCU128 processors and so much more
Pipeline
#7274749
passed
11 months ago
Stage: check
Stage: build
Stage: run
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/orbit_processor.cc
+6
-4
6 additions, 4 deletions
src/orbit_processor.cc
src/orbit_processor.h
+4
-2
4 additions, 2 deletions
src/orbit_processor.h
with
10 additions
and
6 deletions
src/orbit_processor.cc
+
6
−
4
View file @
d5dc9a46
...
...
@@ -104,9 +104,11 @@ OrbitProcessor::FillOrbitMetadata OrbitProcessor::FillOrbit(orbit_trailer *trail
char
*
wr_ptr
,
const
char
*
rd_end_ptr
,
const
char
*
wr_end_ptr
,
bool
is_dropped_orbit
)
{
std
::
pair
<
uint32_t
,
bool
>
orbit_header
=
std
::
pair
<
uint32_t
,
bool
>
{
ProcessOrbitHeader
(
rd_ptr
)};
uint32_t
orbit
=
uint32_t
{
orbit_header
.
first
};
if
(
orbit
<=
0
)
return
{
0
,
0
,
0
};
std
::
pair
<
uint32_t
,
bool
>
orbit_header
=
ProcessOrbitHeader
(
rd_ptr
);
auto
orbit
=
static_cast
<
int
>
(
orbit_header
.
first
);
if
(
orbit
<=
0
)
{
return
{
0
,
0
,
0
};
}
//.second is the warning test enable bit
rd_ptr
+=
32
;
// +32 to account for orbit header
if
(
cmsswHeaders
)
{
...
...
@@ -141,7 +143,7 @@ OrbitProcessor::FillOrbitMetadata OrbitProcessor::FillOrbit(orbit_trailer *trail
WriteMemRegion
writeable_block
(
&
wr_ptr
,
wr_end_ptr
);
assert
(
writeable_block
.
CheckBounds
(
GetPacketSize
()));
// Max size a decoded block can use
BxMetadata
meta
{
orbit_header
.
second
,
bx
,
orbit
};
BxMetadata
meta
{
orbit_header
.
second
,
static_cast
<
uint32_t
>
(
bx
)
,
orbit
};
const
int
ret_counts
=
ProcessBlock
(
readable_block
,
writeable_block
,
meta
);
if
(
ret_counts
==
-
1
)
{
...
...
This diff is collapsed.
Click to expand it.
src/orbit_processor.h
+
4
−
2
View file @
d5dc9a46
#ifndef ORBIT_PROCESSOR_H
#define ORBIT_PROCESSOR_H
#include
<cassert>
#include
"config.h"
#include
"controls.h"
#include
"format.h"
...
...
@@ -42,7 +44,7 @@ class OrbitProcessor : public Processor {
protected
:
struct
FillOrbitMetadata
{
uint32_t
counts
;
u
int
32_t
orbit
;
int
orbit
;
uint32_t
filled_bxs
;
};
...
...
@@ -67,7 +69,7 @@ class OrbitProcessor : public Processor {
struct
BxMetadata
{
uint32_t
header
;
uint32_t
bx
;
u
int
32_t
orbit
;
int
orbit
;
};
template
<
typename
T
,
uint32_t
N
>
...
...
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