12#ifndef ALICEO2_TPC_DeadChannelMapCreator_H_
13#define ALICEO2_TPC_DeadChannelMapCreator_H_
16#include <unordered_map>
46 struct ValidityRange {
47 long startvalidity = 0;
48 long endvalidity = -1;
49 bool isValid(
long ts)
const {
return ts < endvalidity && ts > startvalidity; }
57 void init(std::string_view
url =
"");
58 void load(
long timeStampOrRun);
89 std::unique_ptr<FEEConfig> mFEEConfig;
90 std::unique_ptr<CalDetFlag_t> mPadStatusMap;
94 std::unordered_map<CDBType, ValidityRange> mObjectValidity;
98 CalDet<bool> mDeadChannelMapFEE{
"DeadChannelMapFEE"};
99 CalDet<bool> mDeadChannelMap{
"DeadChannelMap"};
101 ClassDefNV(DeadChannelMapCreator, 0);
106 if (timeStampOrRun < 1000000) {
108 const auto c = mCCDBApi.
retrieveHeaders(
"RCT/Info/RunInformation", {}, timeStampOrRun);
109 timeStampOrRun = (std::stol(
c.at(
"SOR")) + std::stol(
c.at(
"EOR"))) / 2;
112 return timeStampOrRun;
CDB Type definitions for TPC.
Frontend electronics configuration values.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error s
std::map< std::string, std::string > retrieveHeaders(std::string const &path, std::map< std::string, std::string > const &metadata, long timestamp=-1) const
void loadFEEConfigViaRunInfo(long timeStampOrRun)
void setSource(SourcesDeadMap s)
void drawDeadChannelMapIDC()
long getTimeStamp(long timeStampOrRun) const
const CalDet< bool > & getDeadChannelMapFEE() const
const CalDet< bool > & getDeadChannelMapIDC() const
void resetDeadChannelMap()
bool useSource(SourcesDeadMap s) const
const CalDetFlag_t * getPadFlags() const
SourcesDeadMap getSources() const
void setDeadChannelMapIDCPadStatus(const CalDetFlag_t &padStatusMap, PadFlags mask=PadFlags::flagAllNoneGood)
void init(std::string_view url="")
void drawDeadChannelMapFEE()
void loadIDCPadFlags(long timeStampOrRun)
void load(long timeStampOrRun)
void loadFEEConfig(long timeStamp=-1)
void finalizeDeadChannelMap()
void setDeadChannelMapFEEConfig(const FEEConfig &feeConfig)
void addSource(SourcesDeadMap s)
void loadFEEConfigViaRunInfoTS(long timeStamp)
const FEEConfig * getFEEConfig() const
void drawDeadChannelMap()
const CalDet< bool > & getDeadChannelMap() const
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
Global TPC definitions and constants.
SourcesDeadMap operator|(SourcesDeadMap a, SourcesDeadMap b)
SourcesDeadMap operator&(SourcesDeadMap a, SourcesDeadMap b)
SourcesDeadMap operator~(SourcesDeadMap a)
@ IDCPadStatus
use idc pad status map
Marks an empty item in the context.
CalDet< bool > getDeadChannelMap() const
Dead channel map including deactivated links and single channels.