12#ifndef ALICEO2_MCCOMPLABEL_H
13#define ALICEO2_MCCOMPLABEL_H
26 static constexpr uint64_t ul0x1 = 0x1;
27 static constexpr uint64_t NotSet = 0xffffffffffffffff;
28 static constexpr uint64_t Noise = 0xfffffffffffffffe;
29 static constexpr uint64_t Fake = ul0x1 << 63;
30 static constexpr int NReservedBits = 1;
32 uint64_t mLabel = NotSet;
44 "Fields cannot be stored in 64 bits");
55 MCCompLabel(
int trackID,
int evID,
int srcID,
bool fake =
false) {
set(trackID, evID, srcID, fake); }
67 bool isSet()
const {
return mLabel != NotSet; }
69 bool isEmpty()
const {
return mLabel == NotSet; }
78 bool isFake()
const {
return mLabel & Fake; }
91 return (tr1 == tr2) ? ((
isCorrect() &&
other.isCorrect()) ? 1 : 0) : -1;
116 void set(
unsigned int trackID,
int evID,
int srcID,
bool fake)
119 mLabel = (
maskTrackID &
static_cast<uint64_t
>(trackID)) |
132 void get(
int& trackID,
int& evID,
int& srcID,
bool& fake)
const
158struct hash<
o2::MCCompLabel> {
162 return label.getRawValue();
uint64_t getRawValue() const
static constexpr int maxTrackID()
bool operator==(const MCCompLabel &other) const
static constexpr int maxSourceID()
void setFakeFlag(bool v=true)
bool operator!=(const MCCompLabel &other) const
ClassDefNV(MCCompLabel, 1)
static constexpr uint64_t maskTrackID
MCCompLabel(bool noise=false)
int getTrackIDSigned() const
void get(int &trackID, int &evID, int &srcID, bool &fake) const
static constexpr int nbitsTrackID
static constexpr uint64_t maskSrcID
uint64_t getTrackEventSourceID() const
MCCompLabel(int trackID, int evID, int srcID, bool fake=false)
static constexpr int nbitsEvID
bool operator>(const MCCompLabel &other) const
static constexpr int maxEventID()
void set(unsigned int trackID, int evID, int srcID, bool fake)
static constexpr int nbitsSrcID
bool operator<(const MCCompLabel &other) const
static constexpr uint64_t maskEvID
int compare(const MCCompLabel &other) const
std::string asString() const
static constexpr uint64_t maskFull
GLuint GLsizei const GLchar * label
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::ostream & operator<<(std::ostream &stream, o2::InteractionRecord const &ir)
Defining DataPointCompositeObject explicitly as copiable.
size_t operator()(o2::MCCompLabel const &label) const
VectorOfTObjectPtrs other