![]() |
Belle II Software
release-06-01-15
|
The DetectorSet class for sets of detector IDs in the form of EDetector values. More...
#include <Const.h>
Public Member Functions | |
DetectorSet () | |
Default constructor. | |
DetectorSet (const DetectorSet &)=default | |
Copy constructor. | |
DetectorSet & | operator= (const DetectorSet &)=default |
Assignment operator. | |
DetectorSet (EDetector det) | |
Constructor for a set containig one detector ID. More... | |
virtual | ~DetectorSet () |
Destructor. | |
DetectorSet & | operator+= (const DetectorSet &set) |
Addition of another set to this one. More... | |
DetectorSet & | operator-= (const DetectorSet &set) |
Subtraction of another set from this one. More... | |
bool | operator== (const DetectorSet &set) const |
Equality operator. More... | |
bool | operator!= (const DetectorSet &set) const |
Inequality operator. More... | |
bool | contains (const DetectorSet &set) const |
Check whether this set contains another set. More... | |
int | getIndex (EDetector det) const |
Getter for the index of a given detector in this set. More... | |
EDetector | operator[] (int index) const |
Accessor for a detector ID in this set. More... | |
size_t | size () const |
Getter for number of detector IDs in this set. | |
std::string | __repr__ () const |
String for printing in python. | |
Private Member Functions | |
DetectorSet (unsigned short bits) | |
Constructor. More... | |
Static Private Member Functions | |
static unsigned short | getBit (EDetector det) |
Conversion of detector ID to bit pattern. More... | |
static EDetector | getDetector (unsigned short bit) |
Conversion of bit pattern to detector ID. More... | |
Private Attributes | |
unsigned short | m_bits |
The internal representation of the set as bit pattern. | |
The DetectorSet class for sets of detector IDs in the form of EDetector values.
Only detectors may be included, not subdetectors.
|
inline |
|
inlineexplicitprivate |
|
inline |
|
staticprivate |
Conversion of detector ID to bit pattern.
det | The detector ID. |
Definition at line 203 of file UnitConst.cc.
|
staticprivate |
Conversion of bit pattern to detector ID.
bit | The bit pattern. |
Definition at line 216 of file UnitConst.cc.
int getIndex | ( | EDetector | det | ) | const |
Getter for the index of a given detector in this set.
det | The detector ID. |
Definition at line 235 of file UnitConst.cc.
|
inline |
|
inline |
|
inline |
|
inline |
Const::EDetector operator[] | ( | int | index | ) | const |
Accessor for a detector ID in this set.
index | The index in the set. |
Definition at line 246 of file UnitConst.cc.