Project
Loading...
Searching...
No Matches
DataFormats.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
13#include <fmt/format.h>
14#include <iostream>
15
16namespace o2::mch::raw
17{
18
19template <>
21{
22 FEEID f{0};
23 f.chargeSum = 1;
24 return f.word;
25}
26
27template <>
29{
30 return 0;
31}
32template <int VERSION>
34{
35 FEEID f{0};
36 f.ulFormatVersion = VERSION;
37 return f.word;
38}
39
40template uint16_t extraFeeIdVersionMask<0>();
41template uint16_t extraFeeIdVersionMask<1>();
42
43template <>
44uint8_t linkRemapping<UserLogicFormat>(uint8_t linkID)
45{
46 return 15;
47}
48
49template <>
50uint8_t linkRemapping<BareFormat>(uint8_t linkID)
51{
52 return linkID;
53}
54
55std::ostream& operator<<(std::ostream& os, const FEEID& f)
56{
57 os << fmt::format("FEEID {} [id:{},chargeSum:{} ulVersion:{}]",
58 f.word, f.id, f.chargeSum, f.ulFormatVersion);
59 return os;
60}
61} // namespace o2::mch::raw
GLdouble f
Definition glcorearb.h:310
uint16_t extraFeeIdChargeSumMask< ChargeSumMode >()
template uint16_t extraFeeIdVersionMask< 1 >()
uint16_t extraFeeIdVersionMask()
template uint16_t extraFeeIdVersionMask< 0 >()
uint8_t linkRemapping< UserLogicFormat >(uint8_t linkID)
uint16_t extraFeeIdChargeSumMask< SampleMode >()
uint8_t linkRemapping< BareFormat >(uint8_t linkID)
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)