Project
Loading...
Searching...
No Matches
DigitSink.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_SINK_H
13
#define O2_MCH_DEVIO_DIGITS_DIGIT_SINK_H
14
15
#include <iosfwd>
16
#include <gsl/span>
17
#include "
DigitFileFormat.h
"
18
#include <memory>
19
#include <numeric>
20
21
namespace
o2::mch
22
{
23
class
ROFRecord
;
24
class
Digit
;
25
26
namespace
io
27
{
28
namespace
impl
29
{
30
class
DigitSinkImpl;
31
}
32
class
DigitSink
33
{
34
public
:
38
DigitSink
(std::ostream& os);
39
46
DigitSink
(std::ostream& os,
DigitFileFormat
format
,
47
size_t
maxSize = std::numeric_limits<size_t>::max());
48
49
/* defined in the implementation file, where mImpl is a complete type */
50
~DigitSink
();
51
57
bool
write
(gsl::span<const Digit>
digits
,
58
gsl::span<const ROFRecord> rofs = {});
59
60
private
:
61
std::ostream& mOutput;
// underlying stream used for output
62
bool
mBinary;
// whether to output in binary mode or text mode
63
DigitFileFormat
mFileFormat{};
// version information for the binary case
64
std::unique_ptr<impl::DigitSinkImpl> mImpl;
// actual implementation of the writer
65
size_t
mMaxSize;
// max size written to output
66
};
67
}
// namespace io
68
}
// namespace o2::mch
69
70
#endif
DigitFileFormat.h
o2::mch::ROFRecord
Definition
ROFRecord.h:35
o2::mch::io::DigitSink
Definition
DigitSink.h:33
o2::mch::io::DigitSink::write
bool write(gsl::span< const Digit > digits, gsl::span< const ROFRecord > rofs={})
Definition
DigitSink.cxx:141
o2::mch::io::DigitSink::~DigitSink
~DigitSink()
format
GLint GLint GLsizei GLint GLenum format
Definition
glcorearb.h:275
impl
Definition
Geometry.cxx:26
o2::cpv::Digit
o2::cpv::Digit Digit
Definition
NoiseCalibrator.h:26
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
DigitSink.h
Generated on Tue Feb 25 2025 23:16:22 for Project by
1.9.8