|
21 | 21 | #include "TPCBase/CRU.h" |
22 | 22 | #include "TPCBase/Mapper.h" |
23 | 23 | #include "DataFormatsTPC/ClusterNative.h" |
| 24 | +#include "DataFormatsTPC/KrCluster.h" |
24 | 25 |
|
25 | 26 | ClassImp(o2::tpc::qc::Clusters); |
26 | 27 |
|
27 | 28 | using namespace o2::tpc::qc; |
28 | 29 |
|
29 | 30 | //______________________________________________________________________________ |
30 | | -bool Clusters::processCluster(const o2::tpc::ClusterNative& cluster, const o2::tpc::Sector sector, const int row) |
| 31 | +template <class T> |
| 32 | +bool Clusters::processCluster(const T& cluster, const o2::tpc::Sector sector, const int row) |
31 | 33 | { |
32 | 34 | const int nROC = row < 63 ? int(sector) : int(sector) + 36; |
33 | 35 | const int rocRow = row < 63 ? row : row - 63; |
34 | 36 |
|
35 | 37 | const float pad = cluster.getPad(); |
36 | 38 |
|
37 | | - const uint16_t qMax = cluster.qMax; |
38 | | - const uint16_t qTot = cluster.qTot; |
39 | | - const float sigmaPad = cluster.getSigmaPad(); |
40 | | - const float sigmaTime = cluster.getSigmaTime(); |
41 | | - const float timeBin = cluster.getTime(); |
| 39 | + const auto qMax = cluster.getQmax(); |
| 40 | + const auto qTot = cluster.getQtot(); |
| 41 | + const auto sigmaPad = cluster.getSigmaPad(); |
| 42 | + const auto sigmaTime = cluster.getSigmaTime(); |
| 43 | + const auto timeBin = cluster.getTime(); |
42 | 44 |
|
43 | 45 | float count = mNClusters.getCalArray(nROC).getValue(rocRow, pad); |
44 | 46 | mNClusters.getCalArray(nROC).setValue(rocRow, pad, count + 1); |
@@ -113,3 +115,7 @@ void Clusters::dumpToFile(std::string filename) |
113 | 115 | g->WriteObject(&mTimeBin, mTimeBin.getName().data()); |
114 | 116 | g->Close(); |
115 | 117 | } |
| 118 | + |
| 119 | +// ===| explicit instantiations |=============================================== |
| 120 | +template bool Clusters::processCluster<o2::tpc::ClusterNative>(const o2::tpc::ClusterNative&, const o2::tpc::Sector, const int); |
| 121 | +template bool Clusters::processCluster<o2::tpc::KrCluster>(const o2::tpc::KrCluster&, const o2::tpc::Sector, const int); |
0 commit comments