Project
Loading...
Searching...
No Matches
DataReader.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
14
15#ifndef ALICEO2_TOF_DATAREADER_H
16#define ALICEO2_TOF_DATAREADER_H
17
18#include "TOFBase/Digit.h"
19
20namespace o2
21{
22namespace tof
23{
28{
29
30 public:
32 struct StripData {
33 UShort_t stripID = 0; // strip id
34 std::vector<Digit> digits; // vector of digits
35
36 void clear() { digits.clear(); }
37 };
38
39 DataReader() = default;
40 DataReader(const DataReader& cluster) = delete;
41 virtual ~DataReader() = default;
42
44
45 virtual void init() = 0;
46
47 virtual Bool_t getNextStripData(StripData& stripData) = 0;
48
49 //
50 protected:
51 //
52};
53
54//_______________________________________________________________________
55
60{
61 public:
62 DigitDataReader() = default;
63 void setDigitArray(const gsl::span<const o2::tof::Digit>* a)
64 {
65 mDigitArray = a;
66 mIdx = 0;
67 mLastDigit = nullptr;
68 }
69
70 void init() override
71 {
72 mIdx = 0;
73 mLastDigit = nullptr;
74 }
75
76 Bool_t getNextStripData(StripData& stripData) override;
77
78 const gsl::span<const o2::tof::Digit>* getDigitArray() const { return mDigitArray; }
79
80 private:
81 const gsl::span<const o2::tof::Digit>* mDigitArray = nullptr;
82 const Digit* mLastDigit = nullptr;
83 Int_t mIdx = 0;
84};
85
86//_______________________________________________________________________
87
92{
93 public:
94 Bool_t getNextStripData(StripData& stripData) override;
95};
96
97} // namespace tof
98} // namespace o2
99
100#endif /* ALICEO2_TOF_DATAREADER_H */
DataReader class for TOF.
Definition DataReader.h:28
DataReader & operator=(const DataReader &src)=delete
virtual Bool_t getNextStripData(StripData &stripData)=0
virtual ~DataReader()=default
DataReader(const DataReader &cluster)=delete
virtual void init()=0
DigitDataReader class for TOF. Feeds the MC digits to the Cluster Finder.
Definition DataReader.h:60
void init() override
Definition DataReader.h:70
void setDigitArray(const gsl::span< const o2::tof::Digit > *a)
Definition DataReader.h:63
Bool_t getNextStripData(StripData &stripData) override
const gsl::span< const o2::tof::Digit > * getDigitArray() const
Definition DataReader.h:78
TOF digit implementation.
Definition Digit.h:31
RawDataReader class for TOF. Feeds raw data to the Cluster Finder.
Definition DataReader.h:92
Bool_t getNextStripData(StripData &stripData) override
GLenum src
Definition glcorearb.h:1767
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Transient data for single strip digits.
Definition DataReader.h:32
std::vector< Digit > digits
Definition DataReader.h:34