Skip to content

Commit

Permalink
Fix fillining of int8 branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlo Battilana committed Mar 23, 2022
1 parent fec3825 commit 56b02e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PhysicsTools/NanoAOD/plugins/TableOutputBranches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void TableOutputBranches::defineBranchesFromFirstEvent(const nanoaod::FlatTable
m_intBranches.emplace_back(var, tab.columnDoc(i), "I");
break;
case nanoaod::FlatTable::ColumnType::Int8:
m_int8Branches.emplace_back(var, tab.columnDoc(i), "b");
m_int8Branches.emplace_back(var, tab.columnDoc(i), "B");
break;
case nanoaod::FlatTable::ColumnType::UInt8:
m_uint8Branches.emplace_back(var, tab.columnDoc(i), "b");
Expand Down Expand Up @@ -59,7 +59,7 @@ void TableOutputBranches::branch(TTree &tree) {
}
std::string varsize = m_singleton ? "" : "[n" + m_baseName + "]";
for (std::vector<NamedBranchPtr> *branches :
{&m_floatBranches, &m_intBranches, &m_uint8Branches, &m_uint32Branches, &m_doubleBranches}) {
{&m_floatBranches, &m_intBranches, &m_int8Branches, &m_uint8Branches, &m_uint32Branches, &m_doubleBranches}) {
for (auto &pair : *branches) {
std::string branchName = makeBranchName(m_baseName, pair.name);
pair.branch =
Expand Down Expand Up @@ -99,6 +99,8 @@ void TableOutputBranches::fill(const edm::OccurrenceForOutput &iWhatever, TTree
fillColumn<float>(pair, tab);
for (auto &pair : m_intBranches)
fillColumn<int>(pair, tab);
for (auto &pair : m_int8Branches)
fillColumn<int8_t>(pair, tab);
for (auto &pair : m_uint8Branches)
fillColumn<uint8_t>(pair, tab);
for (auto &pair : m_uint32Branches)
Expand Down

0 comments on commit 56b02e1

Please sign in to comment.