Skip to content

Commit

Permalink
[podiooutput] write vector memvers
Browse files Browse the repository at this point in the history
  • Loading branch information
vvolkl committed Dec 4, 2020
1 parent 05a087a commit d604b13
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions k4FWCore/components/PodioOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ void PodioOutput::resetBranches(const std::vector<std::pair<std::string, podio::
++j;
}
}
// ---- vector members
auto vminfo = collNamePair.second->vectorMembers();
if (vminfo != nullptr){
int i = 0;
for(auto& c : (*vminfo)){
std::string typeName = "vector<"+c.first+">" ;
void* add = c.second ;
m_datatree->Branch((collName+"_"+std::to_string(i)).c_str(),
typeName.c_str(),
add);
++i;
}
}

}
if (prepare) {
collNamePair.second->prepareForWrite();
Expand Down

0 comments on commit d604b13

Please sign in to comment.