Project
Loading...
Searching...
No Matches
TOFDCSProcessor.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14#include "Rtypes.h"
15#include <deque>
16#include <string>
17#include <algorithm>
18#include <iterator>
19#include <cstring>
20#include <bitset>
21
22using namespace o2::tof;
23using namespace o2::dcs;
24
28
30
32{
33 LOG(info) << "First Value: timestamp = " << firstValue.first << ", value = " << firstValue.second;
34 LOG(info) << "Last Value: timestamp = " << lastValue.first << ", value = " << lastValue.second;
35 LOG(info) << "Mid Value: timestamp = " << midValue.first << ", value = " << midValue.second;
36 LOG(info) << "Min Value: timestamp = " << minValue.first << ", value = " << minValue.second;
37 LOG(info) << "Max Value: timestamp = " << maxValue.first << ", value = " << maxValue.second;
38 LOG(info) << "Max Change: timestamp[0] = " << maxChange.first[0] << ", timestamp[1] = " << maxChange.first[1] << ", value = " << maxChange.second;
39 std::string updatedStr = updated ? "UPDATED" : "NOT UPDATED";
40 LOG(info) << "Status = " << updatedStr;
41}
42
43//__________________________________________________________________
44
45void TOFDCSProcessor::init(const std::vector<DPID>& pids)
46{
47 // fill the array of the DPIDs that will be used by TOF
48 // pids should be provided by CCDB
49
50 for (const auto& it : pids) {
51 mPids[it] = false;
52 mTOFDCS[it].makeEmpty();
53 }
54
55 for (int iddl = 0; iddl < NDDLS; ++iddl) {
56 for (int ifeac = 0; ifeac < NFEACS; ++ifeac) {
57 getStripsConnectedToFEAC(iddl, ifeac, mFeacInfo[iddl][ifeac]);
58 }
59 }
60}
61
62//__________________________________________________________________
63
64int TOFDCSProcessor::process(const gsl::span<const DPCOM> dps)
65{
66
67 // first we check which DPs are missing - if some are, it means that
68 // the delta map was sent
69 if (mVerboseDP || mVerboseHVLV) {
70 LOG(info) << "\n\n\nProcessing new DCS DP map\n-----------------";
71 }
72 if (false) {
73 std::unordered_map<DPID, DPVAL> mapin;
74 for (auto& it : dps) {
75 mapin[it.id] = it.data;
76 }
77 for (auto& it : mPids) {
78 const auto& el = mapin.find(it.first);
79 if (el == mapin.end()) {
80 LOG(debug) << "DP " << it.first << " not found in map";
81 } else {
82 LOG(debug) << "DP " << it.first << " found in map";
83 }
84 }
85 }
86
87 mUpdateFeacStatus = false; // by default, we do not foresee a new entry in the CCDB for the FEAC
88 mUpdateHVStatus = false; // by default, we do not foresee a new entry in the CCDB for the HV
89
90 // now we process all DPs, one by one
91 for (const auto& it : dps) {
92 // we process only the DPs defined in the configuration
93 const auto& el = mPids.find(it.id);
94 if (el == mPids.end()) {
95 LOG(info) << "DP " << it.id << " not found in TOFDCSProcessor, we will not process it";
96 continue;
97 }
98 processDP(it);
99 mPids[it.id] = true;
100 }
101
102 if (mUpdateFeacStatus) {
104 }
105
106 if (mUpdateHVStatus) {
107 updateHVCCDB();
108 }
109
110 return 0;
111}
112
113//__________________________________________________________________
114
116{
117
118 // processing single DP
119
120 auto& dpid = dpcom.id;
121 const auto& type = dpid.get_type();
122 auto& val = dpcom.data;
123 if (mVerboseDP || mVerboseHVLV) {
124 if (type == DPVAL_DOUBLE) {
125 LOG(info);
126 LOG(info) << "Processing DP = " << dpcom << ", with value = " << o2::dcs::getValue<double>(dpcom) << ", epoch time = " << val.get_epoch_time();
127 } else if (type == DPVAL_INT) {
128 LOG(info);
129 LOG(info) << "Processing DP = " << dpcom << ", with value = " << o2::dcs::getValue<int32_t>(dpcom);
130 }
131 }
132 auto flags = val.get_flags();
133 if (processFlags(flags, dpid.get_alias()) == 0) {
134 // now I need to access the correct element
135 if (type == DPVAL_DOUBLE) {
136 // for these DPs, we will store the first, last, mid value, plus the value where the maximum variation occurred
137 auto& dvect = mDpsdoublesmap[dpid];
138 if (mVerboseDP) {
139 LOG(debug) << "mDpsdoublesmap[dpid].size() = " << dvect.size();
140 }
141 auto etime = val.get_epoch_time();
142 if (dvect.size() == 0 ||
143 etime != dvect.back().get_epoch_time()) { // we check
144 // that we did not get the
145 // same timestamp as the
146 // latest one
147 dvect.push_back(val);
148 }
149 }
150
151 if (type == DPVAL_INT) {
152 // for these DPs, we need some processing
153 if (std::strstr(dpid.get_alias(), "FEACSTATUS") != nullptr) { // DP is FEACSTATUS
154 std::string aliasStr(dpid.get_alias());
155 // extracting DDL number (regex is quite slow, using this way)
156 const auto offs = std::strlen("TOF_FEACSTATUS_");
157 std::size_t const nn = aliasStr.find_first_of("0123456789", offs);
158 std::size_t const mm = aliasStr.find_first_not_of("0123456789", nn);
159 std::string ddlStr = aliasStr.substr(nn, mm != std::string::npos ? mm - nn : mm);
160 auto iddl = std::stoi(ddlStr);
161 std::bitset<8> feacstatus(o2::dcs::getValue<int32_t>(dpcom));
162 if (mVerboseHVLV) {
163 LOG(info) << "DDL: " << iddl << ": Prev FEAC = " << mPrevFEACstatus[iddl] << ", new = " << feacstatus;
164 }
165 if (feacstatus == mPrevFEACstatus[iddl]) {
166 if (mVerboseHVLV) {
167 LOG(info) << "Same FEAC status as before, we do nothing";
168 }
169 return 0;
170 }
171 if (mVerboseHVLV) {
172 LOG(info) << "Something changed in LV for DDL " << iddl << ", we need to check what";
173 }
174 mUpdateFeacStatus = true;
175 int plate = -1, strip = -1;
176 int det[5] = {iddl / 4, -1, -1, -1, -1};
177 for (auto ifeac = 0; ifeac < NFEACS; ++ifeac) { // we have one bit per FEAC
178 auto singlefeacstatus = feacstatus[ifeac];
179 for (int istrip = 0; istrip < 6; ++istrip) {
180 if (mFeacInfo[iddl][ifeac].stripInSM[istrip] == -1) {
181 continue;
182 }
183 for (int ipadz = 0; ipadz < Geo::NPADZ; ++ipadz) {
184 for (int ipadx = mFeacInfo[iddl][ifeac].firstPadX; ipadx <= mFeacInfo[iddl][ifeac].lastPadX; ++ipadx) {
185 if (mVerboseHVLV) {
186 LOG(info) << "mFeacInfo[" << iddl << "][" << ifeac << "].stripInSM[" << istrip << "] = " << mFeacInfo[iddl][ifeac].stripInSM[istrip];
187 }
188 Geo::getStripAndModule(mFeacInfo[iddl][ifeac].stripInSM[istrip], plate, strip);
189 det[1] = plate;
190 det[2] = strip;
191 det[3] = ipadz;
192 det[4] = ipadx;
193 if (mVerboseHVLV) {
194 LOG(info) << "det[0] = " << det[0] << ", det[1] = " << det[1] << ", det[2] = " << det[2] << ", det[3] = " << det[3] << ", det[4] = " << det[4];
195 }
196 int channelIdx = Geo::getIndex(det);
197 if (mFeac[channelIdx] != singlefeacstatus) {
198 mFeac[channelIdx] = singlefeacstatus;
199 }
200 }
201 }
202 }
203 } // end loop on FEACs
204 if (mVerboseHVLV) {
205 LOG(info) << "Updating previous FEAC status for DDL " << iddl;
206 }
207 mPrevFEACstatus[iddl] = feacstatus;
208 } // end processing current DP, when it is of type FEACSTATUS
209
210 if (std::strstr(dpid.get_alias(), "HVSTATUS") != nullptr) { // DP is HVSTATUS
211 std::string aliasStr(dpid.get_alias());
212 // extracting SECTOR and PLATE number (regex is quite slow, using this way)
213 const auto offs = std::strlen("TOF_HVSTATUS_SM");
214 std::size_t const nn = aliasStr.find_first_of("0123456789", offs);
215 std::size_t const mm = aliasStr.find_first_not_of("0123456789", nn);
216 std::size_t const oo = aliasStr.find_first_of("0123456789", mm);
217 std::size_t const pp = aliasStr.find_first_not_of("0123456789", oo);
218 std::string sectorStr = aliasStr.substr(nn, mm != std::string::npos ? mm - nn : mm);
219 auto isect = std::stoi(sectorStr);
220 std::string plateStr = aliasStr.substr(oo, pp != std::string::npos ? pp - oo : pp);
221 auto iplat = std::stoi(plateStr);
222 std::bitset<19> hvstatus(o2::dcs::getValue<int32_t>(dpcom));
223 if (mVerboseHVLV) {
224 LOG(info) << "Sector: " << isect << ", plate = " << iplat << ": Prev HV = "
225 << mPrevHVstatus[iplat][isect] << ", new = " << hvstatus;
226 }
227 if (hvstatus == mPrevHVstatus[iplat][isect]) {
228 if (mVerboseHVLV) {
229 LOG(info) << "Same HV status as before, we do nothing";
230 }
231 return 0;
232 }
233 if (mVerboseHVLV) {
234 LOG(info) << "Something changed in HV for Sect " << isect << " and plate "
235 << iplat << ", we need to check what";
236 }
237 mUpdateHVStatus = true;
238 int det[5] = {isect, iplat, -1, -1, -1};
239 auto nStrips = (iplat == 2 ? Geo::NSTRIPA : (iplat == 0 || iplat == 4) ? Geo::NSTRIPC : Geo::NSTRIPB);
240 for (auto istrip = 0; istrip < nStrips; ++istrip) {
241 auto singlestripHV = hvstatus[istrip];
242 for (int ipadz = 0; ipadz < Geo::NPADZ; ++ipadz) {
243 for (int ipadx = 0; ipadx < Geo::NPADX; ++ipadx) {
244 det[2] = istrip;
245 det[3] = ipadz;
246 det[4] = ipadx;
247 int channelIdx = Geo::getIndex(det);
248 if (mHV[channelIdx] != singlestripHV) {
249 mHV[channelIdx] = singlestripHV;
250 }
251 }
252 }
253 } // end loop on strips
254 if (mVerboseHVLV) {
255 LOG(info) << "Updating previous HV status for Sector: " << isect << ", plate = " << iplat;
256 }
257 mPrevHVstatus[iplat][isect] = hvstatus;
258 } //end processing current DP, when it is of type HVSTATUS
259 }
260 }
261 return 0;
262}
263
264//______________________________________________________________________
265
266uint64_t TOFDCSProcessor::processFlags(const uint64_t flags, const char* pid)
267{
268
269 // function to process the flag. the return code zero means that all is fine.
270 // anything else means that there was an issue
271
272 // for now, I don't know how to use the flags, so I do nothing
273 if (!mVerboseDP) {
274 return 0;
275 }
277 LOG(debug) << "KEEP_ALIVE_FLAG active for DP " << pid;
278 }
280 LOG(debug) << "END_FLAG active for DP " << pid;
281 }
283 LOG(debug) << "FBI_FLAG active for DP " << pid;
284 }
286 LOG(debug) << "NEW_FLAG active for DP " << pid;
287 }
289 LOG(debug) << "DIRTY_FLAG active for DP " << pid;
290 }
292 LOG(debug) << "TURN_FLAG active for DP " << pid;
293 }
295 LOG(debug) << "WRITE_FLAG active for DP " << pid;
296 }
298 LOG(debug) << "READ_FLAG active for DP " << pid;
299 }
301 LOG(debug) << "OVERWRITE_FLAG active for DP " << pid;
302 }
304 LOG(debug) << "VICTIM_FLAG active for DP " << pid;
305 }
307 LOG(debug) << "DIM_ERROR_FLAG active for DP " << pid;
308 }
310 LOG(debug) << "BAD_DPID_FLAG active for DP " << pid;
311 }
313 LOG(debug) << "BAD_FLAGS_FLAG active for DP " << pid;
314 }
316 LOG(debug) << "BAD_TIMESTAMP_FLAG active for DP " << pid;
317 }
319 LOG(debug) << "BAD_PAYLOAD_FLAG active for DP " << pid;
320 }
322 LOG(debug) << "BAD_FBI_FLAG active for DP " << pid;
323 }
324
325 return 0;
326}
327
328//______________________________________________________________________
329
331{
332
333 // here we create the object to then be sent to CCDB
334 LOG(info) << "Finalizing";
335 union Converter {
336 uint64_t raw_data;
337 double double_value;
338 } converter0, converter1;
339
340 for (auto& it : mPids) {
341 const auto& type = it.first.get_type();
343 auto& tofdcs = mTOFDCS[it.first];
344 if (it.second) { // we processed the DP at least 1x
345 if (mVerboseDP) {
346 LOG(info) << "Processing DP " << it.first.get_alias();
347 }
348 it.second = false; // reset for the next period
349 tofdcs.updated = true;
350 auto& dpvect = mDpsdoublesmap[it.first];
351 tofdcs.firstValue.first = dpvect[0].get_epoch_time();
352 converter0.raw_data = dpvect[0].payload_pt1;
353 tofdcs.firstValue.second = converter0.double_value;
354 tofdcs.lastValue.first = dpvect.back().get_epoch_time();
355 converter0.raw_data = dpvect.back().payload_pt1;
356 tofdcs.lastValue.second = converter0.double_value;
357 // find min and max
358 for (const auto& el : dpvect) {
359 converter0.raw_data = el.payload_pt1;
360 if (converter0.double_value < tofdcs.minValue.second) {
361 tofdcs.minValue.first = el.get_epoch_time();
362 tofdcs.minValue.second = converter0.double_value;
363 }
364 if (converter0.double_value > tofdcs.maxValue.second) {
365 tofdcs.maxValue.first = el.get_epoch_time();
366 tofdcs.maxValue.second = converter0.double_value;
367 }
368 }
369 // now I will look for the max change
370 if (dpvect.size() > 1) {
371 auto deltatime = dpvect.back().get_epoch_time() - dpvect[0].get_epoch_time();
372 if (deltatime < 60000) {
373 // if we did not cover at least 1 minute,
374 // max variation is defined as the difference between first and last value
375 converter0.raw_data = dpvect[0].payload_pt1;
376 converter1.raw_data = dpvect.back().payload_pt1;
377 double delta = converter0.double_value - converter1.double_value;
378 tofdcs.maxChange.first[0] = dpvect[0].get_epoch_time();
379 tofdcs.maxChange.first[1] = dpvect.back().get_epoch_time();
380 tofdcs.maxChange.second = delta;
381 } else {
382 for (auto i = 0; i < dpvect.size() - 1; ++i) {
383 for (auto j = i + 1; j < dpvect.size(); ++j) {
384 auto deltatime = dpvect[j].get_epoch_time() - dpvect[i].get_epoch_time();
385 if (deltatime >= 60000) { // we compare to values coming from at least 1 minute later; epoch_time in ms
386 converter0.raw_data = dpvect[i].payload_pt1;
387 converter1.raw_data = dpvect[j].payload_pt1;
388 double delta = converter0.double_value - converter1.double_value;
389 if (std::abs(delta) > std::abs(tofdcs.maxChange.second)) {
390 tofdcs.maxChange.first[0] = dpvect[i].get_epoch_time();
391 tofdcs.maxChange.first[1] = dpvect[j].get_epoch_time();
392 tofdcs.maxChange.second = delta;
393 }
394 }
395 }
396 }
397 }
398 // mid point
399 auto midIdx = dpvect.size() / 2 - 1;
400 tofdcs.midValue.first = dpvect[midIdx].get_epoch_time();
401 converter0.raw_data = dpvect[midIdx].payload_pt1;
402 tofdcs.midValue.second = converter0.double_value;
403 } else {
404 tofdcs.maxChange.first[0] = dpvect[0].get_epoch_time();
405 tofdcs.maxChange.first[1] = dpvect[0].get_epoch_time();
406 converter0.raw_data = dpvect[0].payload_pt1;
407 tofdcs.maxChange.second = converter0.double_value;
408 tofdcs.midValue.first = dpvect[0].get_epoch_time();
409 converter0.raw_data = dpvect[0].payload_pt1;
410 tofdcs.midValue.second = converter0.double_value;
411 }
412 } else {
413 tofdcs.updated = false;
414 }
415 if (mVerboseDP) {
416 LOG(info) << "PID " << it.first.get_alias() << " was updated to:";
417 tofdcs.print();
418 }
419 }
420 }
421 if (mVerboseDP) {
422 LOG(info) << "Printing object to be sent to CCDB";
423 for (auto& it : mPids) {
424 const auto& type = it.first.get_type();
426 LOG(info) << "PID = " << it.first.get_alias();
427 auto& tofdcs = mTOFDCS[it.first];
428 tofdcs.print();
429 }
430 }
431 LOG(info) << "done";
432 }
433
434 std::map<std::string, std::string> md;
435 md["responsible"] = "Chiara Zampolli";
436 o2::calibration::Utils::prepareCCDBobjectInfo(mTOFDCS, mccdbDPsInfo, "TOF/Calib/DCSDPs", md, mStartValidityDPs, mStartValidityDPs + 3 * o2::ccdb::CcdbObjectInfo::DAY);
437
438 return;
439}
440
441//______________________________________________________________________
442
444{
445
446 // we need to update a CCDB for the FEAC status --> let's prepare the CCDBInfo
447
448 if (mVerboseHVLV) {
449 LOG(info) << "At least one FEAC changed status --> we will update CCDB";
450 }
451 std::map<std::string, std::string> md;
452 md["responsible"] = "Chiara Zampolli";
453 o2::calibration::Utils::prepareCCDBobjectInfo(mFeac, mccdbLVInfo, "TOF/Calib/LVStatus", md, mStartValidityLV, mStartValidityLV + o2::ccdb::CcdbObjectInfo::MONTH);
454 return;
455}
456
457//______________________________________________________________________
458
460{
461
462 // we need to update a CCDB for the HV status --> let's prepare the CCDBInfo
463
464 if (mVerboseHVLV) {
465 LOG(info) << "At least one HV changed status --> we will update CCDB";
466 }
467 std::map<std::string, std::string> md;
468 md["responsible"] = "Chiara Zampolli";
469 o2::calibration::Utils::prepareCCDBobjectInfo(mHV, mccdbHVInfo, "TOF/Calib/HVStatus", md, mStartValidityHV, mStartValidityHV + o2::ccdb::CcdbObjectInfo::MONTH);
470 return;
471}
472
473//_______________________________________________________________________
474
475void TOFDCSProcessor::getStripsConnectedToFEAC(int nDDL, int nFEAC, TOFFEACinfo& info) const
476{
477
478 //
479 // Taken from AliRoot/TOF/AliTOFLvHvDataPoints.cxx
480 //
481 // FEAC-strip mapping:
482 // return the strips and first PadX numbers
483 // connected to the FEAC number nFEAC in the crate number nDDL
484 //
485
486 switch (nDDL % 4) {
487 case 0:
488 info.firstPadX = 0;
489 info.lastPadX = Geo::NPADX / 2 - 1;
490
491 if (nFEAC <= 2) {
492 for (int ii = 0; ii < 6; ++ii) {
493 info.stripInSM[ii] = ii + 6 * nFEAC;
494 }
495 } else if (nFEAC == 3) {
496 for (int ii = 0; ii < 5; ++ii) {
497 info.stripInSM[ii] = ii + 6 * nFEAC;
498 }
499 } else if (nFEAC == 4) {
500 for (int ii = 0; ii < 6; ++ii) {
501 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
502 }
503 } else if (nFEAC == 5) {
504 for (int ii = 0; ii < 5; ++ii) {
505 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
506 }
507 } else if (nFEAC == 6) {
508 for (int ii = 0; ii < 6; ++ii) {
509 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
510 }
511 } else if (nFEAC == 7) {
512 for (int ii = 0; ii < 5; ++ii) {
513 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
514 }
515 }
516
517 break;
518 case 1:
519 info.firstPadX = Geo::NPADX / 2;
520 info.lastPadX = Geo::NPADX - 1;
521
522 if (nFEAC <= 2) {
523 for (int ii = 0; ii < 6; ++ii) {
524 info.stripInSM[ii] = ii + 6 * nFEAC;
525 }
526 } else if (nFEAC == 3) {
527 for (int ii = 0; ii < 5; ++ii) {
528 info.stripInSM[ii] = ii + 6 * nFEAC;
529 }
530 } else if (nFEAC == 4) {
531 for (int ii = 0; ii < 6; ++ii) {
532 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
533 }
534 } else if (nFEAC == 5) {
535 for (int ii = 0; ii < 6; ++ii) {
536 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
537 }
538 } else if (nFEAC == 6) {
539 for (int ii = 0; ii < 5; ++ii) {
540 info.stripInSM[ii] = ii + 6 * nFEAC - 1;
541 }
542 } else if (nFEAC == 7) {
543 for (int ii = 0; ii < 6; ++ii) {
544 info.stripInSM[ii] = ii + 6 * nFEAC - 2;
545 }
546 }
547
548 break;
549 case 2:
550 info.firstPadX = Geo::NPADX / 2;
551 info.lastPadX = Geo::NPADX - 1;
552
553 if (nFEAC <= 2) {
554 for (int ii = 0; ii < 6; ++ii) {
555 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
556 }
557 } else if (nFEAC == 3) {
558 for (int ii = 0; ii < 5; ++ii) {
559 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
560 }
561 } else if (nFEAC == 4) {
562 for (int ii = 0; ii < 6; ++ii) {
563 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
564 }
565 } else if (nFEAC == 5) {
566 for (int ii = 0; ii < 5; ++ii) {
567 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
568 }
569 } else if (nFEAC == 6) {
570 for (int ii = 0; ii < 6; ++ii) {
571 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
572 }
573 } else if (nFEAC == 7) {
574 for (int ii = 0; ii < 5; ++ii) {
575 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
576 }
577 }
578
579 break;
580 case 3:
581 info.firstPadX = 0;
582 info.lastPadX = Geo::NPADX / 2 - 1;
583
584 if (nFEAC <= 2) {
585 for (int ii = 0; ii < 6; ++ii) {
586 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
587 }
588 } else if (nFEAC == 3) {
589 for (int ii = 0; ii < 5; ++ii) {
590 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC);
591 }
592 } else if (nFEAC == 4) {
593 for (int ii = 0; ii < 6; ++ii) {
594 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
595 }
596 } else if (nFEAC == 5) {
597 for (int ii = 0; ii < 6; ++ii) {
598 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
599 }
600 } else if (nFEAC == 6) {
601 for (int ii = 0; ii < 5; ++ii) {
602 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 1);
603 }
604 } else if (nFEAC == 7) {
605 for (int ii = 0; ii < 6; ++ii) {
606 info.stripInSM[ii] = 90 - (ii + 6 * nFEAC - 2);
607 }
608 }
609
610 break;
611 }
612 if (mVerboseHVLV) {
613 for (int ii = 0; ii < 6; ++ii) {
614 LOG(info) << "nDDL = " << nDDL << ", nFEAC = " << nFEAC << ", stripInSM[" << ii << "] = " << info.stripInSM[ii];
615 }
616 }
617}
Utils and constants for calibration and related workflows.
int32_t i
uint32_t j
Definition RawData.h:0
uint16_t pid
Definition RawData.h:2
ClassImp(o2::tof::TOFDCSinfo)
std::ostringstream debug
static constexpr long MONTH
static constexpr long DAY
DeliveryType get_type() const noexcept
static void getStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip)
Definition Geo.cxx:1148
static constexpr Int_t NPADZ
Definition Geo.h:109
static constexpr Int_t NSTRIPB
Definition Geo.h:113
static constexpr Int_t NSTRIPC
Definition Geo.h:114
static constexpr Int_t NSTRIPA
Definition Geo.h:112
static Int_t getIndex(const Int_t *detId)
Definition Geo.cxx:563
static constexpr Int_t NPADX
Definition Geo.h:107
void init(const std::vector< DPID > &pids)
int process(const gsl::span< const DPCOM > dps)
static constexpr int NDDLS
void getStripsConnectedToFEAC(int nDDL, int nFEAC, TOFFEACinfo &info) const
int processDP(const DPCOM &dpcom)
uint64_t processFlags(uint64_t flag, const char *pid)
static constexpr int NFEACS
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLuint GLfloat * val
Definition glcorearb.h:1582
GLbitfield flags
Definition glcorearb.h:1570
static void prepareCCDBobjectInfo(T &obj, o2::ccdb::CcdbObjectInfo &info, const std::string &path, const std::map< std::string, std::string > &md, long start, long end=-1)
Definition Utils.h:91
static constexpr uint16_t BAD_TIMESTAMP_FLAG
static constexpr uint16_t WRITE_FLAG
static constexpr uint16_t DIRTY_FLAG
static constexpr uint64_t TURN_FLAG
static constexpr uint16_t FBI_FLAG
static constexpr uint16_t END_FLAG
static constexpr uint16_t BAD_PAYLOAD_FLAG
static constexpr uint16_t BAD_DPID_FLAG
static constexpr uint16_t KEEP_ALIVE_FLAG
static constexpr uint16_t DIM_ERROR_FLAG
static constexpr uint16_t OVERWRITE_FLAG
static constexpr uint16_t BAD_FBI_FLAG
static constexpr uint16_t VICTIM_FLAG
static constexpr uint16_t BAD_FLAGS_FLAG
static constexpr uint16_t READ_FLAG
static constexpr uint16_t NEW_FLAG
std::pair< O2LongUInt, double > minValue
std::pair< O2LongUInt, double > midValue
std::pair< O2LongUInt, double > firstValue
std::pair< std::array< O2LongUInt, 2 >, double > maxChange
std::pair< O2LongUInt, double > lastValue
std::pair< O2LongUInt, double > maxValue
std::array< int32_t, 6 > stripInSM
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"