14#include <unordered_map>
28#ifndef DETECTOR_ZDCDCSPROCESSOR_H_
29#define DETECTOR_ZDCDCSPROCESSOR_H_
51 lastValue = std::make_pair(0, -999999999);
52 midValue = std::make_pair(0, -999999999);
53 maxChange = std::make_pair(0, -999999999);
66 std::array<int, 4>
moduleID = {-1, -1, -1, -1};
67 std::array<bool, 4>
readChannel = {
false,
false,
false,
false};
87 static constexpr int NDDLS = 16;
95 void init(
const std::vector<DPID>& pids);
97 int process(
const gsl::span<const DPCOM> dps);
99 virtual uint64_t
processFlags(uint64_t flag,
const char* pid);
109 const std::unordered_map<DPID, ZDCDCSinfo>&
getZDCDPsInfo()
const {
return mZDCDCS; }
116 const std::bitset<NHVCHANNELS>&
getHVStatus()
const {
return mHV; }
124 template <
typename T>
126 const std::map<std::string, std::string>& md);
134 mDpsdoublesmap.clear();
139 std::unordered_map<DPID, ZDCDCSinfo> mZDCDCS;
140 std::unordered_map<DPID, bool> mPids;
142 std::unordered_map<DPID, std::vector<DPVAL>> mDpsdoublesmap;
144 std::array<std::array<ZDCModuleMap, NMODULES>,
NDDLS> mZDCMapInfo;
145 std::array<std::bitset<NCHANNELS>,
NDDLS> mPreviousMapping;
146 std::bitset<NCHANNELS> mMapping;
147 bool mUpdateMapping =
false;
149 std::bitset<NHVCHANNELS> mHV;
150 std::bitset<NHVCHANNELS> mPrevHVstatus;
151 bool mUpdateHVStatus =
false;
153 std::bitset<NCHANNELS> mVerticalPosition;
154 std::bitset<NCHANNELS> mPrevPositionstatus;
155 bool mUpdateVerticalPosition =
false;
163 bool mStartTFset =
false;
164 long mStartValidity = 0;
165 bool mVerbose =
false;
172 const std::map<std::string, std::string>& md)
static std::string generateFileName(const std::string &inp)
void setStartValidityTimestamp(long start)
void setFileName(const std::string &nm)
void setPath(const std::string &path)
void setEndValidityTimestamp(long end)
void setObjectType(const std::string &tp)
void setMetaData(const std::map< std::string, std::string > &md)
void updatePositionCCDB()
const std::bitset< NCHANNELS > & getVerticalPosition() const
void init(const std::vector< DPID > &pids)
const std::bitset< NCHANNELS > & getMappingStatus() const
const CcdbObjectInfo & getccdbHVInfo() const
void setStartValidity(long t)
const std::bitset< NHVCHANNELS > & getHVStatus() const
static constexpr int NCHANNELS
static constexpr int NHVCHANNELS
ZDCDCSProcessor()=default
void getZDCActiveChannels(int nDDL, int nModule, ZDCModuleMap &info) const
static constexpr int NMODULES
CcdbObjectInfo & getccdbPositionInfo()
CcdbObjectInfo & getccdbDPsInfo()
const CcdbObjectInfo & getccdbPositionInfo() const
int processDP(const DPCOM &dpcom)
virtual uint64_t processFlags(uint64_t flag, const char *pid)
static constexpr int NDDLS
CcdbObjectInfo & getccdbHVInfo()
void prepareCCDBobjectInfo(T &obj, CcdbObjectInfo &info, const std::string &path, TFType tf, const std::map< std::string, std::string > &md)
bool isPositionUpdated() const
const CcdbObjectInfo & getccdbDPsInfo() const
bool isMappingUpdated() const
~ZDCDCSProcessor()=default
const std::unordered_map< DPID, ZDCDCSinfo > & getZDCDPsInfo() const
GLsizei const GLchar *const * path
struct o2::upgrades_utils::@463 zdc
structure to keep FT0 information
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf
static std::string getClassName(const T &obj)
get the class name of the object
std::pair< O2LongUInt, double > maxChange
std::pair< O2LongUInt, double > midValue
std::pair< O2LongUInt, double > firstValue
std::pair< O2LongUInt, double > lastValue
ClassDefNV(ZDCDCSinfo, 1)
std::array< bool, 4 > triggerChannel
std::array< int, 4 > moduleID
std::array< bool, 4 > readChannel
std::array< int, 4 > channelValue