Skip to content

Commit 1b9e39b

Browse files
committed
HBFUtils getter for 1st IR of TF from arbitrary IR within TF
Also, limit TF and HBF IDs to uint32_t.
1 parent 9bd5576 commit 1b9e39b

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

Detectors/Raw/include/DetectorsRaw/HBFUtils.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ struct HBFUtils : public o2::conf::ConfigurableParamHelper<HBFUtils> {
5454
IR getIRTF(uint32_t tf) const { return getIRHBF(tf * nHBFPerTF); }
5555

5656
///< get HBF ID corresponding to this IR
57-
int64_t getHBF(const IR& rec) const;
57+
uint32_t getHBF(const IR& rec) const;
5858

5959
///< get TF ID corresponding to this IR
60-
int64_t getTF(const IR& rec) const { return getHBF(rec) / nHBFPerTF; }
60+
uint32_t getTF(const IR& rec) const { return getHBF(rec) / nHBFPerTF; }
6161

6262
///< get TF and HB (within TF) for this IR
6363
std::pair<int, int> getTFandHBinTF(const IR& rec) const
@@ -66,6 +66,9 @@ struct HBFUtils : public o2::conf::ConfigurableParamHelper<HBFUtils> {
6666
return std::pair<int, int>(hbf / nHBFPerTF, hbf % nHBFPerTF);
6767
}
6868

69+
///< get 1st IR of the TF corresponding to provided interaction record
70+
IR getFirstIRofTF(const IR& rec) const { return getIRTF(getTF(rec)); }
71+
6972
///< get TF and HB (abs) for this IR
7073
std::pair<int, int> getTFandHB(const IR& rec) const
7174
{

Detectors/Raw/src/HBFUtils.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using namespace o2::raw;
2020
O2ParamImpl(o2::raw::HBFUtils);
2121

2222
//_________________________________________________
23-
int64_t HBFUtils::getHBF(const IR& rec) const
23+
uint32_t HBFUtils::getHBF(const IR& rec) const
2424
{
2525
///< get HBF ID corresponding to this IR
2626
auto diff = rec.differenceInBC(getFirstIR());

0 commit comments

Comments
 (0)