Project
Loading...
Searching...
No Matches
TriggerRecord.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#include <bitset>
13#include <iostream>
17
18namespace o2
19{
20
21namespace emcal
22{
23
25{
26 uint16_t result(0);
27 if (mTriggerBits & o2::trigger::PhT) {
28 result |= 1 << TriggerBitsCoded_t::PHYSTRIGGER;
29 }
30 if (mTriggerBits & o2::trigger::Cal) {
31 result |= 1 << TriggerBitsCoded_t::CALIBTRIGGER;
32 }
33 if (mTriggerBits & o2::emcal::triggerbits::Inc) {
34 result |= 1 << TriggerBitsCoded_t::REJECTINCOMPLETE;
35 }
36 return result;
37}
38
40{
41 mTriggerBits = 0;
42 if (triggerbits & (1 << TriggerBitsCoded_t::PHYSTRIGGER)) {
43 mTriggerBits |= o2::trigger::PhT;
44 }
45 if (triggerbits & (1 << TriggerBitsCoded_t::CALIBTRIGGER)) {
46 mTriggerBits |= o2::trigger::Cal;
47 }
48 if (triggerbits & (1 << TriggerBitsCoded_t::REJECTINCOMPLETE)) {
49 mTriggerBits |= o2::emcal::triggerbits::Inc;
50 }
51}
52
53void TriggerRecord::printStream(std::ostream& stream) const
54{
55 stream << "Data for bc " << getBCData().bc << ", orbit " << getBCData().orbit << ", Triggers " << std::bitset<sizeof(mTriggerBits) * 8>(mTriggerBits) << ", starting from entry " << getFirstEntry() << " with " << getNumberOfObjects() << " objects";
56}
57
58std::ostream& operator<<(std::ostream& stream, const TriggerRecord& trg)
59{
61 return stream;
62}
63} // namespace emcal
64} // namespace o2
Definition of the 32 Central Trigger System (CTS) Trigger Types defined in https://twiki....
Header for data corresponding to the same hardware trigger.
uint16_t getTriggerBitsCompressed() const
const BCData & getBCData() const
void printStream(std::ostream &stream) const
void setTriggerBitsCompressed(uint16_t triggerbits)
GLuint64EXT * result
Definition glcorearb.h:5662
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
constexpr uint32_t PhT
Definition Triggers.h:30
constexpr uint32_t Cal
Definition Triggers.h:32
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
uint32_t orbit
LHC orbit.
uint16_t bc
bunch crossing ID of interaction