39 auto finishWriting = [](TFile* outputfile, TTree* outputtree) {
40 const auto* brArr = outputtree->GetListOfBranches();
42 for (
const auto* brc : *brArr) {
43 int64_t
n = ((
const TBranch*)brc)->GetEntries();
44 if (nent && (nent !=
n)) {
45 LOG(error) <<
"Branches have different number of entries";
49 outputtree->SetEntries(nent);
56 auto customlabelhandler = [](TBranch& branch, std::vector<char>
const& labeldata,
DataRef const&
ref) {
60 auto ptr = &outputcontainer;
67 "TRDMCLabels",
"labels-branch-name",
77 BranchDefinition<std::vector<o2::trd::Digit>>{
InputSpec{
"input",
"TRD",
"DIGITS", (inpFromDigitizer ? 1u : 0u)},
"TRDDigit"},
79 std::move(labelsdef))();