Project
Loading...
Searching...
No Matches
DigitSampler.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 O2_MCH_DEVIO_DIGITS_DIGIT_READER_H
13
#define O2_MCH_DEVIO_DIGITS_DIGIT_READER_H
14
15
#include <iosfwd>
16
#include "
DigitFileFormat.h
"
17
#include <vector>
18
#include <memory>
19
20
namespace
o2::mch
21
{
22
class
Digit
;
23
class
ROFRecord
;
24
}
// namespace o2::mch
25
26
namespace
o2::mch::io
27
{
28
namespace
impl
29
{
30
class
DigitSamplerImpl;
31
}
32
class
DigitSampler
33
{
34
public
:
35
DigitSampler
(std::istream& in);
36
37
/* defined in the implementation file, where mImpl is a complete type */
38
~DigitSampler
();
39
41
DigitFileFormat
fileFormat
()
const
{
return
mFileFormat; }
42
50
bool
read
(std::vector<Digit>&
digits
,
51
std::vector<ROFRecord>& rofs);
52
56
size_t
nofTimeFrames
()
const
;
57
61
size_t
nofROFs
()
const
;
62
66
size_t
nofDigits
()
const
;
67
69
void
rewind
();
70
71
private
:
72
void
count
()
const
;
73
74
private
:
75
std::istream& mInput;
76
DigitFileFormat
mFileFormat;
77
std::unique_ptr<impl::DigitSamplerImpl> mImpl;
78
mutable
size_t
mNofTimeFrames{0};
79
mutable
size_t
mNofROFs{0};
80
mutable
size_t
mNofDigits{0};
81
mutable
bool
mCountDone{
false
};
82
};
83
84
}
// namespace o2::mch::io
85
86
#endif
DigitFileFormat.h
o2::mch::ROFRecord
Definition
ROFRecord.h:35
o2::mch::io::DigitSampler
Definition
DigitSampler.h:33
o2::mch::io::DigitSampler::~DigitSampler
~DigitSampler()
o2::mch::io::DigitSampler::nofDigits
size_t nofDigits() const
Definition
DigitSampler.cxx:67
o2::mch::io::DigitSampler::rewind
void rewind()
Definition
DigitSampler.cxx:41
o2::mch::io::DigitSampler::fileFormat
DigitFileFormat fileFormat() const
Definition
DigitSampler.h:41
o2::mch::io::DigitSampler::read
bool read(std::vector< Digit > &digits, std::vector< ROFRecord > &rofs)
Definition
DigitSampler.cxx:32
o2::mch::io::DigitSampler::nofROFs
size_t nofROFs() const
Definition
DigitSampler.cxx:61
o2::mch::io::DigitSampler::nofTimeFrames
size_t nofTimeFrames() const
Definition
DigitSampler.cxx:55
count
GLint GLsizei count
Definition
glcorearb.h:399
impl
Definition
Geometry.cxx:26
o2::cpv::Digit
o2::cpv::Digit Digit
Definition
NoiseCalibrator.h:26
o2::mch::io
Definition
DigitD0.h:19
o2::mch
Definition
SimTraits.h:155
o2::mch::io::DigitFileFormat
Definition
DigitFileFormat.h:24
digits
std::vector< Digit > digits
Definition
test_ctf_io_hmpid.cxx:40
Detectors
MUON
MCH
DevIO
Digits
DigitSampler.h
Generated on Tue Feb 25 2025 23:16:22 for Project by
1.9.8