16#ifndef O2_TPC_DCSProcessor_H_
17#define O2_TPC_DCSProcessor_H_
42 void process(
const gsl::span<const DPCOM> dps);
91 mTimeTemperature = {};
92 mTimeHighVoltage = {};
112 TimeRange mTimeTemperature;
113 TimeRange mTimeHighVoltage;
117 bool mWriteDebug{
false};
118 bool mRoundToInterval{
false};
119 bool mHasData{
false};
120 std::string mDebugOutputName{
"DCS_debug.root"};
121 std::unique_ptr<o2::utils::TreeStreamRedirector> mDebugStream;
129 constexpr auto max = std::numeric_limits<dcs::TimeStampType>::max();
131 for (
const auto& sensor :
data) {
132 const auto time = sensor.data.size() ? sensor.data.front().time :
max;
133 firstTime = std::min(firstTime,
time);
138 if (mRoundToInterval) {
139 firstTime -= (firstTime % mFitInterval);
148 constexpr auto min = 0;
150 for (
const auto& sensor :
data) {
151 const auto time = sensor.data.size() ? sensor.data.back().time : 0;
152 lastTime = std::max(lastTime,
time);
DCS data point data formats.
const auto & getTimeGas() const
void finalizeHighVoltage()
bool hasData() const
if data to process
void setFitInterval(dcs::TimeStampType interval)
set the fit interval
dcs::TimeStampType getMinTime(const std::vector< dcs::DataPointVector< T > > &data)
get minimum time over all sensors. Assumes data is sorted in time
void setWriteDebug(const bool debug=true)
if to write debug information
void fitTemperature(Side side)
void fillHV(const DPCOM &dp)
const auto & getTimeTemperature() const
void reset()
reset all data
dcs::TimeStampType getMaxTime(const std::vector< dcs::DataPointVector< T > > &data)
get maximum time over all sensors. Assumes data is sorted in time
void setRoundToInterval(const bool round=true)
round to fit interval
void fillTemperature(const DPCOM &dp)
float getValueF(const DPCOM &dp) const
void setDebugOutputName(std::string_view name)
name of the debug output tree
void writeDebug()
write the debug output tree
const auto & getTimeHighVoltage() const
void finalizeTemperature()
auto getFitInterval() const
get fit interval
void fillGas(const DPCOM &dp)
GLuint const GLchar * name
Global TPC definitions and constants.