Project
Loading...
Searching...
No Matches
HalfSAMPAData.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
15#ifndef ALICE_O2_TPC_HALFSAMPADATA_H_
16#define ALICE_O2_TPC_HALFSAMPADATA_H_
17
18#include <array>
19#include <iosfwd>
20
21namespace o2
22{
23namespace tpc
24{
25
28
30{
31 public:
34
38 HalfSAMPAData(int id, bool low);
39
44 HalfSAMPAData(int id, bool low, std::array<short, 16>& data);
45
48
52 void setChannel(int channel, short value) { mData[channel] = value; };
53
56 short getChannel(int channel) const { return mData[channel]; };
57 short operator[](int index) const { return mData[index]; };
58 short& operator[](int index) { return mData[index]; };
59
62 void setLow(bool val) { mLow = val; };
63
66 void setID(int val) { mID = val; };
67
70 int getID() const { return mID; };
71
73 void reset()
74 {
75 mID = -1;
76 mLow = true;
77 }; // mData.clear(); };
78
81 std::array<short, 16>& getData() { return mData; };
82
85 void fill(short val) { mData.fill(val); };
86
90 std::ostream& Print(std::ostream& output) const;
91 friend std::ostream& operator<<(std::ostream& out, const HalfSAMPAData& s) { return s.Print(out); }
92
93 bool operator==(const HalfSAMPAData& rhs) const { return mID == rhs.mID && mLow == rhs.mLow && mData == rhs.mData; };
94 bool operator!=(const HalfSAMPAData& rhs) const { return !((*this) == rhs); };
95
96 private:
97 int mID;
98 bool mLow;
99 std::array<short, 16> mData;
100};
101} // namespace tpc
102} // namespace o2
103#endif
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
Class to store data from one half SAMPA.
bool operator!=(const HalfSAMPAData &rhs) const
std::array< short, 16 > & getData()
friend std::ostream & operator<<(std::ostream &out, const HalfSAMPAData &s)
std::ostream & Print(std::ostream &output) const
short getChannel(int channel) const
short operator[](int index) const
void setLow(bool val)
void setChannel(int channel, short value)
short & operator[](int index)
void fill(short val)
HalfSAMPAData()
Default constructor.
~HalfSAMPAData()
Destructor.
void reset()
Resets internal storage.
bool operator==(const HalfSAMPAData &rhs) const
GLuint index
Definition glcorearb.h:781
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLuint GLfloat * val
Definition glcorearb.h:1582
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...