CbmRoot
Loading...
Searching...
No Matches
CbmDefs.cxx File Reference
#include "CbmDefs.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <ostream>
#include <stdexcept>
Include dependency graph for CbmDefs.cxx:

Go to the source code of this file.

Functions

ECbmModuleIdoperator++ (ECbmModuleId &e)
 operator ++ for ECbmModuleId for convenient usage in loops
 
std::ostream & operator<< (std::ostream &strm, const ECbmDataType &dataType)
 operator << for convenient output to std::ostream.
 

Function Documentation

◆ operator++()

ECbmModuleId & operator++ ( ECbmModuleId & e)

operator ++ for ECbmModuleId for convenient usage in loops

This operator is tuned for ECbmModuleID. It takes into account non continuous values for the enum. Since the detectorID which is stored in the generated output has only 4 bit the maximum number of detectors can be 16 (0-15). To avoid that the enum class has to be changed again the values 11-15 are reserved for future detectors. The ids of the passive modules are only relevant at run time so they can be shifted easily The opeartor takes care about the non continuous values for the enum When it reaches the last detector it automatically continuous with the first passive module

Definition at line 24 of file CbmDefs.cxx.

References kLastModule, kMagnet, and kNofSystems.

◆ operator<<()

std::ostream & operator<< ( std::ostream & strm,
const ECbmDataType & dataType )

operator << for convenient output to std::ostream.

Converts the enum value to a string which is put in the stream

Definition at line 40 of file CbmDefs.cxx.

References ToIntegralType().