12#ifndef DETECTOR_MFTDCSPROCESSOR_H_
13#define DETECTOR_MFTDCSPROCESSOR_H_
17#include <unordered_map>
55 lastValue = std::make_pair(0, -999999999);
56 meanValue = std::make_pair(0, -999999999);
58 midValue = std::make_pair(0, -999999999);
59 maxChange = std::make_pair(0, -999999999);
60 summary = std::make_pair(0, -999999999);
83 void init(
const std::vector<DPID>& pids);
85 int process(
const gsl::span<const DPCOM> dps);
93 const std::unordered_map<DPID, MFTDCSinfo>&
getMFTDPsInfo()
const {
return mMFTDCS; }
103 mThresholdBackBiasCurrent = thre;
107 mThresholdDigitalCurrent = thre;
111 mThresholdAnalogCurrent = thre;
115 mThresholdBackBiasVoltage = thre;
119 mThresholdRULV = thre;
123 mDpsdoublesmap.clear();
128 std::unordered_map<DPID, MFTDCSinfo> mMFTDCS;
129 std::unordered_map<DPID, bool> mPids;
131 std::unordered_map<DPID, std::vector<DPVAL>> mDpsdoublesmap;
137 bool mStartTFset =
false;
139 bool mVerbose =
false;
141 bool mSendToCCDB =
false;
143 double mThresholdAnalogCurrent;
144 double mThresholdBackBiasCurrent;
145 double mThresholdDigitalCurrent;
146 double mThresholdBackBiasVoltage;
147 double mThresholdRULV;
static std::string generateFileName(const std::string &inp)
void setStartValidityTimestamp(long start)
void setFileName(const std::string &nm)
static constexpr long MONTH
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 setThreAnalogCurrent(float thre)
void prepareCCDBobjectInfo(T &obj, CcdbObjectInfo &info, const std::string &path, TFType tf, const std::map< std::string, std::string > &md)
std::deque< double > DQDoubles
int processDP(const DPCOM &dpcom)
void setThreRULV(float thre)
MFTDCSProcessor()=default
void setThreDigitCurrent(float thre)
CcdbObjectInfo & getccdbDPsInfo()
void setThreBackBiasVoltage(float thre)
void setThreBackBiasCurrent(float thre)
const std::unordered_map< DPID, MFTDCSinfo > & getMFTDPsInfo() const
const CcdbObjectInfo & getccdbDPsInfo() const
void init(const std::vector< DPID > &pids)
~MFTDCSProcessor()=default
GLsizei const GLchar *const * path
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::unique_ptr< GPUReconstructionTimeframe > tf
std::pair< O2LongUInt, double > summary
std::pair< O2LongUInt, double > stddevValue
std::pair< O2LongUInt, double > meanValue
std::pair< O2LongUInt, double > maxChange
std::pair< O2LongUInt, double > midValue
ClassDefNV(MFTDCSinfo, 2)
std::pair< O2LongUInt, double > lastValue
std::pair< O2LongUInt, double > firstValue
static std::string getClassName(const T &obj)
get the class name of the object