20 printf(
"Module %d [ChID/FEEID R:T ]",
id);
30 printf(
"Trigger conf %d: ",
id);
34 printf(
"[TRIG %s: F:%2d L:%2d S:%2d T:%2d] ",
channelName(
channelID[ic]), cnf.first, cnf.last, cnf.shift, cnf.threshold);
35 }
else if (cnf.shift > 0 && cnf.threshold > 0) {
36 printf(
"[DISC %s: F:%2d L:%2d S:%2d T:%2d] ",
channelName(
channelID[ic]), cnf.first, cnf.last, cnf.shift, cnf.threshold);
51 printf(
"Modules configuration: baselineFactor = %f\n",
baselineFactor);
52 for (
const auto& md :
modules) {
57 for (
const auto& md :
modules) {
67 for (
int j = 0;
j < 64;
j++) {
78 LOG(info) <<
"Bunch list for baseline calculation:" << (nb == 0 ?
" EMPTY" : blist);
93 LOG(fatal) <<
"ModuleConfig::addBunch out of range [0:3563] " << ibunch;
104 for (
const auto& md :
modules) {
124void Module::setChannel(
int slot, int8_t chID, int16_t fID,
bool read,
bool trig,
int tF,
int tL,
int tS,
int tT)
127 LOG(fatal) <<
"Improper module channel settings" << slot <<
' ' << chID <<
' ' << fID <<
' ' << read <<
' ' << trig
128 <<
' ' << tF <<
' ' << tL <<
' ' << tS <<
' ' << tT;
137 if (tS > 0 && tT > 0) {
139 LOG(fatal) <<
"Sum of Last and Shift trigger parameters exceed allowed range";
152 uint32_t triggermask = 0;
153 for (
int im = 0; im <
NModules; im++) {
155 if (
modules[im].trigChannel[ic]) {
157 triggermask = triggermask | tmask;
166 std::string printTriggerMask{};
167 for (
int im = 0; im <
NModules; im++) {
169 printTriggerMask +=
" ";
172 printTriggerMask +=
"[";
174 if (
modules[im].trigChannel[ic]) {
175 printTriggerMask +=
"T";
177 printTriggerMask +=
" ";
180 printTriggerMask +=
"]";
182 return printTriggerMask;
constexpr int LHCMaxBunches
constexpr int NTimeBinsPerBC
constexpr int NChPerModule
constexpr const char * channelName(int channel)
std::string to_string(gsl::span< T, Size > span)
std::array< uint64_t, NWMap > emptyMap
uint32_t getTriggerMask() const
std::string getPrintTriggerMask() const
void addBunch(int ibunch)
static constexpr int NWMap
std::array< Module, MaxNModules > modules
std::array< bool, MaxChannels > trigChannel
void setChannel(int slot, int8_t chID, int16_t fID, bool read, bool trig=false, int tF=0, int tL=0, int tS=0, int tT=0)
std::array< TriggerChannelConfig, MaxChannels > trigChannelConf
std::array< bool, MaxChannels > readChannel
static constexpr int MaxChannels
std::array< int8_t, MaxChannels > channelID
static constexpr int MaxTriggChannels
std::array< int16_t, MaxChannels > feeID
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"