Project
Loading...
Searching...
No Matches
HeartbeatFrame.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12//-*- Mode: C++ -*-
13
14#ifndef ALICEO2_HEADER_HEARTBEATFRAME_H
15#define ALICEO2_HEADER_HEARTBEATFRAME_H
16
17// @file Heartbeatframe.h
18// @author Matthias Richter
19// @since 2017-02-02
20// @brief Definition of the heartbeat frame layout
21
22#include "Headers/DataHeader.h"
23#include <functional>
24#include <map>
25#include <vector>
26
27namespace o2
28{
29namespace header
30{
31
32// The Heartbeat frame layout is specified in
33// http://svnweb.cern.ch/world/wsvn/alicetdrrun3/Notes/Run34SystemNote/detector-read-alice/ALICErun34_readout.pdf
34// TODO: replace citation with correct ALICE note reference when published
35
36// general remark:
37// at the moment its not clear how the heartbeat frame is transmitted in AliceO2.
38// Current understanding is that the heartbeat header and trailer embed some detector
39// data and form the heartbeat frame. The detector data is the payload which is going
40// to be sent as the payload of the O2 data packet. The HBH and HBT must be stripped
41// from the payload and probably be added to the header stack and later on be stripped
42// from there as well during the accumulation of subtimeframes and timeframes as the
43// HB information should be identical in the (sub)timeframes
44
45// define the data type id for the heartbeat frame
46// check if this is the correct term, we probably won't send what is referred to be
47// the heartbeat frame (composition of HBH - detector payload - HBT); instead, the
48// HBH and HBT can be added to the header stack
50
52 union {
53 // the complete 64 bit header word, initialize with blockType 1 and size 1
54 uint64_t headerWord = 0x1100000000000000;
55 struct {
56 // bit 0 to 31: orbit number
58 // bit 32 to 43: bunch crossing id
60 // bit 44 to 47: reserved
62 // bit 48 to 51: trigger type
64 // bit 52 to 55: reserved
66 // bit 56 to 59: header length
68 // bit 60 to 63: block type (=1 HBF/trigger Header)
70 };
71 }; // end union
72
73 operator bool() const { return headerWord != 0 && blockType == 0x1; }
74
75 bool operator<(const HeartbeatHeader& other) const
76 {
77 return this->orbit < other.orbit;
78 }
79
80 operator uint64_t() const { return headerWord; }
81};
82static_assert(sizeof(HeartbeatHeader) == 8, "Heartbeat header must be 64bit");
83
85 union {
86 // the complete 64 bit trailer word, initialize with blockType 5 and size 1
87 uint64_t trailerWord = 0x5100000000000000;
88 struct {
89 // bit 0 to 31: data length in words
91 // bit 32 to 52: detector specific status words
93 // bit 53: =1 in case a new physics trigger arrived within read-out period
95 // bit 54: =0 HBF correctly transmitted
97 // bit 55: =1 HBa/0 HBr received
99 // bit 56 to 59: trailer length
101 // bit 60 to 63: block type (=5 HBF Trailer)
103 };
104 }; // end union
105
106 operator bool() const { return trailerWord != 0 && blockType == 0x5; }
107
108 operator uint64_t() const { return trailerWord; }
109};
110static_assert(sizeof(HeartbeatTrailer) == 8, "Heartbeat trailer must be 64bit");
111
112// composite struct for the HBH and HBT which are the envelope for the payload
113// in the heartbeat frame
114// TODO: check if the copying of header and trailer can be avoided if references
115// are used in a temporary object inserted to the header stack
131
132// a statistics data block for heartbeat frames
133// it transmits real time as the payload of the HB frame in AliceO2
134// eventually to be dropped later, its intended for the first experimental work
136 // time tick when this statistics was created
138 // difference to the previous time tick
140
142};
143
144}; // namespace header
145}; // namespace o2
146#endif
unsigned short int uint16_t
std::vector< std::string > header
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc bool
Class for time synchronization of RawReader instances.
const o2::header::DataDescription gDataDescriptionHeartbeatFrame
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
the base header struct Every header type must begin (i.e. derive) with this. Don't use this struct di...
Definition DataHeader.h:354
HeartbeatFrameEnvelope(const HeartbeatHeader &h, const HeartbeatTrailer &t)
static const o2::header::SerializationMethod sSerializationMethod
static const o2::header::HeaderType sHeaderType
bool operator<(const HeartbeatHeader &other) const
VectorOfTObjectPtrs other