Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LHCb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
LHCb
Commits
dc28da25
Commit
dc28da25
authored
2 months ago
by
Sebastien Ponce
Committed by
Christopher Rob Jones
4 weeks ago
Browse files
Options
Downloads
Patches
Plain Diff
Adapt python code to new ROOT and its different handling of std::byte
parent
f8e979f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!4987
Ignore: merge master into run5 branch
,
!4900
Adaptations for LCG106
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DAQ/DAQSys/scripts/mdfdump.py
+7
-4
7 additions, 4 deletions
DAQ/DAQSys/scripts/mdfdump.py
with
7 additions
and
4 deletions
DAQ/DAQSys/scripts/mdfdump.py
+
7
−
4
View file @
dc28da25
...
...
@@ -16,6 +16,7 @@ from pprint import pformat
import
cppyy
import
cppyy.ll
import
GaudiPython
import
numpy
as
np
from
DDDB.CheckDD4Hep
import
UseDD4Hep
from
PRConfig.TestFileDB
import
test_file_db
...
...
@@ -74,7 +75,11 @@ def events(appmgr):
def
_RawBank_bytes
(
self
):
"""
Return the RawBank payload as a bytes object.
"""
data
=
bytes
(
self
.
range
[
cppyy
.
gbl
.
std
.
byte
]())
data
=
bytes
(
np
.
frombuffer
(
self
.
range
[
cppyy
.
gbl
.
std
.
byte
]().
data
(),
dtype
=
np
.
uint8
,
count
=
self
.
size
()
)
)
assert
len
(
data
)
==
self
.
size
()
return
data
...
...
@@ -82,9 +87,7 @@ def _RawBank_bytes(self):
def
_RawBank_padding
(
self
):
"""
Return the padding bytes in a raw bank.
"""
full_data_size
=
self
.
totalSize
()
-
self
.
hdrSize
()
# incl. padding bytes
data
=
cppyy
.
ll
.
cast
[
"
std::byte*
"
](
self
.
data
())
data
.
reshape
((
full_data_size
,))
data
=
bytes
(
data
)
data
=
bytes
(
np
.
frombuffer
(
self
.
data
(),
dtype
=
np
.
uint8
,
count
=
full_data_size
))
return
data
[
self
.
size
()
:]
...
...
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