Project
Loading...
Searching...
No Matches
o2::MCEventLabel Class Reference

#include <MCEventLabel.h>

Public Member Functions

 MCEventLabel (int evID, int srcID, float corrw=1.0)
 
 MCEventLabel ()=default
 
 ~MCEventLabel ()=default
 
bool isSet () const
 
bool isEmpty () const
 
 operator uint32_t () const
 
uint32_t getRawValue () const
 
uint32_t getIDOnly () const
 
bool compare (const MCEventLabel &other, bool strict=false) const
 
bool operator== (const MCEventLabel &other) const
 
void unset ()
 
void set (int evID, int srcID, float corrW)
 compose label
 
void setCorrWeight (float corrW)
 
int getEventID () const
 
int getSourceID () const
 
float getCorrWeight () const
 
void get (int &evID, int &srcID, float &corrW)
 
void print () const
 
std::string asString () const
 
 ClassDefNV (MCEventLabel, 1)
 

Static Public Member Functions

static constexpr uint32_t MaxSourceID ()
 
static constexpr uint32_t MaxEventID ()
 
static constexpr float WeightPrecision ()
 

Static Public Attributes

static constexpr int nbitsEvID = 16
 
static constexpr int nbitsSrcID = 7
 
static constexpr int nbitsCorrW = sizeof(mLabel) * 8 - nbitsEvID - nbitsSrcID - 1
 
static constexpr uint32_t NotSet = (0x1 << (nbitsEvID + nbitsSrcID)) - 1
 
static constexpr uint32_t MaskEvID = (0x1 << nbitsEvID) - 1
 
static constexpr uint32_t MaskSrcID = (0x1 << nbitsSrcID) - 1
 
static constexpr uint32_t MaskSrcEvID = (MaskSrcID << nbitsEvID) | MaskEvID
 
static constexpr uint32_t MaskCorrW = (0x1 << nbitsCorrW) - 1
 
static constexpr float WeightNorm = 1. / float(MaskCorrW)
 

Detailed Description

Definition at line 24 of file MCEventLabel.h.

Constructor & Destructor Documentation

◆ MCEventLabel() [1/2]

o2::MCEventLabel::MCEventLabel ( int  evID,
int  srcID,
float  corrw = 1.0 
)
inline

Definition at line 46 of file MCEventLabel.h.

◆ MCEventLabel() [2/2]

o2::MCEventLabel::MCEventLabel ( )
default

◆ ~MCEventLabel()

o2::MCEventLabel::~MCEventLabel ( )
default

Member Function Documentation

◆ asString()

std::string MCEventLabel::asString ( ) const

Definition at line 29 of file MCEventLabel.cxx.

◆ ClassDefNV()

o2::MCEventLabel::ClassDefNV ( MCEventLabel  ,
 
)

◆ compare()

bool o2::MCEventLabel::compare ( const MCEventLabel other,
bool  strict = false 
) const
inline

Definition at line 64 of file MCEventLabel.h.

◆ get()

void o2::MCEventLabel::get ( int evID,
int srcID,
float &  corrW 
)
inline

parse label

Definition at line 103 of file MCEventLabel.h.

◆ getCorrWeight()

float o2::MCEventLabel::getCorrWeight ( ) const
inline

Definition at line 101 of file MCEventLabel.h.

◆ getEventID()

int o2::MCEventLabel::getEventID ( ) const
inline

Definition at line 89 of file MCEventLabel.h.

◆ getIDOnly()

uint32_t o2::MCEventLabel::getIDOnly ( ) const
inline

Definition at line 61 of file MCEventLabel.h.

◆ getRawValue()

uint32_t o2::MCEventLabel::getRawValue ( ) const
inline

Definition at line 58 of file MCEventLabel.h.

◆ getSourceID()

int o2::MCEventLabel::getSourceID ( ) const
inline

Definition at line 95 of file MCEventLabel.h.

◆ isEmpty()

bool o2::MCEventLabel::isEmpty ( ) const
inline

Definition at line 53 of file MCEventLabel.h.

◆ isSet()

bool o2::MCEventLabel::isSet ( ) const
inline

Definition at line 51 of file MCEventLabel.h.

◆ MaxEventID()

static constexpr uint32_t o2::MCEventLabel::MaxEventID ( )
inlinestaticconstexpr

Definition at line 115 of file MCEventLabel.h.

◆ MaxSourceID()

static constexpr uint32_t o2::MCEventLabel::MaxSourceID ( )
inlinestaticconstexpr

Definition at line 114 of file MCEventLabel.h.

◆ operator uint32_t()

o2::MCEventLabel::operator uint32_t ( ) const
inline

Definition at line 56 of file MCEventLabel.h.

◆ operator==()

bool o2::MCEventLabel::operator== ( const MCEventLabel other) const
inline

Definition at line 70 of file MCEventLabel.h.

◆ print()

void MCEventLabel::print ( ) const

Definition at line 22 of file MCEventLabel.cxx.

◆ set()

void o2::MCEventLabel::set ( int  evID,
int  srcID,
float  corrW 
)
inline

compose label

Definition at line 76 of file MCEventLabel.h.

◆ setCorrWeight()

void o2::MCEventLabel::setCorrWeight ( float  corrW)
inline

Definition at line 82 of file MCEventLabel.h.

◆ unset()

void o2::MCEventLabel::unset ( )
inline

Definition at line 73 of file MCEventLabel.h.

◆ WeightPrecision()

static constexpr float o2::MCEventLabel::WeightPrecision ( )
inlinestaticconstexpr

Definition at line 116 of file MCEventLabel.h.

Member Data Documentation

◆ MaskCorrW

constexpr uint32_t o2::MCEventLabel::MaskCorrW = (0x1 << nbitsCorrW) - 1
staticconstexpr

Definition at line 43 of file MCEventLabel.h.

◆ MaskEvID

constexpr uint32_t o2::MCEventLabel::MaskEvID = (0x1 << nbitsEvID) - 1
staticconstexpr

Definition at line 37 of file MCEventLabel.h.

◆ MaskSrcEvID

constexpr uint32_t o2::MCEventLabel::MaskSrcEvID = (MaskSrcID << nbitsEvID) | MaskEvID
staticconstexpr

Definition at line 41 of file MCEventLabel.h.

◆ MaskSrcID

constexpr uint32_t o2::MCEventLabel::MaskSrcID = (0x1 << nbitsSrcID) - 1
staticconstexpr

Definition at line 39 of file MCEventLabel.h.

◆ nbitsCorrW

constexpr int o2::MCEventLabel::nbitsCorrW = sizeof(mLabel) * 8 - nbitsEvID - nbitsSrcID - 1
staticconstexpr

Definition at line 33 of file MCEventLabel.h.

◆ nbitsEvID

constexpr int o2::MCEventLabel::nbitsEvID = 16
staticconstexpr

Definition at line 31 of file MCEventLabel.h.

◆ nbitsSrcID

constexpr int o2::MCEventLabel::nbitsSrcID = 7
staticconstexpr

Definition at line 32 of file MCEventLabel.h.

◆ NotSet

constexpr uint32_t o2::MCEventLabel::NotSet = (0x1 << (nbitsEvID + nbitsSrcID)) - 1
staticconstexpr

Definition at line 34 of file MCEventLabel.h.

◆ WeightNorm

constexpr float o2::MCEventLabel::WeightNorm = 1. / float(MaskCorrW)
staticconstexpr

Definition at line 44 of file MCEventLabel.h.


The documentation for this class was generated from the following files: