Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
km3py
km3io
Commits
d2dfab27
Commit
d2dfab27
authored
5 years ago
by
Zineb Aly
Browse files
Options
Downloads
Patches
Plain Diff
read Head and warn for Header
parent
e91d9b2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Add header readout for offline files. Closes #13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
km3io/offline.py
+2
-1
2 additions, 1 deletion
km3io/offline.py
with
2 additions
and
1 deletion
km3io/offline.py
+
2
−
1
View file @
d2dfab27
import
uproot
import
warnings
# 110 MB based on the size of the largest basket found so far in km3net
BASKET_CACHE_SIZE
=
110
*
1024
**
2
...
...
@@ -336,7 +337,7 @@ class OfflineReader:
print
(
"
{:15s} {}
"
.
format
(
n
.
decode
(
"
utf-8
"
),
x
))
self
.
_header
=
fobj
[
'
Head
'
].
_map_3c_string_2c_string_3e_
if
b
'
Header;1
'
in
fobj
.
keys
():
print
(
'
not yet accessible
'
)
warnings
.
warn
(
"
Your file header has an unsupported format
"
)
return
self
.
_header
...
...
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