14#include <fmt/format.h>
25 os << fmt::format(
"{} FirstIdx: {:5d} LastIdx: {:5d} Width: {:2d} BCs",
38 float tMean = (bcDiff + 0.5 * mBCWidth) * o2::constants::lhc::LHCBunchSpacingMUS;
39 float tErr = 0.5 * mBCWidth * o2::constants::lhc::LHCBunchSpacingMUS;
40 bool isInTF = bcDiff >= 0 && bcDiff < nOrbits * o2::constants::lhc::LHCMaxBunches;
41 if (printError && !isInTF) {
42 LOGP(alarm,
"ATTENTION: wrong bunches diff. {} for current IR {} wrt 1st TF orbit {}, source:MCH",
45 return std::make_pair(
Time(tMean, tErr), isInTF);
Header to collect LHC related constants.
int getLastIdx() const
get the index of the last associated object
const BCData & getBCData() const
get the interaction record
std::pair< Time, bool > getTimeMUS(const BCData &startIR, uint32_t nOrbits=128, bool printError=false) const
int getFirstIdx() const
get the index of the first associated object
int getBCWidth() const
get the time span by this ROF, in BC unit
std::string asString() const
int64_t differenceInBC(const InteractionRecord &other) const