Project
Loading...
Searching...
No Matches
ROBoard.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
16
18
19#include <iostream>
20#include "fmt/format.h"
21
22namespace o2
23{
24namespace mid
25{
26std::ostream& operator<<(std::ostream& os, const ROBoard& board)
27{
28 os << fmt::format("Crate ID: {:2d} {} ID: {:2d} status: 0x{:2x} trig: 0x{:2x} fired: 0x{:1x}", static_cast<int>(raw::getCrateId(board.boardId)), (raw::isLoc(board.statusWord) ? "Loc" : "Reg"), static_cast<int>(raw::getLocId(board.boardId)), static_cast<int>(board.statusWord), static_cast<int>(board.triggerWord), static_cast<int>(board.firedChambers));
29 for (int ich = 0; ich < 4; ++ich) {
30 os << fmt::format(" X: 0x{:4x} Y: 0x{:4x}", board.patternsBP[ich], board.patternsNBP[ich]);
31 }
32 return os;
33}
34
35} // namespace mid
36} // namespace o2
Structure to store the readout board information.
uint8_t getCrateId(uint8_t uniqueLocId)
Definition ROBoard.h:75
bool isLoc(uint8_t statusWord)
Definition ROBoard.h:65
uint8_t getLocId(uint8_t uniqueLocId)
Definition ROBoard.h:80
std::ostream & operator<<(std::ostream &os, const Cluster &data)
Definition Cluster.cxx:27
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::array< uint16_t, 4 > patternsNBP
Bending plane pattern.
Definition ROBoard.h:33
std::array< uint16_t, 4 > patternsBP
Fired chambers.
Definition ROBoard.h:32
uint8_t statusWord
Definition ROBoard.h:28
uint8_t boardId
Trigger word.
Definition ROBoard.h:30
uint8_t triggerWord
Status word.
Definition ROBoard.h:29
uint8_t firedChambers
Board ID in crate.
Definition ROBoard.h:31