25 uint32_t frequency = 1;
27 auto pairC = mVector.find(
pattern);
29 if (pairC != mVector.end()) {
30 frequency = (pairC->second)++;
32 mVector.emplace(std::make_pair(
pattern, 1));
40 auto pairC = mVector.find(
pattern);
42 if (pairC != mVector.end()) {
43 (pairC->second) += frequency;
44 frequency = (pairC->second);
46 mVector.emplace(std::make_pair(
pattern, frequency));
54 auto pairC = mVector.find(
pattern);
55 if (pairC != mVector.end()) {
56 return (pairC->second);
64 LOG(info) <<
"Diagnostic patterns, entries = " << mVector.size();
70 for (
const auto& [
key,
value] : mVector) {
71 std::cout <<
key <<
" = " <<
value <<
"; ";
73 std::cout << std::endl;
78 ULong64_t
key = (ULong64_t(13) << 32) + (ULong64_t(crate) << 36);
84 ULong64_t
key = (ULong64_t(14) << 32) + channel;
90 ULong64_t
key = (ULong64_t(trm) << 32) + (ULong64_t(crate) << 36);
96 LOG(
debug) <<
"Filling diagnostic word";
97 for (
auto const& el : diag.mVector) {
98 LOG(
debug) <<
"Filling diagnostic pattern " << el.first <<
" adding " << el.second <<
" to " <<
getFrequency(el.first) <<
" --> " << el.second +
getFrequency(el.first);
99 fill(el.first, el.second);
105 LOG(
debug) <<
"Merging diagnostic words";
106 for (
auto const& el : prev->mVector) {
107 fill(el.first, el.second);
114 for (
auto pair : mVector) {
115 auto key = pair.first;
129 for (
auto pair : mVector) {
130 auto key = pair.first;
145 static const ULong64_t addMask[3] = {0, 1 << 19, 3 << 19};
147 for (
int i = thr;
i <= 2;
i++) {
Definition of the TOF cluster.
Diagnostic class for TOF.
void print(bool longFormat=false) const
void merge(const Diagnostic *prev)
static ULong64_t getTRMKey(int crate, int trm)
void getNoisyMap(Bool_t *output, int noisyThr=1) const
uint32_t fill(ULong64_t pattern)
static int getChannel(ULong64_t pattern)
uint32_t getFrequency(ULong64_t pattern) const
void getNoisyLevelMap(Char_t *output) const
static int getNoisyLevel(ULong64_t pattern)
static ULong64_t getNoisyChannelKey(int channel)
static ULong64_t getEmptyCrateKey(int crate)
bool isNoisyChannel(int channel, int thr=0) const
static int getSlot(ULong64_t pattern)
GLsizei const GLfloat * value
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"
std::array< uint16_t, 5 > pattern