Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
KM3io.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
common
KM3io.jl
Commits
ab629ca8
Verified
Commit
ab629ca8
authored
1 year ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Docs update
parent
efa2db8f
No related branches found
Branches containing commit
No related tags found
1 merge request
!15
DAQ tools
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/src/api.md
+7
-3
7 additions, 3 deletions
docs/src/api.md
docs/src/manual/rootfiles.md
+80
-6
80 additions, 6 deletions
docs/src/manual/rootfiles.md
src/KM3io.jl
+3
-1
3 additions, 1 deletion
src/KM3io.jl
with
90 additions
and
10 deletions
docs/src/api.md
+
7
−
3
View file @
ab629ca8
...
...
@@ -28,9 +28,9 @@ EventHeader
SnapshotHit
TriggeredHit
UTCTime
UTC
Time
Extended
Summary
S
lice
Summary
S
liceHeader
UTCExtended
Summary
s
lice
Summary
s
liceHeader
SummaryFrame
```
...
...
@@ -38,6 +38,7 @@ SummaryFrame
```
@docs
H5File
H5CompoundDataset
create_dataset
```
## Hardware
...
...
@@ -119,6 +120,9 @@ hasudptrailer
count_active_channels
count_fifostatus
count_hrvstatus
status
number_of_udp_packets_received
maximal_udp_sequence_number
```
### Reconstruction
...
...
This diff is collapsed.
Click to expand it.
docs/src/manual/rootfiles.md
+
80
−
6
View file @
ab629ca8
...
...
@@ -145,9 +145,7 @@ accessed, similar to the offline access. In the examples below, we use
access to small sample files.
```
julia
julia
>
using
KM3io
julia
>
using
KM3NeTTestData
julia
>
using
KM3io
,
KM3NeTTestData
julia
>
f
=
ROOTFile
(
datapath
(
"online"
,
"km3net_online.root"
))
ROOTFile
{
OnlineTree
(
3
events
,
3
summaryslices
),
OfflineTree
(
0
events
)}
...
...
@@ -183,13 +181,15 @@ high amount of data, the storage of timeslices is usually reduced by a factor of
10-100 after the event triggering stage. However, summaryslices are covering the
full data taking period. They however do not contain hit data but only the rates
of the PMTs encoded into a single byte, which therefore is only capable to store
256 different values. The actual rate is calcuated by a helper function (TODO).
256 different values. The actual rate is calcuated by the helper functions
`pmtrate()`
and
`pmtrates()`
which take a
`SummaryFrame`
and optionally a PMT
channel ID as arguments.
The summaryslices are accessible using the
`.summaryslices`
attribute of the
`OnlineTree`
instance, which again is hidden behind the
`.online`
field of a
`ROOTFile`
:
```
julia
julia
>
using
KM3io
,
UnROOT
,
KM3NeTTestData
julia
>
using
KM3io
,
KM3NeTTestData
julia
>
f
=
ROOTFile
(
datapath
(
"online"
,
"km3net_online.root"
))
ROOTFile
{
OnlineTree
(
3
events
,
3
summaryslices
),
OfflineTree
(
0
events
)}
...
...
@@ -205,7 +205,81 @@ s.header = KM3io.SummarysliceHeader(44, 6633, 127, KM3io.UTCExtended(0x5dc6018c,
s
.
header
=
KM3io
.
SummarysliceHeader
(
44
,
6633
,
128
,
KM3io
.
UTCExtended
(
0x5dc6018c
,
0x2faf0800
,
false
))
```
Each summaryslice consists of multiple frames, one for every optical module which
has sent data during the recording time of the corresponding timeslice.
!!! note
During run transistions, the number of summaryframes in a summaryslice is fluctuating a lot until
it eventually saturates, usually within a few seconds or minutes. Therefore, it is expected that the
number of summaryframes (i.e. active DOMs) is low at the beginning of the file and stabilises after
a few summaryslices.
To access the actual PMT rates and flags (e.g. for high-rate veto or FIFO
status), the
`s.frames`
can be used (TODO).
status) of a summaryframe, several helper functions exist. Let's grab a summaryslice:
```
@example 2
using KM3io, KM3NeTTestData
f = ROOTFile(datapath("online", "km3net_online.root"))
s = f.online.summaryslices[1]
```
and have a look at one of the frames, the 23rd of the first summaryslice:
```
@example 2
frame = s.frames[23]
```
The White Rabbit status:
```
@example 2
wrstatus(frame)
```
Checking if any of the PMTs is in high rate veto:
```
@example 2
hrvstatus(frame)
```
The number of PMTs in high rate veto:
```
@example 2
count_hrvstatus(frame)
```
Checking if any of the TDC FIFOs were almost full:
```
@example 2
fifostatus(frame)
```
Counting the number of TDCs which had FIFO almost full:
```
@example 2
count_fifostatus(frame)
```
The rates of each individual PMT channel ordered by increasing channel ID:
```
@example 2
pmtrates(frame)
```
Individual PMT parameters can be accessed as well, by passing the summaryframe and
the PMT ID (DAQ channel ID):
```
@example 2
pmtrate(frame, 3)
```
Here is an example of a simple summary output:
```
@example 2
for pmt in 0:30
println("PMT $(pmt): HRV($(hrvstatus(frame, pmt))) FIFO($(fifostatus(frame, pmt)))")
end
```
This diff is collapsed.
Click to expand it.
src/KM3io.jl
+
3
−
1
View file @
ab629ca8
...
...
@@ -27,7 +27,9 @@ export Detector, DetectorModule, PMT, Tripod, Hydrophone, center, isbasemodule
export
Waveform
,
AcousticSignal
,
AcousticsTriggerParameter
,
piezoenabled
,
hydrophoneenabled
# Online dataformat
export
DAQEvent
,
pmtrate
,
pmtrates
,
hrvstatus
,
tdcstatus
,
wrstatus
,
fifostatus
,
hasudptrailer
,
export
DAQEvent
,
EventHeader
,
SnapshotHit
,
UTCTime
,
UTCExtended
,
Summaryslice
,
SummarysliceHeader
,
SummaryFrame
,
pmtrate
,
pmtrates
,
hrvstatus
,
tdcstatus
,
wrstatus
,
fifostatus
,
hasudptrailer
,
count_active_channels
,
count_fifostatus
,
count_hrvstatus
,
status
,
maximal_udp_sequence_number
,
number_of_udp_packets_received
# Offline dataformat
...
...
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