Project
Loading...
Searching...
No Matches
ZDCWaveform.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#ifndef ZDC_WAVEFORM_H
13#define ZDC_WAVEFORM_H
14
15#include "ZDCBase/Constants.h"
16#include <array>
17#include <cmath>
18#include <Rtypes.h>
19
23
24namespace o2
25{
26namespace zdc
27{
28
30
31 uint8_t sig = 0;
32 float inter[NTimeBinsPerBC * TSN] = {0};
33
34 ZDCWaveform() = default;
35
36 ZDCWaveform(uint8_t mych, float* waveform)
37 {
38 set(mych, waveform);
39 }
40
41 inline void set(uint8_t ch, float* waveform)
42 {
43 sig = ch;
44 for (int i = 0; i < (NTimeBinsPerBC * TSN); i++) {
45 inter[i] = waveform[i];
46 }
47 }
48
49 const float* waveform() const
50 {
51 return inter;
52 }
53
54 int ch() const
55 {
56 return sig;
57 }
58
59 void print() const;
60
62};
63} // namespace zdc
64} // namespace o2
65
66#endif
int32_t i
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
constexpr int NTimeBinsPerBC
Definition Constants.h:53
constexpr int TSN
Definition Constants.h:94
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
float inter[NTimeBinsPerBC *TSN]
Signal id.
Definition ZDCWaveform.h:32
ZDCWaveform(uint8_t mych, float *waveform)
Definition ZDCWaveform.h:36
void set(uint8_t ch, float *waveform)
Definition ZDCWaveform.h:41
const float * waveform() const
Definition ZDCWaveform.h:49
ClassDefNV(ZDCWaveform, 1)