Skip to content

Commit 234720c

Browse files
committed
TPC: Add debug option to dump CompressedClusters struct to stdout
1 parent 86dd029 commit 234720c

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

DataFormats/Detectors/TPC/include/DataFormatsTPC/CompressedClusters.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ struct CompressedClusters : public CompressedClustersCounters, public Compressed
7979
~CompressedClusters() CON_DEFAULT;
8080
CompressedClusters(const CompressedClustersFlat& c);
8181

82+
void dump();
83+
8284
ClassDefNV(CompressedClusters, 2);
8385
};
8486

DataFormats/Detectors/TPC/src/CompressedClusters.cxx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// \brief Container to store compressed TPC cluster data
1414

1515
#include "DataFormatsTPC/CompressedClusters.h"
16-
16+
#include "GPUCommonLogger.h"
1717
#include <cstring>
1818
#ifndef GPUCA_STANDALONE
1919
#include "DataFormatsTPC/CompressedClustersHelpers.h"
@@ -55,6 +55,26 @@ void CompressedClustersFlat::setForward(const CompressedClusters* p)
5555
ptrForward = p;
5656
}
5757

58+
void CompressedClusters::dump()
59+
{
60+
LOG(info) << "nTracks" << nTracks;
61+
for (unsigned int i = 0; i < nTracks; i++) {
62+
LOG(info) << " " << i << ":" << (unsigned int)qPtA[i] << " " << (unsigned int)rowA[i] << " " << (unsigned int)sliceA[i] << " " << (unsigned int)timeA[i] << " " << (unsigned int)padA[i];
63+
}
64+
LOG(info) << "nAttachedClusters" << nAttachedClusters;
65+
for (unsigned int i = 0; i < nAttachedClusters; i++) {
66+
LOG(info) << " " << i << ":" << (unsigned int)qTotA[i] << " " << (unsigned int)qMaxA[i] << " " << (unsigned int)flagsA[i] << " " << (unsigned int)sigmaPadA[i] << " " << (unsigned int)sigmaTimeA[i];
67+
}
68+
LOG(info) << "nAttachedClustersReduced" << nAttachedClustersReduced;
69+
for (unsigned int i = 0; i < nAttachedClustersReduced; i++) {
70+
LOG(info) << " " << i << ":" << (unsigned int)rowDiffA[i] << " " << (unsigned int)sliceLegDiffA[i] << " " << (unsigned int)padResA[i] << " " << (unsigned int)timeResA[i];
71+
}
72+
LOG(info) << "nUnattachedClusters" << nUnattachedClusters;
73+
for (unsigned int i = 0; i < nUnattachedClusters; i++) {
74+
LOG(info) << " " << i << ":" << (unsigned int)qTotU[i] << " " << (unsigned int)qMaxU[i] << " " << (unsigned int)flagsU[i] << " " << (unsigned int)padDiffU[i] << " " << (unsigned int)timeDiffU[i] << " " << (unsigned int)sigmaPadU[i] << " " << (unsigned int)sigmaTimeU[i];
75+
}
76+
}
77+
5878
#ifndef GPUCA_STANDALONE
5979
void CompressedClustersROOT::Streamer(TBuffer& R__b)
6080
{

0 commit comments

Comments
 (0)