CbmRoot
Loading...
Searching...
No Matches
CbmTrdDefs.cxx
Go to the documentation of this file.
1/* Copyright (C) 2024 Hulubei National Institute of Physics and Nuclear Engineering - Horia Hulubei, Bucharest
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Alexandru Bercuci [committer] */
4
5#include "CbmTrdDefs.h"
6
7using namespace cbm::trd;
8
9bool cbm::trd::HasFaspFEE(uint16_t config) { return TESTBIT(config, eModuleConfig::kFEEtyp); }
10bool cbm::trd::HasSpadicFEE(uint16_t config) { return !HasFaspFEE(config); }
11bool cbm::trd::HasPadPlane2D(uint16_t config) { return TESTBIT(config, eModuleConfig::kPPtyp); }
12bool cbm::trd::HasPadPlane1D(uint16_t config) { return !HasPadPlane2D(config); }
13void cbm::trd::SetFEE(uint16_t config, bool fasp)
14{
15 fasp ? SETBIT(config, eModuleConfig::kFEEtyp) : CLRBIT(config, eModuleConfig::kFEEtyp);
16}
17void cbm::trd::SetPP(uint16_t config, bool twod)
18{
19 twod ? SETBIT(config, eModuleConfig::kPPtyp) : CLRBIT(config, eModuleConfig::kPPtyp);
20}
#define SETBIT(n, i)
Definition RTypes.h:15
#define TESTBIT(n, i)
Definition RTypes.h:17
#define CLRBIT(n, i)
Definition RTypes.h:16
bool HasFaspFEE(uint16_t config)
Inquire the FEE read-out type of the module.
Definition CbmTrdDefs.cxx:9
bool HasPadPlane1D(uint16_t config)
bool HasSpadicFEE(uint16_t config)
bool HasPadPlane2D(uint16_t config)
Inquire the pad-plane type of the chamber.
void SetPP(uint16_t config, bool twod=true)
Define the pad-plane type of the chamber.
void SetFEE(uint16_t config, bool fasp=true)
Define the read-out FEE type of the module.