Project
Loading...
Searching...
No Matches
CDBInterface.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
15
16// system includes
17#include <cxxabi.h>
18#include <ctime>
19#include <memory>
20#include <filesystem>
21#include <string_view>
22#include <fmt/format.h>
23#include <fmt/chrono.h>
24
25// root includes
26#include "TFile.h"
27#include "TRandom.h"
28
29// o2 includes
36#include "TPCBase/Utils.h"
37
38using namespace o2::tpc;
39
40// anonymous namespace to prevent usage outside of this file
41namespace
42{
44std::string demangle(std::string_view name)
45{
46 int status = -4; // some arbitrary value to eliminate the compiler warning
47 std::unique_ptr<char, void (*)(void*)> res{abi::__cxa_demangle(name.data(), nullptr, nullptr, &status), std::free};
48 return (status == 0) ? res.get() : name.data();
49}
50} // end anonymous namespace
51
52CDBInterface::CDBInterface()
53{
55 mDeadChannelMapCreator.init(cdb.getURL());
56}
57
58//______________________________________________________________________________
60{
61 // ===| load noise and pedestals from file if requested |=====================
62 if (mPedestalNoiseFileName.size()) {
63 if (!mPedestals) {
64 loadNoiseAndPedestalFromFile();
65 }
66 } else if (mUseDefaults) {
67 if (!mPedestals) {
68 createDefaultPedestals();
69 }
70 } else {
71 // return from CDB, assume that check for object existence are done there
72 return getObjectFromCDB<CalPadMapType>(CDBTypeMap.at(CDBType::CalPedestalNoise)).at("Pedestals");
73 }
74
75 if (!mPedestals) {
76 LOG(fatal) << "No valid pedestal object was loaded";
77 }
78
79 return *mPedestals;
80}
81
82//______________________________________________________________________________
84{
85 // ===| load noise and pedestals from file if requested |=====================
86 if (mFEEParamFileName.size()) {
87 if (!mPedestalsCRU) {
88 loadFEEParamsFromFile();
89 }
90 } else if (mUseDefaults) {
91 if (!mPedestalsCRU) {
92 createDefaultPedestals();
93 }
94 } else {
95 // return from CDB, assume that check for object existence are done there
97 }
98
99 if (!mPedestalsCRU) {
100 LOG(fatal) << "No valid pedestal CRU object was loaded";
101 }
102
103 return *mPedestalsCRU;
104}
105
106//______________________________________________________________________________
108{
109 // ===| load noise and pedestals from file if requested |=====================
110 if (mPedestalNoiseFileName.size()) {
111 if (!mNoise) {
112 loadNoiseAndPedestalFromFile();
113 }
114 } else if (mUseDefaults) {
115 if (!mNoise) {
116 createDefaultNoise();
117 }
118 } else {
119 // return from CDB, assume that check for object existence are done there
120 return getObjectFromCDB<CalPadMapType>(CDBTypeMap.at(CDBType::CalPedestalNoise)).at("Noise");
121 }
122
123 if (!mNoise) {
124 LOG(fatal) << "No valid noise object was loaded";
125 }
126
127 return *mNoise;
128}
129
130//______________________________________________________________________________
132{
133 // ===| load gain map from file if requested |=====================
134 if (mFEEParamFileName.size()) {
135 if (!mZeroSuppression) {
136 loadFEEParamsFromFile();
137 }
138 } else if (mUseDefaults) {
139 if (!mZeroSuppression) {
140 createDefaultZeroSuppression();
141 }
142 } else {
143 // return from CDB, assume that check for object existence are done there
145 }
146
147 if (!mZeroSuppression) {
148 LOG(fatal) << "No valid zero suppression object was loaded";
149 }
150
151 return *mZeroSuppression;
152}
153
154//______________________________________________________________________________
156{
157 // ===| load gain map from file if requested |=====================
158 if (mGainMapFileName.size()) {
159 if (!mGainMap) {
160 loadGainMapFromFile();
161 }
162 } else if (mUseDefaults) {
163 if (!mGainMap) {
164 createDefaultGainMap();
165 }
166 } else {
167 // return from CDB, assume that check for object existence are done there
168 return getObjectFromCDB<CalPad>(CDBTypeMap.at(CDBType::CalPadGainFull));
169 }
170
171 if (!mGainMap) {
172 LOG(fatal) << "No valid gain object was loaded";
173 }
174
175 return *mGainMap;
176}
177
178//______________________________________________________________________________
180{
181 // ===| load gain map from file if requested |=====================
182 if (mFEEParamFileName.size()) {
183 if (!mITFraction) {
184 loadFEEParamsFromFile();
185 }
186 } else if (mUseDefaults) {
187 if (!mITFraction) {
188 createDefaultIonTailParams();
189 }
190 } else {
191 // return from CDB, assume that check for object existence are done there
193 }
194
195 if (!mITFraction) {
196 LOG(fatal) << "No valid ion tail fraction parameters were loaded";
197 }
198
199 return *mITFraction;
200}
201
202//______________________________________________________________________________
204{
205 // ===| load gain map from file if requested |=====================
206 if (mFEEParamFileName.size()) {
207 if (!mITExpLambda) {
208 loadFEEParamsFromFile();
209 }
210 } else if (mUseDefaults) {
211 if (!mITExpLambda) {
212 createDefaultIonTailParams();
213 }
214 } else {
215 // return from CDB, assume that check for object existence are done there
217 }
218
219 if (!mITExpLambda) {
220 LOG(fatal) << "No valid ion tail slope (expLamda) parameters were loaded";
221 }
222
223 return *mITExpLambda;
224}
225
226//______________________________________________________________________________
228{
229 // ===| load gain map from file if requested |=====================
230 if (mFEEParamFileName.size()) {
231 if (!mCMkValues) {
232 loadFEEParamsFromFile();
233 }
234 } else if (mUseDefaults) {
235 if (!mCMkValues) {
236 createDefaultCMParams();
237 }
238 } else {
239 // return from CDB, assume that check for object existence are done there
241 }
242
243 if (!mCMkValues) {
244 LOG(fatal) << "No valid ion tail slope (expLamda) parameters were loaded";
245 }
246
247 return *mCMkValues;
248}
249
250//______________________________________________________________________________
252{
253 if (mUseDefaults) {
254 if (!mPadFlags) {
255 createDefaultPadFlags();
256 }
257 } else {
258 // return from CDB, assume that check for object existence are done there
259 return getObjectFromCDB<CalPadFlagType>(CDBTypeMap.at(CDBType::CalIDCPadStatusMapA));
260 }
261
262 if (!mPadFlags) {
263 LOG(fatal) << "No valid IDC PadFlags were loaded";
264 }
265
266 return *mPadFlags;
267}
268
269//______________________________________________________________________________
271{
273 getFEEConfig();
274 mDeadChannelMapCreator.setDeadChannelMapIDCPadStatus(getPadFlags());
275 mDeadChannelMapCreator.finalizeDeadChannelMap();
276 return mDeadChannelMapCreator.getDeadChannelMap();
277}
278
279//______________________________________________________________________________
281{
282 if (!mUseDefaults) {
284 mDeadChannelMapCreator.loadFEEConfigViaRunInfoTS(cdb.getTimestamp());
285
286 const auto feeConfig = mDeadChannelMapCreator.getFEEConfig();
287 if (feeConfig != nullptr) {
288 return *feeConfig;
289 }
290
291 LOGP(warning, "Could not retrieve FEEConfig");
292 }
293
294 createFEEConfig();
295 return *mFEEConfig;
296}
297
298//______________________________________________________________________________
300{
301 if (mUseDefaults) {
303 }
304
305 // return from CDB, assume that check for object existence are done there
306 return getObjectFromCDB<ParameterDetector>(CDBTypeMap.at(CDBType::ParDetector));
307}
308
309//______________________________________________________________________________
311{
312 if (mUseDefaults) {
314 }
315
316 // return from CDB, assume that check for object existence are done there
317 return getObjectFromCDB<ParameterElectronics>(CDBTypeMap.at(CDBType::ParElectronics));
318}
319
320//______________________________________________________________________________
322{
323 if (mUseDefaults) {
324 return ParameterGas::Instance();
325 }
326
327 // return from CDB, assume that check for object existence are done there
328 return getObjectFromCDB<ParameterGas>(CDBTypeMap.at(CDBType::ParGas));
329}
330
331//______________________________________________________________________________
333{
334 if (mUseDefaults) {
335 return ParameterGEM::Instance();
336 }
337
338 // return from CDB, assume that check for object existence are done there
339 return getObjectFromCDB<ParameterGEM>(CDBTypeMap.at(CDBType::ParGEM));
340}
341
342//______________________________________________________________________________
343const CalPad& CDBInterface::getCalPad(const std::string_view path)
344{
345 return getSpecificObjectFromCDB<CalPad>(path);
346}
347
348//______________________________________________________________________________
349void CDBInterface::loadNoiseAndPedestalFromFile()
350{
351 std::unique_ptr<TFile> file(TFile::Open(mPedestalNoiseFileName.data()));
352 CalPad* pedestals{nullptr};
353 CalPad* noise{nullptr};
354 file->GetObject("Pedestals", pedestals);
355 file->GetObject("Noise", noise);
356
357 if (!pedestals) {
358 LOG(fatal) << "No valid pedestal object was loaded";
359 }
360
361 if (!noise) {
362 LOG(fatal) << "No valid noise object was loaded";
363 }
364
365 mPedestals.reset(pedestals);
366 mNoise.reset(noise);
367
368 LOG(info) << "Loaded Noise and pedestal from file '" << mPedestalNoiseFileName << "'";
369}
370
371//______________________________________________________________________________
372void CDBInterface::loadGainMapFromFile()
373{
374 std::unique_ptr<TFile> file(TFile::Open(mGainMapFileName.data()));
375 CalPad* gain{nullptr};
376 file->GetObject("GainMap", gain);
377
378 if (!gain) {
379 LOG(fatal) << "No valid gain map object was loaded";
380 }
381
382 mGainMap.reset(gain);
383
384 LOG(info) << "Loaded gain map from file '" << mGainMapFileName << "'";
385}
386
387//______________________________________________________________________________
388void CDBInterface::loadFEEParamsFromFile()
389{
390 if (mFEEParamFileName.empty() || !std::filesystem::exists(mFEEParamFileName)) {
391 LOGP(fatal, "Could not find IF param file {}", mFEEParamFileName);
392 }
393
394 const std::string_view calDetNames = "ITfraction,ITexpLambda,ThresholdMap,Pedestals,CMkValues";
395 const auto calDetNamesVec = utils::tokenize(calDetNames, ",");
396 auto calDets = utils::readCalPads(mFEEParamFileName, calDetNamesVec);
397 for (size_t iCalDet = 0; iCalDet < calDetNamesVec.size(); ++iCalDet) {
398 if (!calDets[iCalDet]) {
399 LOGP(fatal, "Could not read '{}' object from file {}", calDetNamesVec[iCalDet], mFEEParamFileName);
400 }
401 }
402
403 mITFraction.reset(calDets[0]);
404 mITExpLambda.reset(calDets[1]);
405 mZeroSuppression.reset(calDets[2]);
406 mPedestalsCRU.reset(calDets[3]);
407 mCMkValues.reset(calDets[4]);
408
409 LOGP(info, "Loaded FEE parameters {} from file {}", calDetNames, mFEEParamFileName);
410}
411
412//______________________________________________________________________________
413void CDBInterface::createDefaultPedestals()
414{
415 // ===| create random pedestals |=============================================
416 mPedestals = std::make_unique<CalPad>("Pedestals");
417
418 // distribution based on test beam data
419 const float meanPedestal = 72.5;
420 const float sigmaPedestal = 9.0;
421
422 // set a minimum and maximum for the value
423 const float minPedestal = meanPedestal - 4 * sigmaPedestal;
424 const float maxPedestal = meanPedestal + 4 * sigmaPedestal;
425
426 for (auto& calArray : mPedestals->getData()) {
427 for (auto& val : calArray.getData()) {
428 float random = gRandom->Gaus(meanPedestal, sigmaPedestal);
429 if (random < minPedestal) {
430 random = minPedestal;
431 }
432 if (random > maxPedestal) {
433 random = maxPedestal;
434 }
435 val = random;
436 }
437 }
438
439 // TODO: Convert to 12bit?
440 mPedestalsCRU = std::make_unique<CalPad>(*mPedestals);
441}
442
443//______________________________________________________________________________
444void CDBInterface::createDefaultNoise()
445{
446 // ===| create random noise |=============================================
447 mNoise = std::make_unique<CalPad>("Noise");
448
449 // distribution based on test beam data
450 const float meanNoise = 1.0;
451 const float sigmaNoise = 0.05;
452
453 // set a minimum and maximum for the value
454 const float minNoise = meanNoise - 4 * sigmaNoise;
455 const float maxNoise = meanNoise + 8 * sigmaNoise;
456
457 for (auto& calArray : mNoise->getData()) {
458 for (auto& val : calArray.getData()) {
459 float random = gRandom->Gaus(meanNoise, sigmaNoise);
460 if (random < minNoise) {
461 random = minNoise;
462 }
463 if (random > maxNoise) {
464 random = maxNoise;
465 }
466 val = random;
467 }
468 }
469
470 LOGP(info, "created default noise map");
471}
472
473//______________________________________________________________________________
474void CDBInterface::createDefaultZeroSuppression()
475{
476 // default map is mDefaultZSsigma * noise
477 mZeroSuppression = std::unique_ptr<CalPad>(new CalPad(getNoise()));
478 mZeroSuppression->setName("ThresholdMap");
479
480 const auto zsSigma = mDefaultZSsigma;
481 for (auto& calArray : mZeroSuppression->getData()) {
482 auto& data = calArray.getData();
483 std::transform(data.begin(), data.end(), data.begin(), [zsSigma](const auto value) { return zsSigma * value; });
484 }
485
486 LOGP(info, "created default threshold map");
487}
488
489//______________________________________________________________________________
490void CDBInterface::createDefaultGainMap()
491{
492 // ===| create random gain map |=============================================
493 mGainMap = std::make_unique<CalPad>("Gain");
494
495 // distribution based on test beam data
496 const float meanGain = 1.0;
497 const float sigmaGain = 0.12;
498
499 // set a minimum and maximum for the value
500 const float minGain = meanGain - 4 * sigmaGain;
501 const float maxGain = meanGain + 8 * sigmaGain;
502
503 for (auto& calArray : mGainMap->getData()) {
504 for (auto& val : calArray.getData()) {
505 float random = gRandom->Gaus(meanGain, sigmaGain);
506 if (random < minGain) {
507 random = minGain;
508 }
509 if (random > maxGain) {
510 random = maxGain;
511 }
512 val = random;
513 }
514 }
515 LOGP(info, "created default gain map");
516}
517
518//______________________________________________________________________________
519void CDBInterface::createDefaultIonTailParams()
520{
521 mITFraction = std::make_unique<CalPad>("ITfraction");
522 mITExpLambda = std::make_unique<CalPad>("ITexpLambda");
523
524 *mITFraction += 0.1276;
525 *mITExpLambda += std::exp(-0.0515);
526
527 LOGP(info, "created default ion tail per-pad parameters");
528}
529
530//______________________________________________________________________________
531void CDBInterface::createDefaultCMParams()
532{
533 mCMkValues = std::make_unique<CalPad>("CMkValues");
534
535 *mCMkValues += 1.f;
536
537 LOGP(info, "created default ion tail per-pad parameters");
538}
539
540//______________________________________________________________________________
541void CDBInterface::createDefaultPadFlags()
542{
543 mPadFlags = std::make_unique<CalPadFlagType>("CMkValues");
544
545 *mPadFlags = PadFlags::flagGoodPad;
546
547 LOGP(info, "created default pad flags");
548}
549
550//______________________________________________________________________________
551void CDBInterface::createFEEConfig()
552{
553 if (mFEEConfig) {
554 return;
555 }
556
557 if (!mUseDefaults) {
558 LOGP(info, "trying to load default FEEConfig");
559 mDeadChannelMapCreator.loadFEEConfig(1680525888290); // load oldest physics configuration
560 if (mFEEConfig) {
561 return;
562 }
563 }
564
565 LOGP(info, "creating best guess FEEConfig");
566 auto feeConfig = new FEEConfig;
567 feeConfig->setAllLinksOn();
568 feeConfig->tag = FEEConfig::Tags::Physics30sigma;
569
570 if (!mUseDefaults) {
571 feeConfig->padMaps = getObjectFromCDB<CalPadMapType>(CDBTypeMap.at(CDBType::ConfigFEEPad));
572 } else {
573 auto& maps = feeConfig->padMaps;
574 maps["CMkValues"] = getCMkValues();
575 maps["ITexpLambda"] = getITExpLambda();
576 maps["ITfraction"] = getITFraction();
577 maps["ThresholdMap"] = getZeroSuppressionThreshold();
578 maps["Pedestals"] = getPedestalsCRU();
579 }
580
581 mFEEConfig.reset(feeConfig);
582}
583
584//______________________________________________________________________________
585bool CDBStorage::checkMetaData(MetaData_t metaData) const
586{
587 if (!metaData.size()) {
588 LOGP(error, "no meta data set");
589 }
590
591 const std::array<std::string_view, 3> requirements{
592 "Required",
593 "Recommended",
594 "Optional"};
595
596 const std::array<std::vector<std::string_view>, 3> tests{{
597 {"Responsible", "Reason", "Intervention"}, // errors
598 {"JIRA"}, // warnings
599 {"Comment"} // infos
600 }};
601
602 std::array<int, 3> counts{};
603
604 for (size_t i = 0; i < requirements.size(); ++i) {
605 for (const auto& test : tests[i]) {
606 if (!metaData[test.data()].size()) {
607 const auto message = fmt::format("{} field {} not set in meta data", requirements[i], test);
608 if (i == 0) {
609 LOG(error) << message;
610 } else if (i == 1) {
611 LOG(warning) << message;
612 } else {
613 LOG(info) << message;
614 }
615 ++counts[i];
616 } else {
617 LOGP(debug, "{} field '{}' set to '{}'", requirements[i], test, metaData[test.data()]);
618 }
619 }
620 }
621
622 return counts[0] == 0;
623}
624
625//______________________________________________________________________________
627{
628 std::string metaDataString;
629 return metaDataString;
630}
631
632//______________________________________________________________________________
633void CDBStorage::uploadNoiseAndPedestal(std::string_view fileName, long first, long last)
634{
635 std::unique_ptr<TFile> file(TFile::Open(fileName.data()));
636 CalPad* pedestals{nullptr};
637 CalPad* noise{nullptr};
638 file->GetObject("Pedestals", pedestals);
639 file->GetObject("Noise", noise);
640
641 if (!pedestals) {
642 LOGP(fatal, "No valid pedestal object was loaded from file {}", fileName);
643 }
644
645 if (!noise) {
646 LOGP(fatal, "No valid noise object was loaded from file {}", fileName);
647 }
648
650
651 calib["Pedestals"] = *pedestals;
652 calib["Noise"] = *noise;
653
655}
656
657//______________________________________________________________________________
658void CDBStorage::uploadGainMap(std::string_view fileName, bool isFull, long first, long last)
659{
660 std::unique_ptr<TFile> file(TFile::Open(fileName.data()));
661 CalPad* gain{nullptr};
662 file->GetObject("GainMap", gain);
663
664 if (!gain) {
665 LOG(fatal) << "No valid gain map object was loaded";
666 }
667
669}
670
671//______________________________________________________________________________
672void CDBStorage::uploadPulserOrCEData(CDBType type, std::string_view fileName, long first, long last)
673{
674 auto calPads = o2::tpc::utils::readCalPads(fileName, "T0,Width,Qtot");
675
676 if (calPads.size() != 3) {
677 LOGP(fatal, "Missing pulser object in file {}", fileName);
678 }
679 auto t0 = calPads[0];
680 auto width = calPads[1];
681 auto qtot = calPads[2];
682
683 std::unordered_map<std::string, CalDet<float>> pulserCalib;
684 pulserCalib["T0"] = *t0;
685 pulserCalib["Width"] = *width;
686 pulserCalib["Qtot"] = *qtot;
687
688 storeObject(&pulserCalib, type, first, last);
689}
690
691//______________________________________________________________________________
692void CDBStorage::uploadFEEConfigPad(std::string_view fileName, long first, long last)
693{
694 auto calPads = o2::tpc::utils::readCalPads(fileName, "ThresholdMap");
695
696 if (calPads.size() != 1) {
697 LOGP(fatal, "Missing pulser object in file {}", fileName);
698 }
699 auto thresholdMap = calPads[0];
700
701 std::unordered_map<std::string, CalDet<float>> feeConfigPad;
702 feeConfigPad["ThresholdMap"] = *thresholdMap;
703
704 storeObject(&feeConfigPad, CDBType::ConfigFEEPad, first, last);
705}
706
707//______________________________________________________________________________
708void CDBStorage::uploadTimeGain(std::string_view fileName, long first, long last)
709{
710 std::unique_ptr<TFile> file(TFile::Open(fileName.data()));
711 auto timeGain = file->Get<o2::tpc::CalibdEdxCorrection>("CalibdEdxCorrection");
712
713 if (!timeGain) {
714 LOGP(fatal, "No valid timeGain object found in {}", fileName);
715 }
716
717 storeObject(timeGain, CDBType::CalTimeGain, first, last);
718}
719
720//______________________________________________________________________________
721void CDBStorage::printObjectSummary(std::string_view name, CDBType const type, MetaData_t const& metadata, long start, long end) const
722{
723 std::time_t tstart(start / 1000);
724 std::time_t tend(end / 1000);
725 auto tstartms = start % 1000;
726 auto tendms = end % 1000;
727
728 std::string message = fmt::format("Writing object of type '{}'\n", demangle(name)) +
729 fmt::format(" to storage '{}'\n", mCCDB.getURL()) +
730 fmt::format(" into path '{}'\n", CDBTypeMap.at(type)) +
731 fmt::format(" with validity [{}, {}] :", start, end) +
732 fmt::format(" [{:%d.%m.%Y %H:%M:%S}.{:03d}, {:%d.%m.%Y %H:%M:%S}.{:03d}]\n", fmt::localtime(tstart), tstartms, fmt::localtime(tend), tendms) +
733 std::string(" Meta data:\n");
734
735 for (const auto& [key, value] : metadata) {
736 message += fmt::format("{:>20} = {}\n", key, value);
737 }
738
739 LOGP(info, "{}", message);
740}
Simple interface to the CDB manager.
int32_t i
Definition of the parameter class for the detector.
Definition of the parameter class for the detector electronics.
Definition of the parameter class for the GEM stack.
Definition of the parameter class for the detector gas.
uint32_t res
Definition RawData.h:0
std::ostringstream debug
const auto & getData()
StringRef key
static BasicCCDBManager & instance()
std::string const & getURL() const
Definition CcdbApi.h:87
const CalDet< bool > & getDeadChannelMap()
Dead channel map.
const CalPad & getCMkValues()
std::unordered_map< std::string, CalPad > CalPadMapType
const CalPad & getITFraction()
const ParameterDetector & getParameterDetector()
const CalPad & getPedestals()
const CalPad & getZeroSuppressionThreshold()
Return the zero suppression threshold map.
const CalPad & getNoise()
const CalPad & getITExpLambda()
const ParameterElectronics & getParameterElectronics()
const ParameterGas & getParameterGas()
const ParameterGEM & getParameterGEM()
const CalPadFlagType & getPadFlags()
Pad status flags from IDCs.
const CalPad & getCalPad(const std::string_view path)
const CalPad & getGainMap()
const CalPad & getPedestalsCRU()
const FEEConfig & getFEEConfig()
Return FEEConfig.
void uploadTimeGain(std::string_view fileName, long first=-1, long last=o2::ccdb::CcdbObjectInfo::INFINITE_TIMESTAMP)
void uploadFEEConfigPad(std::string_view fileName, long first=-1, long last=o2::ccdb::CcdbObjectInfo::INFINITE_TIMESTAMP)
std::string getMetaDataString() const
void uploadPulserOrCEData(CDBType type, std::string_view fileName, long first=-1, long last=o2::ccdb::CcdbObjectInfo::INFINITE_TIMESTAMP)
void uploadNoiseAndPedestal(std::string_view fileName, long first=-1, long last=o2::ccdb::CcdbObjectInfo::INFINITE_TIMESTAMP)
void storeObject(T *obj, CDBType const type, MetaData_t const &metadata, long start, long end)
void uploadGainMap(std::string_view fileName, bool isFull=true, long first=-1, long last=o2::ccdb::CcdbObjectInfo::INFINITE_TIMESTAMP)
void setDeadChannelMapIDCPadStatus(const CalDetFlag_t &padStatusMap, PadFlags mask=PadFlags::flagAllNoneGood)
void init(std::string_view url="")
void loadFEEConfigViaRunInfoTS(long timeStamp)
const FEEConfig * getFEEConfig() const
const CalDet< bool > & getDeadChannelMap() const
GLuint GLuint end
Definition glcorearb.h:469
GLuint const GLchar * name
Definition glcorearb.h:781
GLint first
Definition glcorearb.h:399
GLint GLsizei width
Definition glcorearb.h:270
GLsizei const GLfloat * value
Definition glcorearb.h:819
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLboolean * data
Definition glcorearb.h:298
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
GLuint GLfloat * val
Definition glcorearb.h:1582
GLsizei const GLchar *const * path
Definition glcorearb.h:3591
GLuint GLsizei const GLchar * message
Definition glcorearb.h:2517
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
Definition glcorearb.h:5034
GLuint start
Definition glcorearb.h:469
std::string demangle(const char *name)
utility function to demangle cxx type names
Definition Detector.h:246
const std::vector< std::string > tokenize(const std::string_view input, const std::string_view pattern)
Definition Utils.cxx:40
std::vector< CalPad * > readCalPads(const std::string_view fileName, const std::vector< std::string > &calPadNames)
Definition Utils.cxx:190
Global TPC definitions and constants.
Definition SimTraits.h:167
const std::unordered_map< CDBType, const std::string > CDBTypeMap
Storage name in CCDB for each calibration and parameter type.
Definition CDBTypes.h:94
@ flagGoodPad
flag for a good pad binary 0001
CalDet< float > CalPad
Definition CalDet.h:492
CDBType
Calibration and parameter types for CCDB.
Definition CDBTypes.h:26
@ CalIDCPadStatusMapA
Status map of the pads (dead etc. obatined from CalIDC0)
@ ParDetector
Parameter for Detector.
@ ParElectronics
Parameter for Electronics.
@ CalPedestalNoise
Pedestal and Noise calibration.
@ CalPadGainFull
Full pad gain calibration.
@ ConfigFEEPad
FEE pad-by-pad configuration map.
@ ParGas
Parameter for Gas.
@ CalPadGainResidual
ResidualpPad gain calibration (e.g. from tracks)
@ CalTimeGain
Gain variation over time.
FIXME: do not use data model tables.
@ Physics30sigma
Physics configuration with 3.0 sigma thresholds.
const CalPad & getPadMap(PadConfig config) const
Definition FEEConfig.h:115
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"