12#ifndef DETECTOR_TOFDCSPROCESSOR_H_
13#define DETECTOR_TOFDCSPROCESSOR_H_
17#include <unordered_map>
47 std::pair<std::array<O2LongUInt, 2>,
double>
maxChange;
54 lastValue = std::make_pair(0, -999999999);
55 midValue = std::make_pair(0, -999999999);
56 std::array<O2LongUInt, 2> atmp = {0, 0};
58 minValue = std::make_pair(0, 99999999999);
59 maxValue = std::make_pair(0, -99999999999);
74 std::array<int32_t, 6>
stripInSM = {-1, -1, -1, -1, -1, -1};
92 void init(
const std::vector<DPID>& pids);
95 int process(
const gsl::span<const DPCOM> dps);
106 const std::unordered_map<DPID, TOFDCSinfo>&
getTOFDPsInfo()
const {
return mTOFDCS; }
110 const std::bitset<Geo::NCHANNELS>&
getLVStatus()
const {
return mFeac; }
115 const std::bitset<Geo::NCHANNELS>&
getHVStatus()
const {
return mHV; }
132 mDpsdoublesmap.clear();
138 for (
auto& it : mPids) {
147 std::unordered_map<DPID, TOFDCSinfo> mTOFDCS;
148 std::unordered_map<DPID, bool> mPids;
150 std::unordered_map<DPID, std::vector<DPVAL>> mDpsdoublesmap;
153 std::array<std::array<TOFFEACinfo, NFEACS>,
NDDLS> mFeacInfo;
154 std::array<std::bitset<8>,
NDDLS> mPrevFEACstatus;
155 std::bitset<Geo::NCHANNELS> mFeac;
156 bool mUpdateFeacStatus =
false;
157 std::bitset<Geo::NCHANNELS> mHV;
159 bool mUpdateHVStatus =
false;
167 bool mVerboseDP =
false;
168 bool mVerboseHVLV =
false;
static constexpr long INFINITE_TIMESTAMP
static constexpr Int_t NSECTORS
static constexpr Int_t NPLATES
long getStartValidityLV() const
TOFDCSProcessor()=default
const CcdbObjectInfo & getccdbDPsInfo() const
CcdbObjectInfo & getccdbLVInfo()
void init(const std::vector< DPID > &pids)
void setStartValidityHV(long t)
std::deque< double > DQDoubles
static constexpr int NDDLS
void resetStartValidityHV()
void resetStartValidityDPs()
CcdbObjectInfo & getccdbDPsInfo()
void resetStartValidityLV()
~TOFDCSProcessor()=default
CcdbObjectInfo & getccdbHVInfo()
const std::bitset< Geo::NCHANNELS > & getLVStatus() const
void getStripsConnectedToFEAC(int nDDL, int nFEAC, TOFFEACinfo &info) const
void setStartValidityDPs(long t)
const std::bitset< Geo::NCHANNELS > & getHVStatus() const
const CcdbObjectInfo & getccdbHVInfo() const
long getStartValidityDPs() const
long getStartValidityHV() const
void setStartValidityLV(long t)
int processDP(const DPCOM &dpcom)
void useVerboseModeHVLV()
const CcdbObjectInfo & getccdbLVInfo() const
const std::unordered_map< DPID, TOFDCSinfo > & getTOFDPsInfo() const
uint64_t processFlags(uint64_t flag, const char *pid)
static constexpr int NFEACS
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ClassDefNV(TOFDCSinfo, 2)
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