Project
Loading...
Searching...
No Matches
MCLabel.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
20
21namespace o2
22{
23namespace mid
24{
25
26MCLabel::MCLabel(int trackID, int eventID, int srcID, int deId, int columnId, int cathode, int firstStrip, int lastStrip) : o2::MCCompLabel(trackID, eventID, srcID, false)
27{
29 setDEId(deId);
30 setColumnId(columnId);
31 setCathode(cathode);
32 setFirstStrip(firstStrip);
33 setLastStrip(lastStrip);
34}
35
36void MCLabel::set(int value, unsigned int mask, unsigned int offset)
37{
39 mStripsInfo &= ~(mask << offset);
40 mStripsInfo |= ((value & mask) << offset);
41}
42
44{
45 if (compare(other) != 1) {
46 return false;
47 }
48 return (mStripsInfo == other.mStripsInfo);
49}
50
51} // namespace mid
52} // namespace o2
Label for MID.
ClassImp(o2::mid::MCLabel)
int compare(const MCCompLabel &other) const
Definition MCCompLabel.h:85
void setCathode(int cathode)
Sets the cathode.
Definition MCLabel.h:62
void setDEId(int deId)
Sets the detection element ID.
Definition MCLabel.h:52
MCLabel()=default
void setColumnId(int columnId)
Sets the column ID.
Definition MCLabel.h:57
void setLastStrip(int lastStrip)
Sets the last strip.
Definition MCLabel.h:72
void setFirstStrip(int firstStrip)
Sets the first strip.
Definition MCLabel.h:67
bool operator==(const MCLabel &other) const
Definition MCLabel.cxx:43
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLintptr offset
Definition glcorearb.h:660
GLint GLuint mask
Definition glcorearb.h:291
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other