Project
Loading...
Searching...
No Matches
DigitFileFormat.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_FILE_FORMAT_H
13#define O2_MCH_DEVIO_DIGITS_DIGIT_FILE_FORMAT_H
14
15#include <cstdint>
16#include <iosfwd>
17#include <array>
18
19namespace o2::mch::io
20{
21
22constexpr uint64_t TAG_DIGITS = 0x3F2F; // = 016175 = 0.1.6.1.7.5 = D.I.G.I.T.S
23
25 union {
26 uint64_t format = TAG_DIGITS;
27 struct {
28 uint64_t tag : 16;
29 uint64_t fileVersion : 8;
30 uint64_t reserved : 4;
31 uint64_t digitVersion : 8;
32 uint64_t digitSize : 8;
33 uint64_t rofVersion : 8;
34 uint64_t rofSize : 8;
35 uint64_t hasRof : 1;
36 uint64_t run2ids : 1;
37 };
38 };
39};
40
41extern std::array<DigitFileFormat, 5> digitFileFormats;
42
43std::ostream& operator<<(std::ostream&, const DigitFileFormat&);
44
45bool operator==(const DigitFileFormat& dff1, const DigitFileFormat& dff2);
46bool operator!=(const DigitFileFormat& dff1, const DigitFileFormat& dff2);
47
48DigitFileFormat readDigitFileFormat(std::istream& in);
49
50bool isValid(DigitFileFormat dff);
51
52} // namespace o2::mch::io
53#endif
GLint GLint GLsizei GLint GLenum format
Definition glcorearb.h:275
constexpr uint64_t TAG_DIGITS
bool operator!=(const observer_ptr< W1 > &p1, const observer_ptr< W2 > &p2)
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
bool operator==(const observer_ptr< W1 > &p1, const observer_ptr< W2 > &p2)