Project
Loading...
Searching...
No Matches
Digit.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
14#include <Framework/Logger.h>
15#include <iostream>
16#include <gsl/span>
17#include <bitset>
18
19using namespace o2::fv0;
20
21gsl::span<const ChannelData> Digit::getBunchChannelData(const gsl::span<const ChannelData> tfdata) const
22{
23 // extract the span of channel data for this bunch from the whole TF data
24 return ref.getEntries() ? gsl::span<const ChannelData>(&tfdata[ref.getFirstEntry()], ref.getEntries()) : gsl::span<const ChannelData>();
25}
26
27void Digit::printStream(std::ostream& stream) const
28{
29 stream << "FV0 Digit: BC " << mIntRecord.bc << " orbit " << mIntRecord.orbit << std::endl;
31}
32
33std::ostream& operator<<(std::ostream& stream, const Digit& digi)
34{
35 digi.printStream(stream);
36 return stream;
37}
38void Digit::printLog() const
39{
40 LOG(info) << "______________DIGIT DATA____________";
41 LOG(info) << "BC: " << mIntRecord.bc << "| ORBIT: " << mIntRecord.orbit;
42 LOG(info) << "Ref first: " << ref.getFirstEntry() << "| Ref entries: " << ref.getEntries();
44}
46{
47 LOG(info) << "______________EXTENDED TRIGGERS____________";
48 LOG(info) << "BC: " << mIntRecord.bc << "| ORBIT: " << mIntRecord.orbit;
49 for (int i = 0; i < 20; i++) {
50 LOG(info) << "N: " << i + 1 << " | TRG: " << mTriggerWords[i];
51 }
52}
Class to describe fired triggered and/or stored channels for the BC and to refer to channel data.
Container class to store time and charge values of single FV0 channel.
int32_t i
std::string print() const
Definition Triggers.cxx:18
void printLog() const
Definition Triggers.cxx:30
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &os, Detector &source)
uint32_t orbit
LHC orbit.
uint16_t bc
bunch crossing ID of interaction
Triggers mTriggers
Definition Digit.h:61
void printStream(std::ostream &stream) const
Definition Digit.cxx:27
void printLog() const
Definition Digit.cxx:38
o2::InteractionRecord mIntRecord
Definition Digit.h:62
gsl::span< const ChannelData > getBunchChannelData(const gsl::span< const ChannelData > tfdata) const
Definition Digit.cxx:21
std::array< uint32_t, 20 > mTriggerWords
Definition Digit.h:105
o2::InteractionRecord mIntRecord
Definition Digit.h:103
void printLog() const
Definition Digit.cxx:45
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"