16#ifndef PRESSURETEMPERATUREHELPER_H_
17#define PRESSURETEMPERATUREHELPER_H_
25class ProcessingContext;
49 static void setOutputs(std::vector<o2::framework::OutputSpec>& outputs);
61 float interpolate(
const std::vector<ULong64_t>& timestamps,
const std::vector<float>&
values, ULong64_t timestamp)
const;
67 void setPressure(
const std::pair<std::vector<float>, std::vector<ULong64_t>>& pressure) {
mPressure = pressure; }
70 void setTemperature(
const std::pair<std::vector<float>, std::vector<ULong64_t>>& temperatureA,
const std::pair<std::vector<float>, std::vector<ULong64_t>>& temperatureC)
83 float getTP(int64_t ts)
const;
94 static constexpr float toKelvin(
float celsius) {
return celsius + 273.15f; }
96 std::pair<std::vector<float>, std::vector<ULong64_t>>
mPressure;
static void requestCCDBInputs(std::vector< o2::framework::InputSpec > &inputs)
float getPressure(const ULong64_t timestamp) const
get pressure for given time stamp in ms
float getTP(int64_t ts) const
void extractCCDBInputs(o2::framework::ProcessingContext &pc) const
trigger checking for CCDB objects
std::pair< ULong64_t, ULong64_t > getMinMaxTime() const
get minimum and maximum time stamps of the pressure and temperature data
static constexpr o2::header::DataDescription getDataDescriptionTemperature()
dataformats::Pair< float, float > getTemperature(const ULong64_t timestamp) const
get temperature for given time stamp in ms
static void addOutput(std::vector< o2::framework::OutputSpec > &outputs, o2::framework::OutputSpec &&osp)
PressureTemperatureHelper()=default
std::pair< std::vector< float >, std::vector< ULong64_t > > mTemperatureA
temperature values A-side
void sendPTForTS(o2::framework::ProcessingContext &pc, const ULong64_t timestamp) const
send temperature and pressure for given time stamp
void setPressure(const std::pair< std::vector< float >, std::vector< ULong64_t > > &pressure)
manually set the pressure
int mFitIntervalMS
fit interval for the temperature
float getMeanTemperature(const ULong64_t timestamp) const
get mean temperature over A and C side
std::pair< std::vector< float >, std::vector< ULong64_t > > mPressure
pressure values for both measurements
void setFitIntervalTemp(const int fitIntervalMS)
set fit interval range for temperature in ms
static constexpr o2::header::DataDescription getDataDescriptionPressure()
static void addInput(std::vector< o2::framework::InputSpec > &inputs, o2::framework::InputSpec &&isp)
bool accountCCDBInputs(const o2::framework::ConcreteDataMatcher &matcher, void *obj)
check for new CCDB objects
static constexpr float toKelvin(float celsius)
std::pair< std::vector< float >, std::vector< ULong64_t > > mTemperatureC
temperature values C-side
static void setOutputs(std::vector< o2::framework::OutputSpec > &outputs)
define outputs in case pressure and temperature will be send
void setTemperature(const std::pair< std::vector< float >, std::vector< ULong64_t > > &temperatureA, const std::pair< std::vector< float >, std::vector< ULong64_t > > &temperatureC)
manually set the temperature
float interpolate(const std::vector< ULong64_t > ×tamps, const std::vector< float > &values, ULong64_t timestamp) const
interpolate input values for given timestamp
ClassDefNV(PressureTemperatureHelper, 1)
GLenum GLsizei GLsizei GLint * values
Defining PrimaryVertex explicitly as messageable.
Global TPC definitions and constants.