Skip to content

Commit ad4a2a1

Browse files
committed
ITS: tracklet print
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent d2961ae commit ad4a2a1

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • Detectors/ITSMFT/ITS/tracking/include/ITStracking

Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@
2020
#include "GPUCommonRtypes.h"
2121
#include "GPUCommonMath.h"
2222
#include "GPUCommonDef.h"
23+
#include "GPUCommonLogger.h"
2324

2425
#ifndef GPUCA_GPUCODE_DEVICE
26+
#ifndef GPU_NO_FMT
2527
#include <string>
28+
#include <fmt/format.h>
29+
#endif
2630
#endif
2731

2832
namespace o2::its
@@ -41,12 +45,12 @@ struct Tracklet final {
4145
GPUhdi() void dump() const;
4246
GPUhdi() void dump(const int, const int) const;
4347
GPUhdi() unsigned char operator<(const Tracklet&) const;
44-
#ifndef GPUCA_GPUCODE_DEVICE
48+
#if !defined(GPUCA_NO_FMT) && !defined(GPUCA_GPUCODE_DEVICE)
4549
std::string asString() const
4650
{
47-
return "fClIdx: " + std::to_string(firstClusterIndex) + " sClIdx: " + std::to_string(secondClusterIndex) +
48-
" rof1: " + std::to_string(rof[0]) + " rof2: " + std::to_string(rof[1]) + " delta: " + std::to_string(getDeltaRof());
51+
return fmt::format("fClIdx:{} fROF:{} sClIdx:{} sROF:{} (DROF:{})", firstClusterIndex, rof[0], secondClusterIndex, rof[1], getDeltaRof());
4952
}
53+
void print() const { LOG(info) << asString(); }
5054
#endif
5155

5256
int firstClusterIndex{-1};

0 commit comments

Comments
 (0)