Skip to content

Commit 2dfa6f7

Browse files
matthias-kleinershahor02
authored andcommitted
ClusterNativeHelper fixing convert to tree method
1 parent 10c7ca2 commit 2dfa6f7

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

DataFormats/Detectors/TPC/src/ClusterNativeHelper.cxx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,6 @@ ClusterNativeHelper::TreeWriter::~TreeWriter()
240240

241241
void ClusterNativeHelper::TreeWriter::init(const char* filename, const char* treename)
242242
{
243-
// after changing this ClusterNative transport format, this functionality needs
244-
// to be adapted
245-
throw std::runtime_error("code path currently not supported");
246243
mFile.reset(TFile::Open(filename, "RECREATE"));
247244
if (!mFile) {
248245
return;
@@ -274,6 +271,7 @@ int ClusterNativeHelper::TreeWriter::fillFrom(ClusterNativeAccess const& cluster
274271
}
275272
}
276273
}
274+
++mEvent;
277275
return result;
278276
}
279277

@@ -285,9 +283,8 @@ int ClusterNativeHelper::TreeWriter::fillFrom(int sector, int padrow, ClusterNat
285283
mStoreClusters.resize(nClusters, BranchData{sector, padrow});
286284
if (clusters != nullptr && nClusters > 0) {
287285
std::copy(clusters, clusters + nClusters, mStoreClusters.begin());
286+
mTree->Fill();
288287
}
289-
mTree->Fill();
290-
++mEvent;
291288
return nClusters;
292289
}
293290

0 commit comments

Comments
 (0)