Project
Loading...
Searching...
No Matches
FastORTimeSeries.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#ifndef ALICEO2_EMCAL_FASTORTIMESERIES_H
12#define ALICEO2_EMCAL_FASTORTIMESERIES_H
13
14#include <vector>
15#include <gsl/span>
16#include "Rtypes.h"
17
18namespace o2::emcal
19{
20
34{
35 public:
37 FastORTimeSeries() = default;
38
43 FastORTimeSeries(int maxsamples, const gsl::span<const uint16_t> timesamples, uint8_t starttime)
44 {
45 setSize(maxsamples);
46 fillReversed(timesamples, starttime);
47 }
48
50 ~FastORTimeSeries() = default;
51
52 void setTimeSamples(const gsl::span<const uint16_t> timesamples, uint8_t starttime) { fillReversed(timesamples, starttime); }
53
57 uint16_t calculateL1TimeSum(uint8_t l0time) const;
58
61 const gsl::span<const uint16_t> getADCs() const { return mTimeSamples; }
62
64 void clear();
65
66 private:
69 void setSize(int maxsamples);
70
74 void fillReversed(const gsl::span<const uint16_t> timesamples, uint8_t starttime);
75
76 std::vector<uint16_t> mTimeSamples;
77
78 ClassDef(FastORTimeSeries, 1);
79};
80
81} // namespace o2::emcal
82
83#endif
Container for FastOR time series.
~FastORTimeSeries()=default
Destructor.
void setTimeSamples(const gsl::span< const uint16_t > timesamples, uint8_t starttime)
uint16_t calculateL1TimeSum(uint8_t l0time) const
Calculate L0 timesum (4-integral of the ADC series) with respect to a given L0 time.
FastORTimeSeries()=default
Dummy constructor.
void clear()
Clear ADC samples in the time series.
const gsl::span< const uint16_t > getADCs() const
Access raw ADC values (in forward time order)
FastORTimeSeries(int maxsamples, const gsl::span< const uint16_t > timesamples, uint8_t starttime)
Construcor.