Project
Loading...
Searching...
No Matches
SubTimeFrameFile.cxx
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
// Adapthed with minimal changes from Gvozden Nescovic code to read sTFs files created by DataDistribution
13
14
#include "
TFReaderDD/SubTimeFrameFile.h
"
15
16
namespace
o2
17
{
18
namespace
rawdd
19
{
20
21
using namespace
o2::header
;
22
26
27
const
o2::header::DataDescription
SubTimeFrameFileMeta::sDataDescFileSubTimeFrame
{
"FILE_STF_META"
};
28
29
std::ostream&
operator<<
(std::ostream& pStream,
const
SubTimeFrameFileMeta
& pMeta)
30
{
31
static_assert
(std::is_standard_layout<SubTimeFrameFileMeta>::value,
32
"SubTimeFrameFileMeta must be a std layout type."
);
33
34
// write DataHeader
35
const
o2::header::DataHeader
lDataHeader =
SubTimeFrameFileMeta::getDataHeader
();
36
pStream.write(
reinterpret_cast<
const
char
*
>
(&lDataHeader),
sizeof
(
o2::header::DataHeader
));
37
// write the meta
38
39
return
pStream.write(
reinterpret_cast<
const
char
*
>
(&pMeta),
sizeof
(
SubTimeFrameFileMeta
));
40
}
41
45
46
const
o2::header::DataDescription
SubTimeFrameFileDataIndex::sDataDescFileStfDataIndex
{
"FILE_STF_INDEX"
};
47
48
std::ostream&
operator<<
(std::ostream& pStream,
const
SubTimeFrameFileDataIndex
& pIndex)
49
{
50
static_assert
(std::is_standard_layout<SubTimeFrameFileDataIndex::DataIndexElem>::value,
51
"SubTimeFrameFileDataIndex::DataIndexElem must be a std layout type."
);
52
53
// write DataHeader
54
const
o2::header::DataHeader
lDataHeader = pIndex.getDataHeader();
55
pStream.write(
reinterpret_cast<
const
char
*
>
(&lDataHeader),
sizeof
(
o2::header::DataHeader
));
56
57
// write the index
58
return
pStream.write(
reinterpret_cast<
const
char
*
>
(pIndex.mDataIndex.data()),
59
pIndex.mDataIndex.size() *
sizeof
(
SubTimeFrameFileDataIndex::DataIndexElem
));
60
}
61
}
// namespace rawdd
62
}
// namespace o2
SubTimeFrameFile.h
o2::header
O2 data header classes and API, v0.1.
Definition
DetID.h:49
o2::header::operator<<
std::ostream & operator<<(std::ostream &os, const o2::header::RDHAny &rdh)
Definition
RDHManip.cxx:84
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
o2::header::DataHeader
the main header struct
Definition
DataHeader.h:618
o2::header::Descriptor< gSizeDataDescriptionString >
o2::rawdd::SubTimeFrameFileDataIndex::DataIndexElem
Definition
SubTimeFrameFile.h:195
o2::rawdd::SubTimeFrameFileDataIndex
SubTimeFrameFileDataIndex.
Definition
SubTimeFrameFile.h:192
o2::rawdd::SubTimeFrameFileDataIndex::sDataDescFileStfDataIndex
static const o2::header::DataDescription sDataDescFileStfDataIndex
SubTimeFrameFileDataIndex.
Definition
SubTimeFrameFile.h:193
o2::rawdd::SubTimeFrameFileMeta
SubTimeFrameFileMeta.
Definition
SubTimeFrameFile.h:118
o2::rawdd::SubTimeFrameFileMeta::getDataHeader
static const o2::header::DataHeader getDataHeader()
Definition
SubTimeFrameFile.h:121
o2::rawdd::SubTimeFrameFileMeta::sDataDescFileSubTimeFrame
static const o2::header::DataDescription sDataDescFileSubTimeFrame
SubTimeFrameFileMeta.
Definition
SubTimeFrameFile.h:119
Detectors
Raw
TFReaderDD
src
SubTimeFrameFile.cxx
Generated on Tue Feb 25 2025 17:03:08 for Project by
1.9.8