23 if (mMAP_VERSION ==
"3") {
24 LOG(error) <<
"Trying to decode static part of deadmap version " << mMAP_VERSION <<
". Not implemented, doing nothing.";
27 for (
int iel = 0; iel < mStaticDeadMap.size(); iel++) {
28 uint16_t
w = mStaticDeadMap[iel];
31 for (
int w2 = (
w & 0x7FFF) + 1; w2 < mStaticDeadMap.at(iel + 1); w2++) {
41 if (mMAP_VERSION !=
"3" && mMAP_VERSION !=
"4") {
42 LOG(error) <<
"Trying to decode time-dependent deadmap version " << mMAP_VERSION <<
". Not implemented, doing nothing.";
46 if (mEvolvingDeadMap.empty()) {
47 LOG(warning) <<
"Time-dependent dead map is empty. Doing nothing.";
51 std::vector<uint16_t> closestVec;
54 if (orbitGapAllowed >= 0 && std::abs(dT) > orbitGapAllowed) {
55 LOG(warning) <<
"Requested orbit " <<
orbit <<
", found " <<
orbit - dT <<
". Orbit gap is too high, skipping time-dependent map.";
60 if (includeStaticMap && mMAP_VERSION !=
"3") {
61 closestVec.insert(closestVec.end(), mStaticDeadMap.begin(), mStaticDeadMap.end());
66 for (
int iel = 0; iel < closestVec.size(); iel++) {
67 uint16_t
w = closestVec.at(iel);
70 for (
int w2 = (
w & 0x7FFF) + 1; w2 < closestVec.at(iel + 1); w2++) {
79 std::vector<unsigned long> keys;
80 std::transform(mEvolvingDeadMap.begin(), mEvolvingDeadMap.end(), std::back_inserter(keys),
81 [](
const auto& O) { return O.first; });
87 if (mEvolvingDeadMap.empty()) {
88 LOG(warning) <<
"Requested orbit " <<
orbit <<
"from an empty time-dependent map. Doing nothing";
91 auto closest = mEvolvingDeadMap.upper_bound(
orbit);
92 if (closest != mEvolvingDeadMap.begin()) {
94 mmap = closest->second;
95 return (
long)
orbit - closest->first;
97 mmap = mEvolvingDeadMap.begin()->second;
98 return (
long)(
orbit)-mEvolvingDeadMap.begin()->first;
Definition of the ITSMFT NoiseMap.
Definition of the ITSMFT time-dependend dead map.
NoiseMap class for the ITS and MFT.
void maskFullChip(int chip, bool cleanNoisyPixels=false)
long getMapAtOrbit(unsigned long orbit, std::vector< uint16_t > &mmap) const
std::vector< unsigned long > getEvolvingMapKeys() const
void decodeMap(NoiseMap &noisemap) const
GLubyte GLubyte GLubyte GLubyte w
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"