20#include <fairlogger/Logger.h>
30 DetID::HMP,
DetID::MFT,
DetID::MCH,
DetID::MID,
DetID::ZDC,
DetID::FT0,
DetID::FV0,
DetID::FDD,
DetID::TST,
DetID::CTP,
DetID::FOC,
DetID::First,
DetID::Last;
45 std::string ss(detList), sname{};
46 if (ss.find(
NONE) != std::string::npos) {
49 if (ss.find(
ALL) != std::string::npos) {
53 std::replace(ss.begin(), ss.end(),
' ',
',');
54 std::replace(ss.begin(), ss.end(),
';',
',');
56 for (
auto& dname : dv) {
59 throw std::runtime_error(fmt::format(
"Wrong entry {:s} in detectors list {:s}", dname, detList));
ClassImp(o2::detectors::DetID)
Static class with identifiers, bitmasks and names for ALICE detectors.
static constexpr const char * getName(ID id)
names of defined detectors
static constexpr std::string_view NONE
keywork for no-detector
static constexpr std::string_view ALL
keywork for all detectors
static std::string getNames(mask_t mask, char delimiter=',')
static constexpr ID First
static constexpr int nDetectors
number of defined detectors
static constexpr int nameToID(char const *name, int id=First)
static constexpr mask_t FullMask
static constexpr ID Last
if extra detectors added, update this !!!
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
static std::vector< std::string > tokenize(const std::string &src, char delim, bool trimToken=true, bool skipEmpty=true)