23 namespace RootIOUtilities {
48 const std::set<std::string>&
getBranchNames(
bool persistent =
false);
Helper class to factorize some necessary tasks when working with Belle2 output files.
const FileMetaData & getFileMetaData()
Return the event metadata from the file.
std::unique_ptr< TTree > m_events
Pointer to the event tree.
void checkMissingBranches(const std::set< std::string > &required, bool persistent=false)
Check if the event or persistent tree contain at least all the branches in the set of required branch...
std::unique_ptr< FileMetaData > m_metadata
Pointer to the file metadata once it has been read.
TTree & getPersistentTree()
Return a reference to the persistent tree.
std::optional< std::set< std::string > > m_persistentBranches
Cached set of persistent branch names.
std::unique_ptr< TFile > m_file
Pointer to the file object.
std::optional< std::set< std::string > > m_eventBranches
Cached set of event branch names.
~RootFileInfo()
Close the file and delete all structures associated with it.
std::unique_ptr< TTree > m_persistent
Pointer to the persistent tree.
TTree & getEventTree()
Return a reference to the event tree.
const std::set< std::string > & getBranchNames(bool persistent=false)
Return a set of branch names for either the event or the persistent tree.
Abstract base class for different kinds of events.