Project
Loading...
Searching...
No Matches
TriggerRecord.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 ALICEO2_EMCAL_TRIGGERRECORD_H
13#define ALICEO2_EMCAL_TRIGGERRECORD_H
14
15#include <cstdint>
16#include <iosfwd>
17#include "Rtypes.h"
20
21namespace o2
22{
23
24namespace emcal
25{
26
34{
37
38 public:
39 TriggerRecord() = default;
40 TriggerRecord(const BCData& bunchcrossing, int firstentry, int nentries) : mBCData(bunchcrossing), mDataRange(firstentry, nentries), mTriggerBits(0) {}
41 TriggerRecord(const BCData& bunchcrossing, uint32_t triggerbits, int firstentry, int nentries) : TriggerRecord(bunchcrossing, firstentry, nentries) { mTriggerBits = triggerbits; }
42 ~TriggerRecord() = default;
43
44 void setBCData(const BCData& data) { mBCData = data; }
45 void setTriggerBits(uint32_t triggerbits) { mTriggerBits = triggerbits; }
46 void setTriggerBitsCompressed(uint16_t triggerbits);
47 void setDataRange(int firstentry, int nentries) { mDataRange.set(firstentry, nentries); }
48 void setIndexFirstObject(int firstentry) { mDataRange.setFirstEntry(firstentry); }
49 void setNumberOfObjects(int nentries) { mDataRange.setEntries(nentries); }
50
51 const BCData& getBCData() const { return mBCData; }
52 BCData& getBCData() { return mBCData; }
53 uint32_t getTriggerBits() const { return mTriggerBits; }
54 uint16_t getTriggerBitsCompressed() const;
55 int getNumberOfObjects() const { return mDataRange.getEntries(); }
56 int getFirstEntry() const { return mDataRange.getFirstEntry(); }
57
58 void printStream(std::ostream& stream) const;
59
60 private:
63 enum TriggerBitsCoded_t {
64 PHYSTRIGGER,
65 CALIBTRIGGER,
66 REJECTINCOMPLETE
67 };
68 BCData mBCData;
69 DataRange mDataRange;
70 uint32_t mTriggerBits = 0;
71
72 ClassDefNV(TriggerRecord, 2);
73};
74
75std::ostream& operator<<(std::ostream& stream, const TriggerRecord& trg);
76
77} // namespace emcal
78
79} // namespace o2
80
81#endif
Class to refer to the 1st entry and N elements of some group in the continuous container.
uint32_t bunchcrossing
Definition RawData.h:3
Header for data corresponding to the same hardware trigger.
uint16_t getTriggerBitsCompressed() const
void setIndexFirstObject(int firstentry)
TriggerRecord(const BCData &bunchcrossing, uint32_t triggerbits, int firstentry, int nentries)
void setBCData(const BCData &data)
TriggerRecord(const BCData &bunchcrossing, int firstentry, int nentries)
void setDataRange(int firstentry, int nentries)
uint32_t getTriggerBits() const
const BCData & getBCData() const
void setTriggerBits(uint32_t triggerbits)
void setNumberOfObjects(int nentries)
void printStream(std::ostream &stream) const
void setTriggerBitsCompressed(uint16_t triggerbits)
GLboolean * data
Definition glcorearb.h:298
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
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...